Package org.astrogrid.samp.gui
Class SysTray.Java6SysTray
- java.lang.Object
-
- org.astrogrid.samp.gui.SysTray
-
- org.astrogrid.samp.gui.SysTray.Java6SysTray
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.reflect.MethodaddActionListenerMethod_private java.lang.reflect.MethodaddMethod_private java.lang.reflect.MethodremoveMethod_private java.lang.reflect.MethodsetImageAutoSizeMethod_private java.lang.ClasssystemTrayClass_private java.lang.ObjectsystemTrayInstance_private java.lang.ClasstrayIconClass_private java.lang.reflect.ConstructortrayIconConstructor_
-
Constructor Summary
Constructors Constructor Description Java6SysTray()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ObjectaddIcon(java.awt.Image im, java.lang.String tooltip, java.awt.PopupMenu popup, java.awt.event.ActionListener iconListener)Adds an icon to the system tray.booleanisSupported()Indicates whether system tray functionality is available.voidremoveIcon(java.lang.Object trayIcon)Removes a previously-added icon from the tray.-
Methods inherited from class org.astrogrid.samp.gui.SysTray
getInstance
-
-
-
-
Field Detail
-
systemTrayClass_
private final java.lang.Class systemTrayClass_
-
addMethod_
private final java.lang.reflect.Method addMethod_
-
removeMethod_
private final java.lang.reflect.Method removeMethod_
-
trayIconClass_
private final java.lang.Class trayIconClass_
-
trayIconConstructor_
private final java.lang.reflect.Constructor trayIconConstructor_
-
setImageAutoSizeMethod_
private final java.lang.reflect.Method setImageAutoSizeMethod_
-
addActionListenerMethod_
private final java.lang.reflect.Method addActionListenerMethod_
-
systemTrayInstance_
private final java.lang.Object systemTrayInstance_
-
-
Constructor Detail
-
Java6SysTray
Java6SysTray() throws java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.NoSuchMethodException, java.lang.reflect.InvocationTargetExceptionConstructor.- Throws:
java.lang.ClassNotFoundExceptionjava.lang.IllegalAccessExceptionjava.lang.NoSuchMethodExceptionjava.lang.reflect.InvocationTargetException
-
-
Method Detail
-
isSupported
public boolean isSupported()
Description copied from class:SysTrayIndicates whether system tray functionality is available.- Specified by:
isSupportedin classSysTray- Returns:
- true iff the addIcon/removeIcon methods are expected to work
-
addIcon
public java.lang.Object addIcon(java.awt.Image im, java.lang.String tooltip, java.awt.PopupMenu popup, java.awt.event.ActionListener iconListener) throws java.awt.AWTExceptionDescription copied from class:SysTrayAdds an icon to the system tray.
-
removeIcon
public void removeIcon(java.lang.Object trayIcon) throws java.awt.AWTExceptionDescription copied from class:SysTrayRemoves a previously-added icon from the tray.- Specified by:
removeIconin classSysTray- Parameters:
trayIcon- object obtained from a previous invocation of addIcon- Throws:
java.awt.AWTException
-
-