com.partnersoft.v3x.gui
Class GUILib

java.lang.Object
  extended by com.partnersoft.v3x.gui.GUILib

public class GUILib
extends java.lang.Object

A GUI library class.


Field Summary
static java.awt.Color hiliteColor
           
static java.awt.Stroke hiliteStroke
           
static java.lang.String[] imageFileExtensions
          The standard file extensions used for images, in the order searched.
static java.awt.Color indicatorColor
           
static java.awt.Stroke indicatorStroke
           
 
Constructor Summary
GUILib()
           
 
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 java.awt.Image clientLogo()
          Returns a client logo if it exists, otherwise defaults to the Partner logo.
static javax.swing.JLabel createBigLabel(java.lang.String label)
          Gives you a standard big label.
static javax.swing.JComponent createCenteredPanelAround(java.awt.Component component)
          Gives you a fresh panel with the provided component nicely centered in the middle.
static java.awt.Dimension createDimensionDefaultToScreenSize(int width, int height)
          Returns a dimension object for the given width and height, or, if either is null, returns the dimension of the screen instead.
static javax.swing.JLabel createFieldLabel(java.lang.String label)
          Gives you a standard field label.
static javax.swing.JLabel createFieldLabelWithColor(java.lang.String label, java.awt.Color color)
          Gives you a standard field label with color provided.
static javax.swing.JLabel createInfoLabel(java.lang.String label)
          Gives you a standard information label.
static java.awt.Image fetchImage(java.lang.String path)
          Returns a named image from the classpath.
static java.io.File fileForImagePath(java.lang.String imagePath)
          Returns a file for an image "path".
static void forceLoadImage(java.awt.Image imagineAllThePeople)
           
static java.awt.Font getBigFont()
           
static java.awt.Font getDefaultFont()
           
static java.awt.Dimension getDefaultWindowSize()
          Gets the default window size.
static java.awt.Font getFinePrintFont()
           
static java.awt.Color getHiliteColor()
           
static java.awt.Stroke getHiliteStroke()
           
static java.awt.Image getImage(java.lang.String path)
          Returns an image from the local filesystem.
static java.awt.Color getIndicatorColor()
           
static java.awt.Stroke getIndicatorStroke()
           
static java.awt.Image getUncachedImage(java.lang.String path)
          Returns an image from the local filesystem (no caching is done).
static void loadConfig()
           
static java.awt.Image partnerLogo()
          Returns a handy partner logo.
static boolean penBased()
          pen based?
static java.awt.Image questionMark()
          Returns a handy question mark - usually used to indicate loading errors for icons..
static boolean rejectLine(int width, int height, int x1, int y1, int x2, int y2)
          Eliminates trivial-rejectable lines.
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 void setDefaultRenderingHints(java.awt.Graphics g)
           
static void setDefaultWindowSize(int width, int height)
          Sets the default window size.
static void setGraphicsForHilite(java.awt.Graphics g)
           
static void setGraphicsForIndication(java.awt.Graphics g)
           
static void setPenBased(boolean newValue)
           
static void setRenderingHintsForHighestQuality(java.awt.Graphics g)
           
static void setRenderingHintsForHighestSpeed(java.awt.Graphics g)
           
static void setRenderingHintsForInvertedPrinting(java.awt.Graphics g)
           
static void setRenderingHintsForPrinting(java.awt.Graphics g)
           
static java.awt.Image smallPartnerLogo()
          Returns a handy small partner logo.
static java.awt.Image translucentDot()
          Returns a (handy?) translucent dot.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

hiliteColor

public static final java.awt.Color hiliteColor

indicatorColor

public static final java.awt.Color indicatorColor

hiliteStroke

public static final java.awt.Stroke hiliteStroke

indicatorStroke

public static final java.awt.Stroke indicatorStroke

imageFileExtensions

public static final java.lang.String[] imageFileExtensions
The standard file extensions used for images, in the order searched.

Constructor Detail

GUILib

public GUILib()
Method Detail

fileForImagePath

