|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.xoetrope.xui.helper.XuiUtilities
public class XuiUtilities
A collection of utilities for use with XUI
Copyright (c) Xoetrope Ltd., 2002-2004
$Revision: 2.15 $
License: see License.txt
| Constructor Summary | |
|---|---|
XuiUtilities()
|
|
| Method Summary | |
|---|---|
static void |
applyStyle(XProject currentProject,
java.lang.Object comp,
java.lang.String styleName)
Apply a style to a component |
static void |
centerOnScreen(java.awt.Container dialog)
Center a dialog on the screen. |
static java.lang.String |
colorToHexString(java.awt.Color c)
Convert a color to a hexadecimal string e.g. |
static int |
count(java.lang.String source,
char match)
Count the instances of a character in a string |
static int |
count(java.lang.String source,
char match,
char openingToken,
char endingToken)
Count the instances of a character in a string, skipping nested expressions delimited by the specified tokens |
static java.lang.String |
exec(java.lang.String[] commandArray)
Exec a process and output the error and output streams to the console |
static void |
getArguments(java.lang.String argString,
java.lang.Class[] argTypes,
java.lang.Object[] argValues,
char separator)
Get the argument types and values from an argument string |
static void |
getArguments(java.lang.String argString,
java.lang.Class[] argTypes,
java.lang.Object[] argValues,
char separator,
char openingToken,
char endingToken)
Get the argument types and values from an argument string, skipping nested expressions delimited by the specified tokens |
static java.awt.Point |
getMaxCoordinates(java.awt.Container cont)
Get the maximum x and y coordinates of the children |
static int |
getMinorVersion()
Get the minor version of the runtime Java platform |
static java.lang.String |
getRegistryEntry(java.lang.String key)
|
static int |
indexOfMatchingEnding(java.lang.String s,
char openingToken,
char endingToken,
int startPos)
Find the index of the matching token, taking into account any nested pairs |
static void |
invokeAndWait(java.lang.Runnable r)
Invoke the SwingUtilities invokeAndWait method via reflection. |
static void |
invokeLater(java.lang.Runnable r)
Invoke the SwingUtilities invokeLater method via reflection. |
static java.lang.String |
replace(java.lang.String srcValue,
java.lang.String pattern,
java.lang.String replacement)
Replace all the occurances of one string with another |
static java.lang.String |
translate(XProject currentProject,
java.lang.String key)
Translate a key to the current language |
static java.awt.Color |
unsaturateColor(java.awt.Color color,
int percentage)
Get an unsaturated version of a color |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XuiUtilities()
| Method Detail |
|---|
public static int count(java.lang.String source,
char match)
source - the source stringmatch - the character to match
public static int count(java.lang.String source,
char match,
char openingToken,
char endingToken)
source - the source stringmatch - the character to matchendingToken - the ending tokenopeningToken - the opening token
public static void centerOnScreen(java.awt.Container dialog)
dialog - the dialog window you want to centerpublic static void invokeLater(java.lang.Runnable r)
r - the runnable to be passed to the SwingUtilities methodpublic static void invokeAndWait(java.lang.Runnable r)
r - the runnable to be passed to the SwingUtilities method
public static java.lang.String translate(XProject currentProject,
java.lang.String key)
key - the language key
public static java.awt.Color unsaturateColor(java.awt.Color color,
int percentage)
color - the original colorpercentage - the percentage of the original color saturation to return
public static void getArguments(java.lang.String argString,
java.lang.Class[] argTypes,
java.lang.Object[] argValues,
char separator)
argString - the raw argument string e.g. foo,bar,12argTypes - the argument class names - for the above example java.lang.String,java.lang.String,java.lang.intargValues - the argument values - for the above example "foo", "bar", 12separator - the argument seperator
public static void getArguments(java.lang.String argString,
java.lang.Class[] argTypes,
java.lang.Object[] argValues,
char separator,
char openingToken,
char endingToken)
argString - the raw argument string e.g. foo,bar,12argTypes - the argument class names - for the above example java.lang.String,java.lang.String,java.lang.intargValues - the argument values - for the above example "foo", "bar", 12separator - the argument seperatorendingToken - the ending tokenopeningToken - the opening token
public static void applyStyle(XProject currentProject,
java.lang.Object comp,
java.lang.String styleName)
comp - the componentstyleName - the style to lookuppublic static int getMinorVersion()
public static int indexOfMatchingEnding(java.lang.String s,
char openingToken,
char endingToken,
int startPos)
s - the string to searchendingToken - the ending tokenopeningToken - the opening token
public static java.lang.String replace(java.lang.String srcValue,
java.lang.String pattern,
java.lang.String replacement)
srcValue - the source stringpattern - the pattern to locatereplacement - the replacement text
public static java.lang.String exec(java.lang.String[] commandArray)
commandArray - the command and arguments
public static java.lang.String getRegistryEntry(java.lang.String key)
public static java.awt.Point getMaxCoordinates(java.awt.Container cont)
cont - the container whose children will be examined
public static java.lang.String colorToHexString(java.awt.Color c)
c - the color to convert
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||