gumbo.interact.button
Interface ButtonTrigger

All Known Subinterfaces:
ButtonGesture
All Known Implementing Classes:
AbstractButtonGesture, AbstractButtonTrigger

public interface ButtonTrigger

A trigger that detects button press and release. Includes provisions for chording (multi-button trigger), and arming, capturing, and latching trigger states. This trigger fires when any of the trigger buttons and all of the chord buttons are active, while no other domain buttons are active. For example, if the trigger buttons are the mouse buttons, the chord buttons are the keyboard shift key, and the domain buttons are the keyboard modifier keys, then the trigger will fire if any mouse button is active and, of the modifier keys, only the shift key is active. TODO: It would be better for the client if chording were implemented as a separate filter, but this may be difficult given that the chord and domain are used for trigger arming.

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

Method Summary
 BooleanField.EventIn getActiveIn()
          While false, input events are ignored.
 BooleanField.EventOut getArmedOut()
          Sends true while this trigger is armed for firing.
 StateSetField.EventIn getButtonsIn()
          The input button states.
 BooleanField.EventIn getCancelIn()
          If true, cancels trigger capture and blocks trigger inputs; and, resets the trigger when it goes false again.
 BooleanField.EventOut getCancelOut()
          Sends true if cancel in goes true while this trigger is captured, and goes false after cancel in goes false.
 BooleanField.EventOut getCaptureOut()
          Sends true while this trigger is captured for rearming, firing, or cancellation.
 java.util.Collection getChordButtons()
          Gets an immutable view of the recognized chord buttons (Object, specifically MouseSensors.BUTTON_???, KeyboardSensors.KEY_???).
 java.util.Collection getDomainButtons()
          Gets an immutable view of the recognized domain buttons (Object, specifically MouseSensors.BUTTON_???, KeyboardSensors.KEY_???).
 BooleanField.EventIn getEnableIn()
          While false, input events are ignored and the trigger remains in the reset state, with all outputs false.
 BooleanField.EventIn getFireableIn()
          If true, this trigger is armable and fireable; otherwise, it cannot be armed or fired.
 NotifyNode.EventOut getFireNotifyOut()
          Convenience event that fires after fire out goes true.
 BooleanField.EventOut getFireOut()
          Sends true when an armed button fires.
 NotifyNode.EventIn getResetIn()
          Resets this trigger if fired.
 java.util.Collection getTriggerButtons()
          Gets an immutable view of the recognized trigger buttons (Object, specifically MouseSensors.BUTTON_???, KeyboardSensors.KEY_???).
 

Method Detail

getTriggerButtons

public java.util.Collection getTriggerButtons()
Gets an immutable view of the recognized trigger buttons (Object, specifically MouseSensors.BUTTON_???, KeyboardSensors.KEY_???). The trigger can fire if one or more trigger buttons are active. If empty, only chord buttons are needed to fire the trigger.


getChordButtons

public java.util.Collection getChordButtons()
Gets an immutable view of the recognized chord buttons (Object, specifically MouseSensors.BUTTON_???, KeyboardSensors.KEY_???). The trigger can fire if all chord buttons are active. If empty, only trigger buttons are needed to fire the trigger.


getDomainButtons

public java.util.Collection getDomainButtons()
Gets an immutable view of the recognized domain buttons (Object, specifically MouseSensors.BUTTON_???, KeyboardSensors.KEY_???). The trigger cannot fire if any buttons in the domain other than the trigger and chord buttons are active. By default, the button domain includes the trigger and chord buttons (even if domain buttons is empty or incomplete).


getEnableIn

public BooleanField.EventIn getEnableIn()
While false, input events are ignored and the trigger remains in the reset state, with all outputs false.


getActiveIn

public BooleanField.EventIn getActiveIn()
While false, input events are ignored. Does not affect outputs.


getButtonsIn

public StateSetField.EventIn getButtonsIn()
The input button states. Never null.


getFireableIn

public BooleanField.EventIn getFireableIn()
If true, this trigger is armable and fireable; otherwise, it cannot be armed or fired. If this trigger is armed and fireable goes false, the trigger is disarmed. When fireable goes true, the trigger will be armed if arming conditions are met. If this trigger is non-latching and has fired, the trigger resets if fireable goes false. If the trigger is latching and has fired, fireable has no affect.


getResetIn

public NotifyNode.EventIn getResetIn()
Resets this trigger if fired. Ignored if the trigger has not fired or does not latch.


getCancelIn

public BooleanField.EventIn getCancelIn()
If true, cancels trigger capture and blocks trigger inputs; and, resets the trigger when it goes false again. Ignored if the trigger is not captured or does not capture.


getCaptureOut

public BooleanField.EventOut getCaptureOut()
Sends true while this trigger is captured for rearming, firing, or cancellation. Sends false after the trigger is reset or cancelled. Stays false if the trigger does not capture.


getArmedOut

public BooleanField.EventOut getArmedOut()
Sends true while this trigger is armed for firing. Sends false before fire out goes true, and after the trigger is reset.


getFireOut

public BooleanField.EventOut getFireOut()
Sends true when an armed button fires. Goes false before being rearmed, and after being reset.


getFireNotifyOut

public NotifyNode.EventOut getFireNotifyOut()
Convenience event that fires after fire out goes true.


getCancelOut

public BooleanField.EventOut getCancelOut()
Sends true if cancel in goes true while this trigger is captured, and goes false after cancel in goes false.