gumbo.interact
Class ActionSingleAdapter

java.lang.Object
  |
  +--gumbo.interact.ActionSingleAdapter

public class ActionSingleAdapter
extends java.lang.Object

An action feedback adapter that converts discrete action events into a target interactor state for single (non-group) actions (see InteractorFlags.ACTION_???). Typically, targets are interactor leaves, not group interactors.

This adapter can be used for action- or object-centric interaction. For action-centric, assign an action adapter to each type of action, with the action state set true and only the target interactor changing. For object-centric, assign an action adapter to each object, with the target interactor set and only the action state for that object changing.

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

Constructor Summary
ActionSingleAdapter()
          Creates an instance that recognizes all targets.
ActionSingleAdapter(java.util.Collection targets)
          Creates an instance that recognizes a group of dynamic targets.
ActionSingleAdapter(Interactor target)
          Creates an instance that recognizes a single static target.
 
Method Summary
 BooleanField.EventIn getFocusIn()
          True while keyboard focus is active.
 InteractorField.EventIn getFocusTargetIn()
          The one target object that has keyboard focus, or null if none.
 BooleanField.EventIn getIdentifyIn()
          True while the indentification is active.
 InteractorField.EventIn getIdentifyTargetIn()
          The one target object that currently needs identification (such as with a tooltip or a verbal message), or null if none.
 BooleanField.EventIn getOverIn()
          True while mouse over is active.
 InteractorField.EventIn getOverTargetIn()
          The one target object the mouse is over, or null if none.
 BooleanField.EventIn getSignifyIn()
          True while the signification is active.
 InteractorField.EventIn getSignifyTargetIn()
          The one target object that currently needs signification (such as with highlighting or a sound effect), or null if none.
 void setNoPickTarget(Interactor target)
          Sets the feedback target corresponding to NO_PICK_TARGET target in.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActionSingleAdapter

public ActionSingleAdapter()
Creates an instance that recognizes all targets.


ActionSingleAdapter

public ActionSingleAdapter(Interactor target)
Creates an instance that recognizes a single static target.

Parameters:
target - The recognized target. Never null.

ActionSingleAdapter

public ActionSingleAdapter(java.util.Collection targets)
Creates an instance that recognizes a group of dynamic targets.

Parameters:
targets - Reference to the group of recognized targets (Interactor). Only affects new targets. If null, all targets are recognized.
Method Detail

setNoPickTarget

public void setNoPickTarget(Interactor target)
Sets the feedback target corresponding to NO_PICK_TARGET target in.

Parameters:
target - The feedback target. None if null, which is the default.

getOverTargetIn

public InteractorField.EventIn getOverTargetIn()
The one target object the mouse is over, or null if none. Only needs to be updated when the target changes. If changed, resets the over flag for the old target and syncs the new target with the current over state.


getOverIn

public BooleanField.EventIn getOverIn()
True while mouse over is active. Ignored if there is no over target.


getFocusTargetIn

public InteractorField.EventIn getFocusTargetIn()
The one target object that has keyboard focus, or null if none. Only needs to be updated when the target changes. If changed, resets the focus flag for the old target and syncs the new target with the current focus state.


getFocusIn

public BooleanField.EventIn getFocusIn()
True while keyboard focus is active. Ignored if there is no focus target.


getSignifyTargetIn

public InteractorField.EventIn getSignifyTargetIn()
The one target object that currently needs signification (such as with highlighting or a sound effect), or null if none. Only needs to be updated when the target changes. If changed, resets the signify flag for the old target and syncs the new target with the current signify state.


getSignifyIn

public BooleanField.EventIn getSignifyIn()
True while the signification is active. Ignored if there is no signification target.


getIdentifyTargetIn

public InteractorField.EventIn getIdentifyTargetIn()
The one target object that currently needs identification (such as with a tooltip or a verbal message), or null if none. Only needs to be updated when the target changes. If changed, resets the identify flag for the old target and syncs the new target with the current identify state.


getIdentifyIn

public BooleanField.EventIn getIdentifyIn()
True while the indentification is active. Ignored if there is no indentification target.