com.partnersoft.gui
Class GuiLib

java.lang.Object
  extended by com.partnersoft.gui.GuiLib

public class GuiLib
extends java.lang.Object


Method Summary
static void centerBaselineString(java.awt.Graphics g, int x, int y, java.lang.String message, java.awt.Font font)
           
static void centerString(java.awt.Graphics g, int x, int y, java.lang.String message, java.awt.Font font)
           
static void centerString(java.awt.Graphics g, java.awt.Point point, java.lang.String message, java.awt.Font font)
           
static void centerWindow(java.awt.Window window)
           
static void configureGraphicsForQuality(java.awt.Graphics graphics)
          Turn on anti-aliasing and other high-quality rendering features.
static void configureGraphicsForSpeed(java.awt.Graphics graphics)
          Turn off anti-aliasing and other high-quality rendering features.
static void debugGraphics(java.awt.Component root)
           
static boolean isRectOnScreen(java.awt.Rectangle bounds)
          Returns whether a rectangle is contained in a screen in the current graphics configuration.
static void rightBaselineString(java.awt.Graphics g, int x, int y, java.lang.String message, java.awt.Font font)
           
static void rightFlushString(java.awt.Graphics g, int x, int y, java.lang.String message, java.awt.Font font)
           
static void rightFlushString(java.awt.Graphics g, java.awt.Point point, java.lang.String message, java.awt.Font font)
           
static java.awt.Window windowFor(java.awt.Component component)
          Returns the window containing the given component;
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isRectOnScreen

public static boolean isRectOnScreen(java.awt.Rectangle bounds)
Returns whether a rectangle is contained in a screen in the current graphics configuration. Used if a monitor has been removed and the window preferences have the window showing up on a non-existenent screen.

Parameters:
bounds -
Returns:

debugGraphics

public static void debugGraphics(java.awt.Component root)

centerString

public static void centerString(java.awt.Graphics g,
                                java.awt.Point point,
                                java.lang.String message,
                                java.awt.Font font)

centerString

public static void centerString(java.awt.Graphics g,
                                int x,
                                int y,
                                java.lang.String message,
                                java.awt.Font font)

rightFlushString

public static void rightFlushString(java.awt.Graphics g,
                                    java.awt.Point point,
                                    java.lang.String message,
                                    java.awt.Font font)

rightFlushString

public static void rightFlushString(java.awt.Graphics g,
                                    int x,
                                    int y,
                                    java.lang.String message,
                                    java.awt.Font font)

centerBaselineString

public static void centerBaselineString(java.awt.Graphics g,
                                        int x,
                                        int y,
                                        java.lang.String message,
                                        java.awt.Font font)

rightBaselineString

public static void rightBaselineString(java.awt.Graphics g,
                                       int x,
                                       int y,
                                       java.lang.String message,
                                       java.awt.Font font)

centerWindow

public static void centerWindow(java.awt.Window window)

windowFor

public static java.awt.Window windowFor(java.awt.Component component)
Returns the window containing the given component;

Parameters:
component -
Returns:

configureGraphicsForQuality

public static void configureGraphicsForQuality(java.awt.Graphics graphics)
Turn on anti-aliasing and other high-quality rendering features.


configureGraphicsForSpeed

public static void configureGraphicsForSpeed(java.awt.Graphics graphics)
Turn off anti-aliasing and other high-quality rendering features.