gumbo.visualize.data.consistency
Class AspectManager

java.lang.Object
  |
  +--gumbo.visualize.data.consistency.IdManager
        |
        +--gumbo.visualize.data.consistency.AspectManager
All Implemented Interfaces:
PickMapper, SelectManager

public class AspectManager
extends IdManager
implements SelectManager

Manages global aspect models as ordered selection groups, each with a corresponding AspectModelFlag. Intended for use at the tail of the picking chain so that picking a target interactor (graphic view) results in a pick of the frontmost aspect model that it belongs to.

Monitors aspect model activity (see AspectModel.getAspectModelMonitor()) to automatically update selection groups. Note that selection groups will not be created for aspect models that are of type ParityModel.

Version:
$Revision: 1.1 $
Author:
Jon Barrilleaux (jonb@jmbaai.com) of JMB and Associates Inc.

Constructor Summary
AspectManager(IdManager target)
          Creates an instance as the mapper after the target mapper in a picking chain.
 
Method Summary
 void addGraphic(GraphicView view)
           
 SelectMapper findSelectMapper(java.lang.Object role)
          Returns the select mapper corresponding to a given select flag role object, which clients can use to modify a selection group's membership.
 BooleanField.EventIn getActiveIn()
          While false, inputs are ignored.
 ObjectField.EventIn getAddGroupIn()
          Not supported.
 InteractorField.EventIn getAddIn()
          Not supported.
 NotifyNode.EventIn getClearIn()
          Not supported.
 int getGroupCount()
          Gets the number of selection groups in this manager.
protected  java.util.Map getOutputPickMap()
          Throws an exception, not yet implemented.
 InteractorField.EventIn getPickIn()
          The input pick interactor.
 InteractorField.EventOut getPickOut()
          The selection interactor group corresponding to the input pick client ID.
 NotifyNode.EventIn getRemoveGroupIn()
          Clears and removes the front selection group.
 InteractorField.EventIn getRemoveIn()
          Not supported.
 SelectFlag getSelectFlag(int pickIndex)
          Gets the select flag at the specified index in the picking chain.
 NotifyNode.EventIn getToBackIn()
          Moves the front group to the back.
 InteractorField.EventIn getToFrontIn()
          Moves the specified selection group to the front.
 void removeGraphic(GraphicView view)
           
 
Methods inherited from class gumbo.visualize.data.consistency.IdManager
findInputPick, findOutputPick
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AspectManager

public AspectManager(IdManager target)
Creates an instance as the mapper after the target mapper in a picking chain.

Parameters:
target - The target manager. Never null.
Method Detail

addGraphic

public final void addGraphic(GraphicView view)

removeGraphic

public final void removeGraphic(GraphicView view)

findSelectMapper

public SelectMapper findSelectMapper(java.lang.Object role)
Description copied from interface: SelectManager
Returns the select mapper corresponding to a given select flag role object, which clients can use to modify a selection group's membership.

Specified by:
findSelectMapper in interface SelectManager
Parameters:
role - The role object. Never null.
Returns:
The select mapper. Null if none.

getSelectFlag

public SelectFlag getSelectFlag(int pickIndex)
Description copied from interface: SelectManager
Gets the select flag at the specified index in the picking chain.

Specified by:
getSelectFlag in interface SelectManager
Parameters:
pickIndex - Picking index. Zero is the front flag (highest Z-order), and getGroupCount()-1 is the back flag (lowest Z-order).
Returns:
The select flag. Never null.

getGroupCount

public int getGroupCount()
Description copied from interface: SelectManager
Gets the number of selection groups in this manager.

Specified by:
getGroupCount in interface SelectManager
Returns:
The group count. Zero if none.

getActiveIn

public BooleanField.EventIn getActiveIn()
Description copied from interface: SelectManager
While false, inputs are ignored. Defaults to true.

Specified by:
getActiveIn in interface SelectManager

getAddGroupIn

public ObjectField.EventIn getAddGroupIn()
Not supported.

Specified by:
getAddGroupIn in interface SelectManager

getRemoveGroupIn

public NotifyNode.EventIn getRemoveGroupIn()
Description copied from interface: SelectManager
Clears and removes the front selection group. Ignored if there are no selection groups.

Specified by:
getRemoveGroupIn in interface SelectManager

getToFrontIn

public InteractorField.EventIn getToFrontIn()
Description copied from interface: SelectManager
Moves the specified selection group to the front. Ignored if the interactor is not a managed selection group or if the group is already in front. Typically connected to the pick out of the picking chain, which results in the picked group automatically moving to the front.

Specified by:
getToFrontIn in interface SelectManager

getToBackIn

public NotifyNode.EventIn getToBackIn()
Description copied from interface: SelectManager
Moves the front group to the back. Ignored if none or one selection groups.

Specified by:
getToBackIn in interface SelectManager

getAddIn

public InteractorField.EventIn getAddIn()
Not supported.

Specified by:
getAddIn in interface SelectManager

getRemoveIn

public InteractorField.EventIn getRemoveIn()
Not supported.

Specified by:
getRemoveIn in interface SelectManager

getClearIn

public NotifyNode.EventIn getClearIn()
Not supported.

Specified by:
getClearIn in interface SelectManager

getPickIn

public InteractorField.EventIn getPickIn()
Description copied from interface: PickMapper
The input pick interactor. Can be null (an invalid pick) or NO_PICK_TARGET (a valid pick but no hit).

Specified by:
getPickIn in interface PickMapper
Specified by:
getPickIn in class IdManager

getPickOut

public InteractorField.EventOut getPickOut()
The selection interactor group corresponding to the input pick client ID. NO_PICK_TARGET if no target picked. Null for a null pick.

Specified by:
getPickOut in interface PickMapper
Specified by:
getPickOut in class IdManager

getOutputPickMap

protected java.util.Map getOutputPickMap()
Throws an exception, not yet implemented.

Overrides:
getOutputPickMap in class IdManager
Returns:
Reference to the map. Never null.