| java.lang.Object org.jicengine.util.StringConverter
StringConverter | public class StringConverter (Code) | |
Converts various kinds of String values to corresponding Java objects.
author: timo laitinen |
Method Summary | |
public static Color | toColor(String colorSpec) | public static Dimension | toDimension(String spec) Parameters: spec - String in format width x height ,where width and height are integers. | public static Locale | toLocale(String spec) Parameters: spec - String in format language_country or language_country_variant ,where language , country and variant are specified by java.util.Locale class. | public static Point | toPoint(String spec) Parameters: spec - String in format (x,y) , where x andy are integers. |
toColor | public static Color toColor(String colorSpec) throws IllegalArgumentException(Code) | |
Accepts 4 different kinds of values:
- RGB-value as hexadecimals:
0099FF , etc.
- RGB-value as integers in range 0-255:
0,127,255 , etc.
- RGBa-value as hexadecimals:
0099FF66 , etc.
- RGBa-value as integers in range 0-255:
0,127,255,90 , etc.
Parameters: colorSpec - String Color throws: IllegalArgumentException - |
|
|