org.jdesktop.wonderland.client.contextmenu
Class SimpleContextMenuItem

java.lang.Object
  extended by org.jdesktop.wonderland.client.contextmenu.ContextMenuItem
      extended by org.jdesktop.wonderland.client.contextmenu.SimpleContextMenuItem

public class SimpleContextMenuItem
extends ContextMenuItem

A "simple" context menu item that displays a name and (optional) label as a normal menu item.

Author:
Jordan Slott

Nested Class Summary
 
Nested classes/interfaces inherited from class org.jdesktop.wonderland.client.contextmenu.ContextMenuItem
ContextMenuItem.MenuItemRepaintListener
 
Constructor Summary
SimpleContextMenuItem(java.lang.String label, ContextMenuActionListener listener)
           
SimpleContextMenuItem(java.lang.String label, java.awt.Image image, ContextMenuActionListener listener)
           
 
Method Summary
 ContextMenuActionListener getActionListener()
          Returns the listener for the menu item action.
 java.awt.Image getImage()
          Returns the image of the simple menu item.
 void setImage(java.awt.Image image)
          Sets the image of the simple menu item.
 
Methods inherited from class org.jdesktop.wonderland.client.contextmenu.ContextMenuItem
addMenuItemRepaintListener, fireMenuItemRepaintListeners, getLabel, isEnabled, removeMenuItemRepaintListener, setEnabled, setLabel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleContextMenuItem

public SimpleContextMenuItem(java.lang.String label,
                             java.awt.Image image,
                             ContextMenuActionListener listener)

SimpleContextMenuItem

public SimpleContextMenuItem(java.lang.String label,
                             ContextMenuActionListener listener)
Method Detail

getImage

public java.awt.Image getImage()
Returns the image of the simple menu item.

Returns:
An Image

setImage

public void setImage(java.awt.Image image)
Sets the image of the simple menu item.

Parameters:
image - The new Image

getActionListener

public ContextMenuActionListener getActionListener()
Returns the listener for the menu item action.

Returns:
The menu item action listener


Open Wonderland - http://openwonderland.org