|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object camera3d.SelectionList
This class keeps track of which objects are selected in the scene. It acts as a manager for selection activities. It must register itself with a J3DBase object so it gets informed of the list of scene graph objects. SelectionList is also the object which should receive input from mouse picking objects, by means of the PickListener interface. It interacts with graphical components dedicated to selection/edition of objects, receiving requests to selected/unselect certain objects and notifying interested listeners of changes made to the group of selected scene graph objects.
Constructor Summary | |
SelectionList()
Creates a new SelectionList, both sceneObjects and selectedObjects remain empty. |
Method Summary | |
void |
addSelectionChangeListener(SelectionChangeListener listener)
Adds listener to the list of objects notified when scene graph objects get (un)selected. |
void |
addToSelectedObjects(VcObject vcObj)
Adds vcObj to selected objects list. |
void |
flushSelection()
Clears current selection. |
java.util.List |
getSelectedObjects()
Returns list of objects currently selected. |
boolean |
getSingleObjectSelectionMode()
Returns flag indicating whether multi-object selection is permitted. |
void |
pickingOcurred(int mod,
java.util.List pickedObjects)
Called when a picking action is performed. |
void |
removeFromSelectedObjects(VcObject vcObj)
Removes the input object from list of selected objects. |
void |
sceneObjectsChanged(SceneObjectsChangedEvent event)
Informs SelectionList of changes in the list of objects in the scene graph. |
void |
setSceneObjects(java.util.List sceneObjects)
Sets list of objects currently in the scene graph. |
void |
setSingleObjectSelectionMode(boolean b)
Sets flag which controls whether multi-object selection is permitted. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SelectionList()
Method Detail |
public void sceneObjectsChanged(SceneObjectsChangedEvent event)
sceneObjectsChanged
in interface SceneObjectsChangeListener
public void pickingOcurred(int mod, java.util.List pickedObjects)
pickingOcurred
in interface PickListener
mod
- modifiers, as defined in java.awt.event.MouseEventpickedObjects
- list of VcObjects hit by the picking operationpublic void addToSelectedObjects(VcObject vcObj)
public void removeFromSelectedObjects(VcObject vcObj)
public void flushSelection()
public java.util.List getSelectedObjects()
public void setSceneObjects(java.util.List sceneObjects)
sceneObjects
- List of VcObjects.public void setSingleObjectSelectionMode(boolean b)
public boolean getSingleObjectSelectionMode()
public void addSelectionChangeListener(SelectionChangeListener listener)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |