net.sourceforge.spedit.core
Class Styleable.Utils
java.lang.Object
|
+--net.sourceforge.spedit.core.Styleable.Utils
- Enclosing class:
- Styleable
- public static class Styleable.Utils
- extends Object
Method Summary |
protected static int |
fromHexa(String s)
|
static int |
identify(String string)
Identifies the given string, telling what kind of content it holds
(either COLOR, PIXEL, POINT or UNKNOWN) |
static Color |
parseColor(String string)
Parses the given string and returns the corresponding color. |
static long |
parsePixel(String string)
|
static double |
parsePoint(String string)
|
static String[] |
splitStyle(String style)
Takes a property style name, like block.border.type
and will return an array of string composed of the different
groups. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
COLOR
public static final int COLOR
PIXEL
public static final int PIXEL
POINT
public static final int POINT
UNKNOWN
public static final int UNKNOWN
Styleable.Utils
public Styleable.Utils()
identify
public static int identify(String string)
- Identifies the given string, telling what kind of content it holds
(either COLOR, PIXEL, POINT or UNKNOWN)
parseColor
public static Color parseColor(String string)
- Parses the given string and returns the corresponding color. The
string must match the RCOLOR regular expression.
- Parameters:
string
- represents the string in the following
form: #RRGGBB
or #RRGGBBAA
in case you
want an alpha channel.
fromHexa
protected static int fromHexa(String s)
parsePoint
public static double parsePoint(String string)
parsePixel
public static long parsePixel(String string)
splitStyle
public static String[] splitStyle(String style)
- Takes a property style name, like
block.border.type
and will return an array of string composed of the different
groups. In this case the result will be ["block", "border",
"type"].