org.kaboum.util
Class KaboumUtil

java.lang.Object
  extended by org.kaboum.util.KaboumUtil

public class KaboumUtil
extends java.lang.Object

Static methods for Kaboum applet

Author:
Jérome Gasperi aka jrom

Field Summary
static int INTERSECTION_WITH_UNION
          CONSTANTS
static int INTERSECTION_WITHOUT_UNION
           
 
Constructor Summary
KaboumUtil()
           
 
Method Summary
static void debug(java.lang.String log)
          Debug method
static java.awt.Color getColorParameter(java.lang.String s, java.awt.Color color)
          Eval a color value from a r,g,b triplet or from a pre-defined color (From mapplet code source by Stephen Lime)
static boolean getDebugMode()
          Get the debug mode
static java.lang.String getFontName(java.lang.String s)
          Eval the font name
static int getFontStyle(java.lang.String s)
          Return the font style corresponding integer
static void setDebugMode(boolean b)
          Set the debug mode
static boolean stob(java.lang.String s)
          Convert boolean string into boolean
static boolean stob(java.lang.String s, boolean d)
          Convert boolean string into boolean
static double stod(java.lang.String s)
          Convert numerical string into double
static double stod(java.lang.String s, double d)
          Convert numerical string into double
static float stof(java.lang.String s)
          Convert numerical string into float
static float stof(java.lang.String s, float d)
          Convert numerical string into float
static int stoi(java.lang.String s)
          Convert numerical string into integer
static int stoi(java.lang.String s, int d)
          Convert numerical string into integer
static java.net.URL toURL(java.lang.String strName)
          Convert string into URL
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INTERSECTION_WITH_UNION

public static final int INTERSECTION_WITH_UNION
CONSTANTS

See Also:
Constant Field Values

INTERSECTION_WITHOUT_UNION

public static final int INTERSECTION_WITHOUT_UNION
See Also:
Constant Field Values
Constructor Detail

KaboumUtil

public KaboumUtil()
Method Detail

setDebugMode

public static void setDebugMode(boolean b)
Set the debug mode


getDebugMode

public static boolean getDebugMode()
Get the debug mode


debug

public static void debug(java.lang.String log)
Debug method


getColorParameter

public static java.awt.Color getColorParameter(java.lang.String s,
                                               java.awt.Color color)
Eval a color value from a r,g,b triplet or from a pre-defined color (From mapplet code source by Stephen Lime)

Parameters:
s - Input string
Color - Default color to return

getFontName

public static java.lang.String getFontName(java.lang.String s)
Eval the font name

Parameters:
s - Input font name

getFontStyle

public static int getFontStyle(java.lang.String s)
Return the font style corresponding integer


stoi

public static int stoi(java.lang.String s,
                       int d)
Convert numerical string into integer

Parameters:
s - Input string
d - Default value

stoi

public static int stoi(java.lang.String s)
Convert numerical string into integer

Parameters:
s - Input string

stof

public static float stof(java.lang.String s,
                         float d)
Convert numerical string into float

Parameters:
s - Input string
d - Default value

stof

public static float stof(java.lang.String s)
Convert numerical string into float

Parameters:
s - Input string

stod

public static double stod(java.lang.String s,
                          double d)
Convert numerical string into double

Parameters:
s - Input string
d - Default value

stod

public static double stod(java.lang.String s)
Convert numerical string into double

Parameters:
s - Input string

stob

public static boolean stob(java.lang.String s)
Convert boolean string into boolean

Parameters:
s - Input string

stob

public static boolean stob(java.lang.String s,
                           boolean d)
Convert boolean string into boolean

Parameters:
s - Input string
d - Default value

toURL

public static java.net.URL toURL(java.lang.String strName)
Convert string into URL

Parameters:
strName - Input string


Copyright © 2005 Kaboum team. All Rights Reserved.