org.jdesktop.wonderland.client.contextmenu.cell
Class ContextMenuComponent

java.lang.Object
  extended by org.jdesktop.wonderland.client.cell.CellComponent
      extended by org.jdesktop.wonderland.client.contextmenu.cell.ContextMenuComponent

public class ContextMenuComponent
extends CellComponent

A cell component which provides cell specific ContextMenu items to the ContextMenu system. Users of this component can add and remove context menu factories.

Author:
paulby, Jordan Slott

Field Summary
 
Fields inherited from class org.jdesktop.wonderland.client.cell.CellComponent
cell, status
 
Constructor Summary
ContextMenuComponent(Cell cell)
           
 
Method Summary
 void addContextMenuFactory(ContextMenuFactorySPI factory)
          Add a context menu factory for this cell component.
 ContextMenuFactorySPI[] getContextMenuFactories()
          Returns an array of context menu factories.
 boolean isShowStandardMenuItems()
          Returns true if the context menu should display the standard menu items for this Cell, false to not display them.
 void removeContextMenuFactory(ContextMenuFactorySPI factory)
          Remove the given context menu factory from the cell component.
 void setShowStandardMenuItems(boolean show)
          Sets whether the context menu should show the stanard menu items, in addition to any menu items this Cell component adds.
 
Methods inherited from class org.jdesktop.wonderland.client.cell.CellComponent
setClientState, setStatus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContextMenuComponent

public ContextMenuComponent(Cell cell)
Method Detail

addContextMenuFactory

public void addContextMenuFactory(ContextMenuFactorySPI factory)
Add a context menu factory for this cell component. If the factory already exists, this method does nothing.

Parameters:
factory - The context menu factory to add

removeContextMenuFactory

public void removeContextMenuFactory(ContextMenuFactorySPI factory)
Remove the given context menu factory from the cell component. This change will not effect a menu that is currently being displayed, but will be applied next time the menu is displayed

Parameters:
factory - The context menu factory to remove

setShowStandardMenuItems

public void setShowStandardMenuItems(boolean show)
Sets whether the context menu should show the stanard menu items, in addition to any menu items this Cell component adds. By default, this value is 'true'.

Parameters:
show - True to display the standard context menu items, false to not display the standard context menu items

isShowStandardMenuItems

public boolean isShowStandardMenuItems()
Returns true if the context menu should display the standard menu items for this Cell, false to not display them.

Returns:
True to display the standard context menu items

getContextMenuFactories

public ContextMenuFactorySPI[] getContextMenuFactories()
Returns an array of context menu factories.

Returns:
An array of context menu items


Open Wonderland - http://openwonderland.org