public static java.io.File fileForImagePath(java.lang.String imagePath)
Returns a file for an image "path". This path can be either the full name given (assuming it has an extension like ".png") or the first version of that with the extension ".png", ".jpeg", ".jpg", or ".gif" (in that order). Returns null if none.


partnerLogo

public static java.awt.Image partnerLogo()
Returns a handy partner logo.


smallPartnerLogo

public static java.awt.Image smallPartnerLogo()
Returns a handy small partner logo.


translucentDot

public static java.awt.Image translucentDot()
Returns a (handy?) translucent dot.


clientLogo

public static java.awt.Image clientLogo()
Returns a client logo if it exists, otherwise defaults to the Partner logo. Client logo lives in Shared/resources/icons/ClientLogo.*.


questionMark

public static java.awt.Image questionMark()
Returns a handy question mark - usually used to indicate loading errors for icons..


fetchImage

public static java.awt.Image fetchImage(java.lang.String path)
Returns a named image from the classpath.


getImage

public static java.awt.Image getImage(java.lang.String path)
Returns an image from the local filesystem.


getUncachedImage

public static java.awt.Image getUncachedImage(java.lang.String path)
Returns an image from the local filesystem (no caching is done).


createInfoLabel

public static javax.swing.JLabel createInfoLabel(java.lang.String label)
Gives you a standard information label.


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)

createFieldLabelWithColor

public static javax.swing.JLabel createFieldLabelWithColor(java.lang.String label,
                                                           java.awt.Color color)
Gives you a standard field label with color provided.


createFieldLabel

public static javax.swing.JLabel createFieldLabel(java.lang.String label)
Gives you a standard field label.


createBigLabel

public static javax.swing.JLabel createBigLabel(java.lang.String label)
Gives you a standard big label.


createCenteredPanelAround

public static javax.swing.JComponent createCenteredPanelAround(java.awt.Component component)
Gives you a fresh panel with the provided component nicely centered in the middle.


createDimensionDefaultToScreenSize

public static java.awt.Dimension createDimensionDefaultToScreenSize(int width,
                                                                    int height)
Returns a dimension object for the given width and height, or, if either is null, returns the dimension of the screen instead.


setDefaultWindowSize

public static void setDefaultWindowSize(int width,
                                        int height)
Sets the default window size.


getDefaultWindowSize

public static java.awt.Dimension getDefaultWindowSize()
Gets the default window size.


penBased

public static boolean penBased()
pen based?


setPenBased

public static void setPenBased(boolean newValue)

forceLoadImage

public static void forceLoadImage(java.awt.Image imagineAllThePeople)

setDefaultRenderingHints

public static void setDefaultRenderingHints(java.awt.Graphics g)

setRenderingHintsForHighestSpeed

public static void setRenderingHintsForHighestSpeed(java.awt.Graphics g)

setRenderingHintsForHighestQuality

public static void setRenderingHintsForHighestQuality(java.awt.Graphics g)

setRenderingHintsForPrinting

public static void setRenderingHintsForPrinting(java.awt.Graphics g)

setRenderingHintsForInvertedPrinting

public static void setRenderingHintsForInvertedPrinting(java.awt.Graphics g)

loadConfig

public static void loadConfig()

getDefaultFont

public static java.awt.Font getDefaultFont()

getBigFont

public static java.awt.Font getBigFont()

getFinePrintFont

public static java.awt.Font getFinePrintFont()

getHiliteColor

public static java.awt.Color getHiliteColor()

getIndicatorColor

public static java.awt.Color getIndicatorColor()

getHiliteStroke

public static java.awt.Stroke getHiliteStroke()

getIndicatorStroke

public static java.awt.Stroke getIndicatorStroke()

setGraphicsForIndication

public static void setGraphicsForIndication(java.awt.Graphics g)

setGraphicsForHilite

public static void setGraphicsForHilite(java.awt.Graphics g)

rejectLine

public static final boolean rejectLine(int width,
                                       int height,
                                       int x1,
                                       int y1,
                                       int x2,
                                       int y2)
Eliminates trivial-rejectable lines.