|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.xoetrope.swing.deploy.XSystemTrayManager
public class XSystemTrayManager
A manager class for tray actions. When a system tray icon is added the application can choose to stay resident in memory after the main window has been closed by setting the ExitOnClose startup property to false. The advantage of doing this is that the data model does not need to be reinitialized if the main window is just being redisplayed.
The tray icon provides two menu items, one to open the window and the second to close the window and exit the JVM.
This version of the class uses the SwingLabs version of the tray support and is therefore limited to Swing. If JDK 6 or later is being used then the JVM's tray support could be used for non Swing applications
If the application is launched via JavaWebStart then the XSystemTrayManager is installed as a singleton and each subsequent invocation via JWS will cause a new activation. If the application has set an "ActivationObject" via the project.setObject( "ActivationObject", XActivation ) then the XActivation.activate method is invoked and the appliction can check the startup properties and perform the appropriate action.
Copyright (c) Xoetrope Ltd., 2001-2007, see license.txt for details
| Method Summary | |
|---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
Relaunch the application |
static XSystemTrayManager |
getInstance(XProject project)
|
void |
newActivation(java.lang.String[] args)
Specified by the JNLP SingleInstanceListener interface. |
void |
setStripSplashArgument(boolean state)
Set a flag to strip the extra argument added when a splash screen is used at startup. |
void |
showActivationEvent()
Invoke any registered activation event |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static XSystemTrayManager getInstance(XProject project)
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed in interface java.awt.event.ActionListenerpublic void newActivation(java.lang.String[] args)
newActivation in interface javax.jnlp.SingleInstanceListenerargs - The command line parameters used for this invocationpublic void setStripSplashArgument(boolean state)
state - true to strip the first argumentpublic void showActivationEvent()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||