|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.pnp.xfeature.utils.Decode
public class Decode
Auxiliary class to decode constants used in display models.
| Field Summary | |
|---|---|
static RGB |
FMT_DEFAULTCOLOR
|
| Constructor Summary | |
|---|---|
Decode()
|
|
| Method Summary | |
|---|---|
static boolean |
boolValue(java.lang.String s)
Parses the passed string s provided that it contains a logical value |
static RGB |
colorString(java.lang.String s)
Transforms the passed string s to the RGB triplet provided that s contains either a color name or #-introduced RGB descriptor |
static boolean |
equalColor(Color c1,
Color c2)
Returns true when the two passed colors are equal by means of their RGB values |
static java.lang.String |
fontName(java.lang.String s)
Transforms the passed string s to a valid font name, mainly used to avoid problems when the value is empty and to state what font to use when 'default' is desired |
static int |
fontSize(java.lang.String s)
Transforms the passed string s to an integer to be used as Graphics.* methods parameter describing the font size |
static int |
fontStyle(java.lang.String s)
Transforms the passed string s to an integer to be used as Graphics.* methods parameter describing the font style |
static boolean |
isInteger(java.lang.String s)
Checks whether the passed string s can be converted to a valid integer |
static int |
lineStyle(java.lang.String s)
Transforms the passed string s to an integer to be used as Graphics.* methods parameter describing the line style |
static int |
lineWidth(java.lang.String s)
Transforms the passed string s to an integer to be used as Graphics.* methods parameter describing the line thickness |
static java.lang.String |
positionModifier(java.lang.String s)
Parses the position modifier specifying the layout of graphical sub-elements in the FeatureNodeFigure class |
static int |
size(java.lang.String s)
Transforms the passed string s to an integer to be used as Graphics.* methods parameter describing the font size |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final RGB FMT_DEFAULTCOLOR
| Constructor Detail |
|---|
public Decode()
| Method Detail |
|---|
public static RGB colorString(java.lang.String s)
public static int lineStyle(java.lang.String s)
public static int lineWidth(java.lang.String s)
public static int fontSize(java.lang.String s)
public static int fontStyle(java.lang.String s)
public static java.lang.String fontName(java.lang.String s)
public static boolean isInteger(java.lang.String s)
public static boolean boolValue(java.lang.String s)
public static boolean equalColor(Color c1,
Color c2)
public static java.lang.String positionModifier(java.lang.String s)
public static int size(java.lang.String s)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||