Knopflerfish OSGi 2.4.0

org.knopflerfish.service.trayicon
Class DefaultTrayIcon

java.lang.Object
  extended by org.knopflerfish.service.trayicon.DefaultTrayIcon
All Implemented Interfaces:
java.awt.event.ActionListener, java.awt.event.MouseListener, java.util.EventListener, TrayIcon

public class DefaultTrayIcon
extends java.lang.Object
implements TrayIcon

Default implementation of TrayIcon.


Field Summary
 
Fields inherited from interface org.knopflerfish.service.trayicon.TrayIcon
PROP_NAME
 
Constructor Summary
DefaultTrayIcon(BundleContext bc, java.lang.String id, java.lang.String name, java.net.URL imageURL)
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          Default does nothing.
 java.lang.String getId()
          Returns id set in constructor.
 java.net.URL getImageURL()
          Returns image URL set in constructor.
 java.lang.String getName()
          Returns name set in constructor.
 java.lang.String getStartupMessage()
          Default does nothing.
 javax.swing.JPopupMenu getTrayJPopupMenu()
          Default returns null
 void mouseClicked(java.awt.event.MouseEvent e)
          Default does nothing.
 void mouseEntered(java.awt.event.MouseEvent e)
          Default does nothing.
 void mouseExited(java.awt.event.MouseEvent e)
          Default does nothing.
 void mousePressed(java.awt.event.MouseEvent e)
          Default does nothing.
 void mouseReleased(java.awt.event.MouseEvent e)
          Default does nothing.
 void register()
          Register this instance as a TrayIcon service into the framework.
 void trayEvent(TrayEvent e)
          Default does nothing.
 void unregister()
          Unregister this instance from the framework.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultTrayIcon

public DefaultTrayIcon(BundleContext bc,
                       java.lang.String id,
                       java.lang.String name,
                       java.net.URL imageURL)
Method Detail

register

public void register()
Register this instance as a TrayIcon service into the framework.

The properties used for registering will contain:

  TrayIcon.PROP_NAME    = getName()
  Constants.SERVICE_PID = getId();
 


unregister

public void unregister()
Unregister this instance from the framework.


getId

public java.lang.String getId()
Returns id set in constructor.

Specified by:
getId in interface TrayIcon

getName

public java.lang.String getName()
Returns name set in constructor.

Specified by:
getName in interface TrayIcon

getImageURL

public java.net.URL getImageURL()
Returns image URL set in constructor.

Specified by:
getImageURL in interface TrayIcon

getStartupMessage

public java.lang.String getStartupMessage()
Default does nothing.

Specified by:
getStartupMessage in interface TrayIcon
Returns:
Short startup message, null if no message should be displayed.

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Default does nothing.

Specified by:
actionPerformed in interface java.awt.event.ActionListener

trayEvent

public void trayEvent(TrayEvent e)
Default does nothing.

Specified by:
trayEvent in interface TrayIcon

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent e)
Default does nothing.

Specified by:
mouseClicked in interface java.awt.event.MouseListener

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent e)
Default does nothing.

Specified by:
mouseEntered in interface java.awt.event.MouseListener

mouseExited

public void mouseExited(java.awt.event.MouseEvent e)
Default does nothing.

Specified by:
mouseExited in interface java.awt.event.MouseListener

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
Default does nothing.

Specified by:
mousePressed in interface java.awt.event.MouseListener

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
Default does nothing.

Specified by:
mouseReleased in interface java.awt.event.MouseListener

getTrayJPopupMenu

public javax.swing.JPopupMenu getTrayJPopupMenu()
Default returns null

Specified by:
getTrayJPopupMenu in interface TrayIcon

Knopflerfish OSGi 2.4.0