lt.monarch.chart.util
Class ParseUtil

java.lang.Object
  extended by lt.monarch.chart.util.ParseUtil

public class ParseUtil
extends java.lang.Object


Constructor Summary
Constructor and Description
ParseUtil()
           
 
Method Summary
Modifier and Type Method and Description
static java.lang.String getColor(java.awt.Color color)
          Converts color object to hexadecimal string defining the color
static java.awt.Color getColor(java.lang.String colorString)
           
static java.lang.String getFillStyle(PaintMode fillStyle)
          Gets toFill style from int to string
static java.lang.Object[] getInterval(java.lang.String string)
           
static java.lang.String getStyle(int style)
          Gets the font style from integer to string
static int getStyle(java.lang.String style)
          Converts font style from string to integer
static boolean isSmaller(java.lang.Object o1, java.lang.Object o2)
          Compares if first operand is smaller than the second
static boolean parseBoolean(java.lang.String value)
           
static double parseDouble(java.lang.String doublenumber)
           
static float parseFloat(java.lang.String doublenumber)
           
static int parseInteger(java.lang.String integernumber)
           
static int parseInteger(java.lang.String integernumber, int defaultValue)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParseUtil

public ParseUtil()
Method Detail

getColor

public static java.awt.Color getColor(java.lang.String colorString)
Parameters:
colorString -
Returns:
color

parseDouble

public static double parseDouble(java.lang.String doublenumber)

parseFloat

public static float parseFloat(java.lang.String doublenumber)

parseInteger

public static int parseInteger(java.lang.String integernumber)

parseInteger

public static int parseInteger(java.lang.String integernumber,
                               int defaultValue)

parseBoolean

public static boolean parseBoolean(java.lang.String value)

getInterval

public static java.lang.Object[] getInterval(java.lang.String string)

getStyle

public static int getStyle(java.lang.String style)
Converts font style from string to integer

Parameters:
style - font style as string
Returns:
font style as integer

getStyle

public static java.lang.String getStyle(int style)
Gets the font style from integer to string

Parameters:
style - Font style as integer
Returns:
font style as string

getColor

public static java.lang.String getColor(java.awt.Color color)
Converts color object to hexadecimal string defining the color

Parameters:
color - Color object
Returns:
hexadecimal string defining the color

getFillStyle

public static java.lang.String getFillStyle(PaintMode fillStyle)
Gets toFill style from int to string

Parameters:
fillStyle - Fill style as integer
Returns:
Fill style as String

isSmaller

public static boolean isSmaller(java.lang.Object o1,
                                java.lang.Object o2)
Compares if first operand is smaller than the second

Parameters:
o1 - first operand to compare
o2 - second operand to compare
Returns:
true if o1 < o2