org.jdesktop.wonderland.client.scenemanager.event
Class ContextEvent

java.lang.Object
  extended by org.jdesktop.wonderland.client.input.Event
      extended by org.jdesktop.wonderland.client.scenemanager.event.SceneEvent
          extended by org.jdesktop.wonderland.client.scenemanager.event.ContextEvent
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
ContextMenuEvent

public class ContextEvent
extends SceneEvent

Event when a context action has been taken for an Entity or a set of Entities. The ordered list of Entities selected is obtained via the getEntityList() method on the SceneEvent superclass.

The ContextEvent class also holds the AWT MouseEvent that caused this context event. This event class is needed to place popup menus, for example, where the context event happened.

Author:
Jordan Slott
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.jdesktop.wonderland.client.input.Event
entity, EVENT_CLASS_ID, isFocussed
 
Constructor Summary
ContextEvent()
          Default constructor
ContextEvent(java.util.List<org.jdesktop.mtgame.Entity> entities, java.awt.event.MouseEvent mouseEvent)
          Constructor, takes the list of Enitities and mouse event.
 
Method Summary
 Event clone(Event event)
          Copy the members of this class into the given event.
 java.awt.event.MouseEvent getMouseEvent()
          Returns the mouse event that resulted in this context event.
 
Methods inherited from class org.jdesktop.wonderland.client.scenemanager.event.SceneEvent
getCellForEntity, getEntityList, getPrimaryCell, getPrimaryEntity
 
Methods inherited from class org.jdesktop.wonderland.client.input.Event
allocateEventClassID, free, getClassID, getEntity, isFocussed, setEntity, setFocussed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContextEvent

public ContextEvent()
Default constructor


ContextEvent

public ContextEvent(java.util.List<org.jdesktop.mtgame.Entity> entities,
                    java.awt.event.MouseEvent mouseEvent)
Constructor, takes the list of Enitities and mouse event.

Method Detail

getMouseEvent

public java.awt.event.MouseEvent getMouseEvent()
Returns the mouse event that resulted in this context event.

Returns:
The MouseEvent object

clone

public Event clone(Event event)
Copy the members of this class into the given event.
If event is null, a new event of this class is created and returned.
If event is null, a new event of this class is created and returned.

Overrides:
clone in class SceneEvent


Open Wonderland - http://openwonderland.org