gumbo.interact.select
Class AbstractSelectMapper

java.lang.Object
  |
  +--gumbo.interact.AbstractPickMapper
        |
        +--gumbo.interact.select.AbstractSelectMapper
All Implemented Interfaces:
PickMapper, SelectMapper

public class AbstractSelectMapper
extends AbstractPickMapper
implements SelectMapper

Full implementation of the SelectMapper interface.

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

Constructor Summary
AbstractSelectMapper(InteractorGroup group)
          Creates an instance with pass-through and on-change output, and a default selection group.
AbstractSelectMapper(InteractorGroup group, boolean passThrough, boolean onChange)
          Creates an instance.
 
Method Summary
 BooleanField.EventIn getActiveIn()
          If false, input events are ignored and the selection group cannot be changed.
 CollectionField.EventIn getAddAllIn()
          Adds a group of members (Interactor) to the selection group and syncs their state.
 InteractorField.EventIn getAddIn()
          Adds a member to the selection group and syncs its state.
 InteractorField.EventOut getAddOut()
          Sends the interactor after it is added to the selection group.
 NotifyNode.EventIn getClearIn()
          Removes all members from the selection group and desyncs their state.
 InteractorField.EventOut getGroupOut()
          Sends an immutable view of the interactor group (InteractorGroup) after it may have been modified.
 CollectionField.EventIn getRemoveAllIn()
          Removes a group of members (Interactor) from the selection group and desyncs their state.
 InteractorField.EventIn getRemoveIn()
          Removes a member from the selection group and desyncs its state.
 InteractorField.EventOut getRemoveOut()
          Sends the interactor after it is removed from the selection group.
 InteractorGroup getSelectGroup()
          Returns the selection group managed by this select mapper.
 
Methods inherited from class gumbo.interact.AbstractPickMapper
getPickIn, getPickMap, getPickOut
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface gumbo.interact.PickMapper
getPickIn, getPickOut
 

Constructor Detail

AbstractSelectMapper

public AbstractSelectMapper(InteractorGroup group)
Creates an instance with pass-through and on-change output, and a default selection group.

Parameters:
group - The target selection group. Never null.

AbstractSelectMapper

public AbstractSelectMapper(InteractorGroup group,
                            boolean passThrough,
                            boolean onChange)
Creates an instance. Master constructor.

Parameters:
group - The target selection group. Never null.
passThrough - If true, an input pick without a mapping will pass through as the output pick; otherwise, the output pick will be null. Does not affect null-value mappings.
onChange - If true, an output event is sent only if its data value changes.
Method Detail

getSelectGroup

public InteractorGroup getSelectGroup()
Description copied from interface: SelectMapper
Returns the selection group managed by this select mapper. Clients can directly modify its state, but not its membership.

Specified by:
getSelectGroup in interface SelectMapper
Returns:
Reference to the group. Never null.

getActiveIn

public BooleanField.EventIn getActiveIn()
Description copied from interface: SelectMapper
If false, input events are ignored and the selection group cannot be changed. Defaults to true.

Specified by:
getActiveIn in interface SelectMapper

getAddIn

public InteractorField.EventIn getAddIn()
Description copied from interface: SelectMapper
Adds a member to the selection group and syncs its state. Ignored if null, duplicate, or NO_PICK_TARGET. Throws an exception if the member is the selection group.

Specified by:
getAddIn in interface SelectMapper

getRemoveIn

public InteractorField.EventIn getRemoveIn()
Description copied from interface: SelectMapper
Removes a member from the selection group and desyncs its state. Ignored if null or missing.

Specified by:
getRemoveIn in interface SelectMapper

getAddAllIn

public CollectionField.EventIn getAddAllIn()
Description copied from interface: SelectMapper
Adds a group of members (Interactor) to the selection group and syncs their state. Ignored if null. Throws an exception if a non-null member is not an Interactor; otherwise, members are handled as per getAddIn().

Specified by:
getAddAllIn in interface SelectMapper

getRemoveAllIn

public CollectionField.EventIn getRemoveAllIn()
Description copied from interface: SelectMapper
Removes a group of members (Interactor) from the selection group and desyncs their state. Ignored if null. Throws an exception if a non-null member is not an Interactor; otherwise, members are handled as per getRemoveIn().

Specified by:
getRemoveAllIn in interface SelectMapper

getClearIn

public NotifyNode.EventIn getClearIn()
Description copied from interface: SelectMapper
Removes all members from the selection group and desyncs their state.

Specified by:
getClearIn in interface SelectMapper

getAddOut

public InteractorField.EventOut getAddOut()
Description copied from interface: SelectMapper
Sends the interactor after it is added to the selection group. An input event may produce none or more events (an add all input event will produce an output event for each added member).

Specified by:
getAddOut in interface SelectMapper

getRemoveOut

public InteractorField.EventOut getRemoveOut()
Description copied from interface: SelectMapper
Sends the interactor after it is removed from the selection group. An input event may produce none or more events (a remove all input event will produce an output event for each added member).

Specified by:
getRemoveOut in interface SelectMapper

getGroupOut

public InteractorField.EventOut getGroupOut()
Description copied from interface: SelectMapper
Sends an immutable view of the interactor group (InteractorGroup) after it may have been modified. May be empty but never null. An input event should produce none or one event.

Specified by:
getGroupOut in interface SelectMapper