gumbo.interact.select
Class AbstractSelectManager

java.lang.Object
  |
  +--gumbo.interact.select.AbstractSelectManager
All Implemented Interfaces:
PickMapper, SelectManager

public class AbstractSelectManager
extends java.lang.Object
implements SelectManager

Full implementation of the SelectManager interface.

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

Constructor Summary
AbstractSelectManager()
          Creates an instance.
 
Method Summary
 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()
          Adds a new empty selection group as the front group, with the input as the select flag role object (see newSelectFlag()).
 InteractorField.EventIn getAddIn()
          Adds a member to the front selection group and syncs its state.
 NotifyNode.EventIn getClearIn()
          Removes all members from the front selection group.
 int getGroupCount()
          Gets the number of selection groups in this manager.
 InteractorField.EventIn getPickIn()
          The input pick interactor.
 InteractorField.EventOut getPickOut()
          The ouput pick interactor corresponding to the input pick.
 NotifyNode.EventIn getRemoveGroupIn()
          Clears and removes the front selection group.
 InteractorField.EventIn getRemoveIn()
          Removes a member from the front selection group and desyncs its state.
 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.
protected  SelectFlag newSelectFlag(int order, java.lang.Object role)
          Called by the system to build and return a new select flag.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractSelectManager

public AbstractSelectManager()
Creates an instance.

Method Detail

newSelectFlag

protected SelectFlag newSelectFlag(int order,
                                   java.lang.Object role)
Called by the system to build and return a new select flag. Default implementation: Returns a new SelectFlag with default name and the specified order index and role object. Override to return a subclass (such as AspectModelFlag) and/or to restrict the parameters (such as non-null role, non-negative index).

Parameters:
order - The flag selection order index (see SelectFlag).
role - The flag role object (see SelectFlag).
Returns:
A new select flag. Never null.

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()
Description copied from interface: SelectManager
Adds a new empty selection group as the front group, with the input as the select flag role object (see newSelectFlag()). If a group with the object already exists it will be brought to the front. If the object is null a new group will be added and the group will be used as the role object.

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()
Description copied from interface: SelectManager
Adds a member to the front selection group and syncs its state. Ignored if null, duplicate, or NO_PICK_TARGET. Throws an exception if there is no front group, or the member is the group.

Specified by:
getAddIn in interface SelectManager

getRemoveIn

public InteractorField.EventIn getRemoveIn()
Description copied from interface: SelectManager
Removes a member from the front selection group and desyncs its state. Ignored if null or missing. Throws an exception if there is no front group.

Specified by:
getRemoveIn in interface SelectManager

getClearIn

public NotifyNode.EventIn getClearIn()
Description copied from interface: SelectManager
Removes all members from the front selection group. Does nothing if there are no groups.

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

getPickOut

public InteractorField.EventOut getPickOut()
Description copied from interface: PickMapper
The ouput pick interactor corresponding to the input pick. Depending on the mapping constraints, may be NO_PICK_TARGET or null.

Specified by:
getPickOut in interface PickMapper