gumbo.interact.button
Class PushButtonTrigger

java.lang.Object
  |
  +--gumbo.interact.button.AbstractButtonTrigger
        |
        +--gumbo.interact.button.FancyButtonTrigger
              |
              +--gumbo.interact.button.PushButtonTrigger
All Implemented Interfaces:
ButtonTrigger

public class PushButtonTrigger
extends FancyButtonTrigger

A non-latching "push" button trigger that is stateful (must be armed before firing), button edge (not level) sensing, and can perform trigger capture. The critical/capturing state for a push button is the firing state. If trigger buttons are specified then only a trigger button can fire the trigger; otherwise, any chord button will fire it. Being edge sensing and stateful, firing conditions must be met after, not before, fireable in goes true.

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

Constructor Summary
PushButtonTrigger(java.util.Collection triggerButtons, java.util.Collection chordButtons, java.util.Collection domainButtons)
           
PushButtonTrigger(java.util.Collection triggerButtons, java.util.Collection chordButtons, java.util.Collection domainButtons, boolean onPress, boolean capturing)
          Creates an instance.
 
Method Summary
protected  void processButtonsIn()
          Called by the system to process the corresponding input event.
protected  void processFireableIn()
          Called by the system to process the corresponding input event.
protected  void processResetIn()
          Default implementation: Does nothing.
protected  void startArmed()
          Default implementation: If capturing, stops capturing, then starts armed.
protected  void startFire()
          Default implementation: If capturing, starts capturing, then starts fire.
 
Methods inherited from class gumbo.interact.button.FancyButtonTrigger
checkStartCritical, checkStopCritical, isCapturing, isOnPress, isStartCriticalTriggered, isStopCriticalTriggered, processCancelIn
 
Methods inherited from class gumbo.interact.button.AbstractButtonTrigger
getActiveIn, getArmedOut, getButtonsIn, getCancelIn, getCancelOut, getCaptureOut, getChordButtons, getDomainButtons, getEnableIn, getFireableIn, getFireNotifyOut, getFireOut, getResetIn, getTriggerButtons, startCancel, startReset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PushButtonTrigger

public PushButtonTrigger(java.util.Collection triggerButtons,
                         java.util.Collection chordButtons,
                         java.util.Collection domainButtons)

PushButtonTrigger

public PushButtonTrigger(java.util.Collection triggerButtons,
                         java.util.Collection chordButtons,
                         java.util.Collection domainButtons,
                         boolean onPress,
                         boolean capturing)
Creates an instance. Master constructor.

Parameters:
triggerButtons - Value of trigger button flags (Object, specifically MouseSensors.BUTTON_???, KeyboardSensors.KEY_???). None if null. (See ButtonTrigger). If trigger buttons are specified then only a trigger button can fire the trigger.
chordButtons - Value of chord button flags (Object, specifically MouseSensors.BUTTON_???, KeyboardSensors.KEY_???). None if null. (See ButtonTrigger).
domainButtons - Value of domain button flags (Object, specifically MouseSensors.BUTTON_???, KeyboardSensors.KEY_???). None if null. (See ButtonTrigger).
onPress - If true, the trigger fires while buttons are pressed; otherwise, while released.
capturing - If true, trigger is captured during critical states; otherwise, capture is always false.
Method Detail

processResetIn

protected void processResetIn()
Default implementation: Does nothing.

Overrides:
processResetIn in class AbstractButtonTrigger

processButtonsIn

protected void processButtonsIn()
Description copied from class: AbstractButtonTrigger
Called by the system to process the corresponding input event. Only called if enable in and active in are true, and cancel out is false.

Specified by:
processButtonsIn in class AbstractButtonTrigger

processFireableIn

protected void processFireableIn()
Description copied from class: AbstractButtonTrigger
Called by the system to process the corresponding input event. Only called if enable in and active in are true.

Specified by:
processFireableIn in class AbstractButtonTrigger

startArmed

protected void startArmed()
Default implementation: If capturing, stops capturing, then starts armed.

Overrides:
startArmed in class AbstractButtonTrigger

startFire

protected void startFire()
Default implementation: If capturing, starts capturing, then starts fire.

Overrides:
startFire in class AbstractButtonTrigger