Package org.faceless.pdf2.viewer2.util
Class PropertyParser
- java.lang.Object
-
- org.faceless.pdf2.viewer2.util.PropertyParser
-
public class PropertyParser extends Object
A Utility class for parsing particular Strings into particular types of object. Used primarily with preferences and user options.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Color
getColor(String text, Color def)
Convert the specified string into aColor
static int
getHighlightType(String text, int def)
Convert the specified string into a highlight (egTextSelection.TYPE_BLOCK
)static float
getMargin(String text, float def)
Convert the specified string into a margin;static Paint
getPaint(String text, Paint def)
Convert the specified string into aPaint
static Stroke
getStroke(String text, Stroke def)
Convert the specified string into aStroke
-
-
-
Method Detail
-
getPaint
public static Paint getPaint(String text, Paint def)
Convert the specified string into aPaint
- Parameters:
text
- the stringdef
- the default value
-
getColor
public static Color getColor(String text, Color def)
Convert the specified string into aColor
- Parameters:
text
- the stringdef
- the default value
-
getHighlightType
public static int getHighlightType(String text, int def)
Convert the specified string into a highlight (egTextSelection.TYPE_BLOCK
)- Parameters:
text
- the stringdef
- the default value
-
getStroke
public static Stroke getStroke(String text, Stroke def)
Convert the specified string into aStroke
- Parameters:
text
- the stringdef
- the default value
-
getMargin
public static float getMargin(String text, float def)
Convert the specified string into a margin;- Parameters:
text
- the stringdef
- the default value
-
-