|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.anthonyeden.lib.Application
This class provides basic services which all applications may find useful. The services include location or creation of the home directory, installation of additional look and feels, and a mutable map of application attributes.
Constructor Summary | |
Application(java.lang.String appName)
Construct an application with the given name. |
Method Summary | |
void |
addWindow(java.awt.Component window)
Add a window to the list of window objects. |
void |
clearAttributes()
Clear all attributes. |
java.lang.Object |
getAttribute(java.lang.Object key)
Get the attribute for the specified key. |
java.util.Iterator |
getAttributeKeys()
Return an Iterator for all attribute keys. |
java.io.File |
getHomeDirectory()
Get the current user's home directory. |
static Application |
getInstance(java.lang.String appName)
Get a instance of an Application object for the named application. |
org.apache.commons.vfs.FileObject |
getVFSHomeDirectory()
Get the current user's virtual home directory. |
java.util.List |
getWindows()
Get a list of open window objects. |
void |
initialize(java.lang.String[] args)
Initialize the application using the given command line arguments. |
java.lang.Object |
removeAttribute(java.lang.Object key)
Remove the specified attribute. |
void |
removeWindow(java.awt.Component window)
Remove a window from the list of window objects. |
void |
setAttribute(java.lang.Object key,
java.lang.Object value)
Set the attribute. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Application(java.lang.String appName)
appName
- The name of the applicationMethod Detail |
public static Application getInstance(java.lang.String appName)
public java.io.File getHomeDirectory()
public org.apache.commons.vfs.FileObject getVFSHomeDirectory() throws org.apache.commons.vfs.FileSystemException
org.apache.commons.vfs.FileSystemException
public void initialize(java.lang.String[] args)
args
- The command line argumentspublic java.util.List getWindows()
public void addWindow(java.awt.Component window)
window
- The windowpublic void removeWindow(java.awt.Component window)
window
- The windowpublic java.lang.Object getAttribute(java.lang.Object key)
key
- The attribute key
public void setAttribute(java.lang.Object key, java.lang.Object value)
key
- The attribute keyvalue
- The attribute valuepublic java.util.Iterator getAttributeKeys()
public java.lang.Object removeAttribute(java.lang.Object key)
key
- The attribute key
public void clearAttributes()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |