gumbo.interact.select
Class SelectFacade

java.lang.Object
  |
  +--gumbo.interact.select.SelectFacade
All Implemented Interfaces:
PickMapper

public class SelectFacade
extends java.lang.Object
implements PickMapper

A facade providing interactive selection for a single selection group. Typically used for command target selection. Includes a selection mapper, button gesture, selection feedback for the selection group, and control feedback for the gesture. The button gesture monitors the pick input for all targets. If the pick is NO_PICK_TARGET, any current selection will be cleared. If the pick is NO_SELECT_TARGET, it will be ignored. Typically used as the last link in a picking chain (see PickMapper). Optionally includes group action feedback.

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

Constructor Summary
SelectFacade(ButtonTrigger trigger)
          Creates an instance.
 
Method Summary
 ActionGroupAdapter getActionGroupAdapter()
          Gets a singleton action group feedback adapter, with all targets recognized, and all target inputs connected to the pick mapper's pick output.
 BooleanField.EventIn getActiveIn()
          While false, new selections cannot be made, but any old selection can still be cleared.
 StateSetField.EventIn getButtonsIn()
          The button state input to the select gesture.
 BooleanField.EventIn getCancelIn()
          The cancel input to the select gesture.
 NotifyNode.EventIn getClearIn()
          Clears any current selection and updates the selection type, if type in has changed.
 BooleanField.EventIn getMultiIn()
          While true, pick in is added to the selection group (multi-select); otherwise, source in replaces the selection (single-select).
 InteractorField.EventIn getPickIn()
          The pick input, which is the select gesture target and will be mapped by the select mapper as the pick out.
 InteractorField.EventOut getPickOut()
          The selection mapper's pick output.
 ButtonGesture getSelectGesture()
          Returns this facade's select gesture.
 SelectMapper getSelectMapper()
          Returns this facade's select mapper.
 BooleanField.EventIn getToggleIn()
          While true, augments multi in.
 CollectionField.EventIn getTypeIn()
          The new selection type, specified as immutable state flags (Object).
 void setNoPickTarget(Interactor target)
          Sets the control feedback target corresponding to a pick in value of NO_PICK_TARGET.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SelectFacade

public SelectFacade(ButtonTrigger trigger)
Creates an instance. Master constructor.

Parameters:
trigger - A new button trigger defining the selection gesture's button action. If a latching trigger, must be multi-shot (no reset required). Typically, a PulseButtonTrigger. Never null.
Method Detail

setNoPickTarget

public void setNoPickTarget(Interactor target)
Sets the control feedback target corresponding to a pick in value of NO_PICK_TARGET.

Parameters:
target - The feedback target. Null if none. The default is null.

getSelectGesture

public ButtonGesture getSelectGesture()
Returns this facade's select gesture. Never null. For reference only; should not be mutated.


getSelectMapper

public SelectMapper getSelectMapper()
Returns this facade's select mapper. Never null. For reference only; should not be mutated.


getActionGroupAdapter

public ActionGroupAdapter getActionGroupAdapter()
Gets a singleton action group feedback adapter, with all targets recognized, and all target inputs connected to the pick mapper's pick output. The client must set or connect boolean inputs and set the no pick target as needed.

Returns:
The adapter. Never null.

getActiveIn

public BooleanField.EventIn getActiveIn()
While false, new selections cannot be made, but any old selection can still be cleared. Defaults to true.


getButtonsIn

public StateSetField.EventIn getButtonsIn()
The button state input to the select gesture.


getCancelIn

public BooleanField.EventIn getCancelIn()
The cancel input to the select gesture.


getMultiIn

public BooleanField.EventIn getMultiIn()
While true, pick in is added to the selection group (multi-select); otherwise, source in replaces the selection (single-select). If false and source in is already single-selected, nothing happens.


getToggleIn

public BooleanField.EventIn getToggleIn()
While true, augments multi in. If source in is already selected it will be de-selected, and if not selected it will be selected. Ignored if multi in is false. For user interaction, multi and toggle in are typically connected together. For system interaction, such as a range selection, toggle in should be false while the system selects each item within the range limits.


getClearIn

public NotifyNode.EventIn getClearIn()
Clears any current selection and updates the selection type, if type in has changed.


getTypeIn

public CollectionField.EventIn getTypeIn()
The new selection type, specified as immutable state flags (Object). Possibly empty but never null. Replaces the type in current selection group members, and will apply to newly added members. Group member state policies must be compatible with the selection type. Typically, select flags are subclasses of SelectFlag.


getPickIn

public InteractorField.EventIn getPickIn()
The pick input, which is the select gesture target and will be mapped by the select mapper as the pick out. Can be null or NO_PICK_TARGET.

Specified by:
getPickIn in interface PickMapper

getPickOut

public InteractorField.EventOut getPickOut()
The selection mapper's pick output. Null if none.

Specified by:
getPickOut in interface PickMapper