|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.clackrouter.jgraph.utils.Utilities
public final class Utilities
Utility methods. A utility method is characterized as a method which is of general utility and is not specific to JGraphpad or JGraph. For example, this would include things like generic sorting algorithms, parsing routines, standard error handling methods, etc. It is important that this code be optimized, and secondly you should be concerned about not reinventing the wheel...before adding content here you should try and find another open source project that already implements said functionality in a robust manner. A good place to look is: Apache/Jakarta Commons. There are many methods commented out in this class as many of these methods were imported from different projects but not yet currently used. Please take a look here first to see if anything that you need has already been implemented.
Method Summary | |
---|---|
static void |
center(java.awt.Window frame)
|
static boolean |
createDirectoryRecursively(java.io.File f)
Create a directory, plus all parent directories necessary to contain it. |
static java.lang.String |
getClassNameWithoutPackage(java.lang.Class cl)
Returns the classname without the package. |
static float[] |
parsePattern(java.lang.String pattern)
parses the pattern and tries to parse each token as a float. |
static java.util.Properties |
readPropertiesFromFile(java.awt.Frame parentFrame,
java.io.File file)
|
static java.util.Properties |
readPropertiesFromFile(java.awt.Frame parentFrame,
java.lang.String fileName)
|
static java.util.Properties |
readPropertiesFromFile(java.lang.String fileName)
|
static int |
rnd(int max)
Returns a random number between 0 and max. |
static java.lang.String[] |
tokenize(java.lang.String input)
Take the given string and chop it up into a series of strings on whitespace boundries. |
static java.lang.String[] |
tokenize(java.lang.String input,
java.lang.String delim)
|
static void |
writePropertiesToFile(java.awt.Frame parentFrame,
java.util.Properties properties,
java.io.File file,
java.lang.String fileHeader)
|
static void |
writePropertiesToFile(java.awt.Frame parentFrame,
java.util.Properties properties,
java.lang.String fileName,
java.lang.String fileHeader)
|
static void |
writePropertiesToFile(java.util.Properties properties,
java.lang.String fileName,
java.lang.String fileHeader)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static java.lang.String[] tokenize(java.lang.String input)
public static java.lang.String[] tokenize(java.lang.String input, java.lang.String delim)
public static int rnd(int max)
public static float[] parsePattern(java.lang.String pattern)
public static java.lang.String getClassNameWithoutPackage(java.lang.Class cl)
cl
- The class to inspect
public static void center(java.awt.Window frame)
public static boolean createDirectoryRecursively(java.io.File f)
f
- Directory path to create.
public static final java.util.Properties readPropertiesFromFile(java.awt.Frame parentFrame, java.io.File file)
public static final java.util.Properties readPropertiesFromFile(java.awt.Frame parentFrame, java.lang.String fileName)
public static final java.util.Properties readPropertiesFromFile(java.lang.String fileName) throws java.io.IOException, java.lang.Exception
java.io.IOException
java.lang.Exception
public static final void writePropertiesToFile(java.awt.Frame parentFrame, java.util.Properties properties, java.io.File file, java.lang.String fileHeader)
public static final void writePropertiesToFile(java.awt.Frame parentFrame, java.util.Properties properties, java.lang.String fileName, java.lang.String fileHeader)
public static final void writePropertiesToFile(java.util.Properties properties, java.lang.String fileName, java.lang.String fileHeader) throws java.io.IOException, java.lang.Exception
java.io.IOException
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |