gumbo.interact.button
Class PulseButtonTrigger

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

public class PulseButtonTrigger
extends LatchButtonTrigger

Similar to a LatchButtonTrigger but upon firing the latch is immediately reset, hence the fire output event is a "pulse". Unless a lingering fire state is needed, this trigger should be used in lieu of a latch trigger.

A pulse output is especially useful in situations where two triggers are controlling the same interactor. Without a pulse output the fire state of one trigger may be lingering when the other trigger becomes armed, thereby causing a state policy violation (both armed and fire flags are present). Using pulse triggers avoids this posibility.

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

Constructor Summary
PulseButtonTrigger(java.util.Collection triggerButtons, java.util.Collection chordButtons, java.util.Collection domainButtons)
          Creates a default trigger (fires on button release, captures during the armed state).
PulseButtonTrigger(java.util.Collection triggerButtons, java.util.Collection chordButtons, java.util.Collection domainButtons, boolean onPress, boolean capturing)
          Creates an instance.
 
Methods inherited from class gumbo.interact.button.LatchButtonTrigger
isOneShot, processButtonsIn, processFireableIn, startArmed, startFire, startRearmable
 
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, processResetIn, startCancel, startReset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PulseButtonTrigger

public PulseButtonTrigger(java.util.Collection triggerButtons,
                          java.util.Collection chordButtons,
                          java.util.Collection domainButtons)
Creates a default trigger (fires on button release, captures during the armed state).

Parameters:
triggerButtons - Value of trigger button flags (Object, specifically MouseSensors.BUTTON_???, KeyboardSensors.KEY_???). None if null. (See ButtonTrigger).
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).

PulseButtonTrigger

public PulseButtonTrigger(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).
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 when buttons are pressed; otherwise, when released.
capturing - If true, trigger is captured during critical states; otherwise, capture is always false.