|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jdesktop.swing.Application
Class which represents central state and properties for a single client application which can be either a standalone Java application (typically initiated using Java WebStart) or a set of one or more Java applets which share the same code base. There should only be a single Application instance per client application.
This class also encapsulates any functionality which has variable API between applets and Java WebStart applications so that UI components can reliably talk to a single interface for such services.
| Constructor Summary | |
Application()
|
|
| Method Summary | |
void |
addSelectionListener(SelectionListener l)
|
ActionManager |
getActionManager()
Return the action manager for this application. |
ActionMap |
getActionMap()
Return the action map associated with this application. |
static Application |
getApp(Component c)
Convenience method for getting the JDNCapp instance given a component instance. |
Iterator |
getApplets()
|
URL |
getBaseURL()
|
static URL |
getBaseURL(Object obj)
Will retrieve the applet base url if this application is running in an applet. |
static Icon |
getIcon(String name,
Object obj)
|
static Image |
getImage(String name,
Object obj)
|
static Application |
getInstance()
Private constructor so that an Application can't be directly instantated. |
static Application |
getInstance(Object key)
Factory method for obtaining the Application instance associated with the application designated by the specified key. |
SelectionListener[] |
getSelectionListeners()
|
Image |
getSplashImage()
|
String |
getTitle()
|
Image |
getTitleBarImage()
|
static URL |
getURL(String value,
Object obj)
Fetches a url of a resource value using the clasloader and relative path of obj. |
static URL |
getURLResource(String value,
Object obj)
|
String |
getVersionString()
|
Iterator |
getWindows()
|
boolean |
isRunningInSandbox()
|
boolean |
isStandalone()
Returns true if running as a standalone application and
returns false if running ne or more applets. |
void |
registerApplet(Applet applet)
|
void |
registerWindow(Window window)
Registers a window with the application instance. |
void |
removeSelectionListener(SelectionListener l)
|
void |
setBaseURL(URL baseURL)
Sets the "baseURL" property of this application. |
void |
setSplashImage(Image splashImage)
Sets the "splashImage" property of this application. |
void |
setTitle(String title)
Sets the "title" property of this application. |
void |
setTitleBarImage(Image titleBarImage)
Sets the "titleBarImage" property of this application. |
void |
setVersionString(String versionString)
Sets the "versionString" property of this application. |
void |
showDocument(URL url,
String target)
Shows the URL at the target. |
void |
unregisterApplet(Applet applet)
|
void |
unregisterWindow(Window window)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Application()
| Method Detail |
public static Application getInstance()
public static Application getInstance(Object key)
key - object designating the application
public static Application getApp(Component c)
c - the ui component
public ActionManager getActionManager()
public void setBaseURL(URL baseURL)
baseURL - URL of codebase for this applicationpublic URL getBaseURL()
public static URL getBaseURL(Object obj)
public static URL getURL(String value,
Object obj)
public static URL getURLResource(String value,
Object obj)
public static Image getImage(String name,
Object obj)
public static Icon getIcon(String name,
Object obj)
public void showDocument(URL url,
String target)
public void setSplashImage(Image splashImage)
splashImage - image displayed in the application's splash screenpublic Image getSplashImage()
public void setTitle(String title)
title - string containing the title of this applicationpublic String getTitle()
public void setTitleBarImage(Image titleBarImage)
titleBarImage - image displayed in titlebar of application's toplevel windowspublic Image getTitleBarImage()
public void setVersionString(String versionString)
versionString - string containing the version of this applicationpublic String getVersionString()
public boolean isStandalone()
true if running as a standalone application and
returns false if running ne or more applets.
public boolean isRunningInSandbox()
public void registerWindow(Window window)
public void unregisterWindow(Window window)
public void registerApplet(Applet applet)
public void unregisterApplet(Applet applet)
public ActionMap getActionMap()
public Iterator getApplets()
public Iterator getWindows()
public void addSelectionListener(SelectionListener l)
public void removeSelectionListener(SelectionListener l)
public SelectionListener[] getSelectionListeners()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||