|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.brains2b.util.GuiHelper
Static help function for GUI related items
Method Summary | |
static java.awt.Dimension |
decodeDimension(java.lang.String dim)
|
static java.lang.String |
encodeDimension(java.awt.Dimension d)
|
static int |
getWidth(java.lang.String str)
Calculates Width in pixels on the basis of String The default font from a Swing component is used get the necessary metrics. |
static int |
getWidth(java.lang.String str,
int width)
Calculates the width in pixels of a given string and return the longer of the string length or the given width. |
static boolean |
isColor(java.lang.String value)
check if a value supplied as a String contains the information to be used as a Color |
static boolean |
isFont(java.lang.String value)
check if a value supplied as a String contains the information to be used as a Font |
static java.awt.Rectangle |
setMiddle(java.awt.Rectangle target,
java.awt.Rectangle source)
Calculates Middle for a target from a source |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static java.awt.Rectangle setMiddle(java.awt.Rectangle target, java.awt.Rectangle source)
target
- java.awt.Rectanglesource
- java.awt.Rectangle
java.lang.IllegalArgumentException
- if either source or target is nullpublic static final java.awt.Dimension decodeDimension(java.lang.String dim)
public static final java.lang.String encodeDimension(java.awt.Dimension d)
public static int getWidth(java.lang.String str)
str
- Stringpublic static int getWidth(java.lang.String str, int width)
str
- Stringpublic static boolean isColor(java.lang.String value)
value
- String, the value to be used as Color
public static boolean isFont(java.lang.String value)
value
- String, the value to be used as Font
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |