|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--gumbo.interact.button.AbstractButtonTrigger
Abstract base class for button triggers. The trigger states are reset, armed, fire, and cancel, which are mutually exclusive. Subclasses may define additional states.
| Constructor Summary | |
AbstractButtonTrigger(java.util.Collection triggerButtons,
java.util.Collection chordButtons,
java.util.Collection domainButtons)
Creates an instance. |
|
| Method Summary | |
BooleanField.EventIn |
getActiveIn()
Default implementation: True. |
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()
Default implementation: True. |
BooleanField.EventIn |
getFireableIn()
Default implementation: True. |
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_???). |
protected abstract void |
processButtonsIn()
Called by the system to process the corresponding input event. |
protected void |
processCancelIn()
Called by the system to process the corresponding input event. |
protected abstract void |
processFireableIn()
Called by the system to process the corresponding input event. |
protected void |
processResetIn()
Called by the system to process the corresponding input event. |
protected void |
startArmed()
Called by the system to transit to the trigger armed state. |
protected void |
startCancel()
Called by the system to transit to the trigger cancel state. |
protected void |
startFire()
Called by the system to transit to the trigger fire state. |
protected void |
startReset()
Called by the system to transit to the trigger clear state. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public AbstractButtonTrigger(java.util.Collection triggerButtons,
java.util.Collection chordButtons,
java.util.Collection domainButtons)
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).| Method Detail |
protected abstract void processButtonsIn()
protected abstract void processFireableIn()
protected void processResetIn()
protected void processCancelIn()
protected void startArmed()
protected void startFire()
protected void startCancel()
protected void startReset()
public java.util.Collection getTriggerButtons()
ButtonTrigger
getTriggerButtons in interface ButtonTriggerpublic java.util.Collection getChordButtons()
ButtonTrigger
getChordButtons in interface ButtonTriggerpublic java.util.Collection getDomainButtons()
ButtonTrigger
getDomainButtons in interface ButtonTriggerpublic BooleanField.EventIn getEnableIn()
getEnableIn in interface ButtonTriggerpublic BooleanField.EventIn getActiveIn()
getActiveIn in interface ButtonTriggerpublic StateSetField.EventIn getButtonsIn()
ButtonTrigger
getButtonsIn in interface ButtonTriggerpublic BooleanField.EventIn getFireableIn()
getFireableIn in interface ButtonTriggerpublic NotifyNode.EventIn getResetIn()
ButtonTrigger
getResetIn in interface ButtonTriggerpublic BooleanField.EventIn getCancelIn()
ButtonTrigger
getCancelIn in interface ButtonTriggerpublic BooleanField.EventOut getCaptureOut()
ButtonTrigger
getCaptureOut in interface ButtonTriggerpublic BooleanField.EventOut getArmedOut()
ButtonTrigger
getArmedOut in interface ButtonTriggerpublic BooleanField.EventOut getFireOut()
ButtonTrigger
getFireOut in interface ButtonTriggerpublic NotifyNode.EventOut getFireNotifyOut()
ButtonTrigger
getFireNotifyOut in interface ButtonTriggerpublic BooleanField.EventOut getCancelOut()
ButtonTrigger
getCancelOut in interface ButtonTrigger
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||