All Packages Class Hierarchy This Package Previous Next Index
Class oracle.forms.demos.Utils
java.lang.Object
|
+----oracle.forms.demos.Utils
- public class Utils
- extends Object
Oracle Forms Server 6i PJC Example
This class provides a series of common methods that are used by different
demonstration PJCs. It provides common functions such as debugging messages, type conversion
for common type mappings and the creation of URLs.
This public methods in this class are static so the class does not need to be instantiated,
the methods can just be invoked on the class itself.
- Version:
- 1.05 09/03/1999 added createURL method
1.0 08/18/1999 created
- Author:
- Steve Button (sbutton@oracle.com)
-
Utils()
-
-
createURL(String)
- Create a URL based on a given resource name.
-
debug(String, String)
- Writes a debug message to the screen in the format of
[CLASSNAME] : debugging message
if the debug status for the class is enabled.
-
getColorFromRGBString(String)
- Create and return a color object derived from RGB values in a string.
-
getColorFromRGBString(String, Color)
- Create a color object from the RGB values in a string
value representation of a color to a Color object.
-
getColorFromString(String)
- Uses the default colors defined in Color to map a
string value representation of a color to a Color object.
-
getColorFromString(String, Color)
- Use the default colors defined in Color to map a
string value representation of a color to a Color object.
-
setDebug(String, boolean)
- Set the debugging status for a class identified as cls.
Utils
public Utils()
setDebug
public static void setDebug(String cls,
boolean value)
- Set the debugging status for a class identified as cls.
- Parameters:
- cls - the name of the class
- value - the debugging status
debug
public static void debug(String cls,
String msg)
- Writes a debug message to the screen in the format of
[CLASSNAME] : debugging message
if the debug status for the class is enabled. The debug messages will
be written if the class has the debug status set to true.
- Parameters:
- cls - the name of the class
getColorFromString
public static Color getColorFromString(String color)
- Uses the default colors defined in Color to map a
string value representation of a color to a Color object.
Defaults to returning Color.white if the color can't be mapped.
- Parameters:
- color - the string representation of the color
- Returns:
- Color object that matches the color specified in the string
getColorFromString
public static Color getColorFromString(String color,
Color def)
- Use the default colors defined in Color to map a
string value representation of a color to a Color object.
- Parameters:
- color - the string representation of the color
- def - the color that should be returned if no match is found
- Returns:
- Color object that matches the color specified in the string
getColorFromRGBString
public static Color getColorFromRGBString(String color)
- Create and return a color object derived from RGB values in a string.
Will return Color.red in the case where the string is incorrect
or a color could not be created from the input string.
- Parameters:
- color - the string representation of the color
- def - the default color to return in case of a screwup
- Returns:
- Color object that matches the color specified in the string
getColorFromRGBString
public static Color getColorFromRGBString(String color,
Color def)
- Create a color object from the RGB values in a string
value representation of a color to a Color object.
- Parameters:
- color - the string representation of the color
- def - the default color to return in case of a screwup
- Returns:
- Color object that matches the color specified in the string
createURL
public static URL createURL(String fileName)
- Create a URL based on a given resource name. Firstly a network URL will attempt
to be created and failing that, a file based URL will be created.
- Parameters:
- fileName - the resource to use for the URL
- Returns:
- URL a URL that maps to the given resource
All Packages Class Hierarchy This Package Previous Next Index