Home >> All >> org >> dinopolis >> [ util Javadoc ] |
org.dinopolis.util: Javadoc index of package org.dinopolis.util.
Package Samples:
org.dinopolis.util.gui.property_editor
org.dinopolis.util.gui
org.dinopolis.util.debug
org.dinopolis.util.io
org.dinopolis.util.servicediscovery
org.dinopolis.util.resource
org.dinopolis.util.commandarguments
Classes:
Debug: Debug helps the programmer to print various debug messages. This class is a frontend to the org.dinopolis.util.debug.Debug class. Its only purpose is to ease the use of the mentioned class. All methods in this class are static so the usage simply is Debug.methodName(arguments) . No instance must be handed from one class to the other. Debug Levels The Debug class provides the possibility to print debug messages depending on the debug level. There is a status for a given debug level that indicates if messages for this level should be put out or not. This status can be requested from the debug class. ...
Tokenizer: This tokenizer merges the benefits of the java.lang.StringTokenizer class and the java.io.StreamTokenizer class. It provides a low level and a high level interface to the tokenizer. The low level interface consists of the method pair nextToken() and getWord(), where the first returns the type of token in the parsing process, and the latter returns the String element itself. The high level interface consists of the methods hasNextLine() and nextLine(). They use the low level interface to parse the data line by line and create a list of strings from it. It is unsure, if it is wise to mix the usage ...
AbstractResources: AbstractResources represents an abstract, base class that may be userd by Other Resources implementations. Stored resources can not only be requested as Strings , but also in many different other types, like integers , StringArrays , booleans , Colors , Icons and others. Resource entries contain key/value pairs. The keys uniquely identify a specific object in the bundle. Here's an example resource that contains two key/value pairs: my_app.dimension.width=300 my_app.dimension.height=200 Keys are always String s. In this example, the keys are my_app.dimension.width and my_app.dimension.height . In ...
Resources: This Interface is used to access any Resources. Resources may be given in a file, database, memory or wherever. Resources may also be locale-specific. (see java.util.ResourceBundle for further details.) Stored resources can not only be requested as Strings , but also in many different other types, like integers , StringArrays , booleans , Colors , Icons and others. When your program needs a specific object, it loads the ResourceManager class using one of the getResources methods: Resources my_resources = ResourceManager.getResources(this, "MyResources"); If a lookup fails, getBundle() throws a ...
FileResources: This class provides the functionality to read resources from a system or user resource file. The way that this is done is: It looks for a resource file within the users home directory and if a proper file is found, it looks for the specific proporty. If no file or the specific property was not found, the system resource file is being asked for the property. Stored resources can not only be requested as Strings , but also in many different other types, like integers , StringArrays , booleans , Colors , Icons and others. Resource files contain key/value pairs. The keys uniquely identify a locale-specific ...
CommandArguments: CommandArguments takes care of command line arguments and options. It checks, if arguments are valid and simplifies checking, if an argument is set or not. There are two different kinds of arguments: those starting with one or two minus(es) ('-', '--') (called options here) and those without. The first type is used to set options, those without are 'real' arguments. There are short and long options. Short options are only one character long and need to be prefixed by a single minus ( '-' ). When they are parsed, it makes no difference, if they are written separately or all in one: e.g. -dfl is ...
ServiceDiscovery: Implement the JDK1.3 'Service Provider' specification. ( http://java.sun.com/j2se/1.3/docs/guide/jar/jar.html ) The caller will first configure the discoverer by adding (in the desired order) all the places to look for the META-INF/services. Currently we support loaders. The directory META-INF/services contains the following information: for every service a file exists that is named like the service interface/class/abstract class. This files contains names of classes that implement this interface or extend this class/abstract class. The findServices() method will check every class loader for the ...
PrintUtilities: A simple utility class that lets you very simply print an arbitrary component. Just pass the component to the PrintUtilities.printComponent. The component you want to print doesn't need a print method and doesn't have to implement any interface or do anything special at all. If you are going to be printing many times, it is marginally more efficient to first do the following: PrintUtilities printHelper = new PrintUtilities(theComponent); then later do printHelper.print(). But this is a very tiny difference, so in most cases just do the simpler PrintUtilities.printComponent(componentToBePrinted). ...
Debug: Debug helps the programmer to print various debug messages. If this class is only used by the getInstance 55 method, it can be used as a singleton. So the instance of this class must not known everywhere in the source code. An easier way to use it, is the usage of the class org.dinopolis.util.Debug which is a static frontend for this class. For a detailed description of the Debug class see the javadoc of org.dinopolis.util.Debug .
RepositoryClassLoader: ClassLoader that allows to add all jar files in one or more repositories (directories). Additionally, a specific directory or a jar file can be added. This behavior allows to search in directories for jars even if they are not in the classpath (e.g. for plugin functionality). Usage: create an instance of this classloader, add the repositories and urls the classloader should look for and call the loadClass method: RepositoryClassLoader loader = new RepositoryClassLoader(); loader.addRepository("/home/cdaller/plugins"); SuperPlugin plugin = (SuperPlugin)loader.loadClass("org.dinopolis.plugin.SuperPlugin") ...
LoginDialog: A dialog box that asks for a username and a password. Example: LoginDialog dialog = new LoginDialog(null,"Login","Enter your name/password"); System.out.println("after dialog"); int result = dialog.getValue(); System.out.println("result: "+result); if(result == LoginDialog.CLOSED_OPTION) System.out.println("closed"); else if(result == LoginDialog.CANCEL_OPTION) System.out.println("canceled"); else { System.out.println("username: "+dialog.getUsername()); System.out.println("password: "+dialog.getPassword()); } dialog = null; *
SwingWorker: This is the 3rd version of SwingWorker (also known as SwingWorker 3), an abstract class that you subclass to perform GUI-related work in a dedicated thread. For instructions on using this class, see: http://java.sun.com/docs/books/tutorial/uiswing/misc/threads.html Note that the API changed slightly in the 3rd version: You must now invoke start() on the SwingWorker after creating it.
SelectedButtonActionSynchronizer: This class helps to synchronize actions and toggle buttons (like CheckButtonMenuItems, RadioButtonMenuItems, ...). Whenever the button's state changes, the selected state is set into the action (key SELECTED , value Boolean object), or vice versa (if the value SELECTED is set into the action, the button changes its state accordingly).
InvalidCommandArgumentFormatException: CommandInvalidArgumentFormatException is used by CommandArguments to indicate that a given argument has an invalid value. This might be an argument that is declared to have a number as value, but the value is either missing at all or cannot be converted to a number.
DebugMessageFormatObject: This class is the baseclass for all objects responsible for the formatting of the Debug message. As these objects are created by a factory, all subclasses must be named "DebugMessageFORMATSTRING" (formatstring in uppercase).
DebugMessageDIFFMILLISECONDS: This class is chosen by the DebugMessageFactory depending on the token used in the message format. This implementation returns the time difference since the last debug message was printed in milliseconds.
DebugMessageTHREADGROUP: This class is chosen by the DebugMessageFactory depending on the token used in the message format. This implementation returns the name of the threadgroup of the current thread.
DebugMessageTHREAD: This class is chosen by the DebugMessageFactory depending on the token used in the message format. This implementation returns the string representation of the current thread.
DebugMessageMILLISECONDS: This class is chosen by the DebugMessageFactory depending on the token used in the message format. This implementation returns the current time in milliseconds.
DebugMessageTHREADNAME: This class is chosen by the DebugMessageFactory depending on the token used in the message format. This implementation returns the name of the current thread.
SplashScreen: This class is used to visualize a simple splash screen icon for a definable amount of time. Additionally, a progress bar and a status line can be displayed.
DebugMessageMESSAGE: This class is chosen by the DebugMessageFactory depending on the token used in the message format. This implementation returns the debug message itself.
DebugMessageDATE: This class is chosen by the DebugMessageFactory depending on the token used in the message format. This implementation returns the current date/time.
DebugMessageLEVEL: This class is chosen by the DebugMessageFactory depending on the token used in the message format. This implementation returns the debug level.
ActionStore: This class represents a container for arbitrary actions. ActionStores are bound under a unique name and may be requested with this name again.
Home | Contact Us | Privacy Policy | Terms of Service |