uk.org.redfelineninja.image
Class GraphicsToolkit

java.lang.Object
  |
  +--uk.org.redfelineninja.image.GraphicsToolkit

public class GraphicsToolkit
extends java.lang.Object

This is a utility class to draw useful things onto a graphics context. Ideally this should be achieved through sub-classing Graphics as BufferedReader sub-classes Reader. However things could well get very messy that way so this is a static utility class.

Author:
Daniel Thompson, Dec 98/Jan 1999
See Also:
Graphics

Constructor Summary
GraphicsToolkit()
           
 
Method Summary
static java.awt.Rectangle centerBoxedString(java.awt.Graphics g, java.lang.String s, int x, int y)
          Center a string at the supplied point inside a box with a white background.
static void centerString(java.awt.Graphics g, java.lang.String s, int x, int y)
          Center a string at the supplied point.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GraphicsToolkit

public GraphicsToolkit()
Method Detail

centerString

public static void centerString(java.awt.Graphics g,
                                java.lang.String s,
                                int x,
                                int y)
Center a string at the supplied point.


centerBoxedString

public static java.awt.Rectangle centerBoxedString(java.awt.Graphics g,
                                                   java.lang.String s,
                                                   int x,
                                                   int y)
Center a string at the supplied point inside a box with a white background.