gumbo.interact.button
Class ClickAdapter

java.lang.Object
  |
  +--gumbo.interact.button.ClickAdapter

public class ClickAdapter
extends java.lang.Object

An adapter that detects button clicks in a click sequence.

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

Constructor Summary
ClickAdapter()
          Creates an instance with the current system click time.
ClickAdapter(int time)
          Creates an instance.
 
Method Summary
 BooleanField.EventOut getActiveOut()
          Sends true while a click sequence is active.
 NotifyNode.EventIn getClickIn()
          Received each time a button click occurs.
 IntField.EventOut getCountOut()
          Sends the click count for each button click in a sequence.
 NotifyNode.EventOut getDoubleOut()
          Convenience event that fires after click out sends 2.
 NotifyNode.EventOut getSingleOut()
          Convenience event that fires after click out sends 1.
 NotifyNode.EventOut getTripleOut()
          Convenience event that fires after click out sends 3.
protected  void stopActive()
          Called by the system when the click sequence ends and active out should stop.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClickAdapter

public ClickAdapter()
Creates an instance with the current system click time. (TODO: Have to figure out how to get the click speed time from the system. In the meantime, uses a reasonable number.)


ClickAdapter

public ClickAdapter(int time)
Creates an instance.

Parameters:
time - The maximum time allowed between clicks, in milliseconds. >0.
Method Detail

getClickIn

public NotifyNode.EventIn getClickIn()
Received each time a button click occurs. Typically the fire notify out of a non-latching button trigger.


getCountOut

public IntField.EventOut getCountOut()
Sends the click count for each button click in a sequence. Sends 1 for the first click, after active out goes true; and, sends 0 when the sequence is done, before active out goes false.


getSingleOut

public NotifyNode.EventOut getSingleOut()
Convenience event that fires after click out sends 1.


getDoubleOut

public NotifyNode.EventOut getDoubleOut()
Convenience event that fires after click out sends 2.


getTripleOut

public NotifyNode.EventOut getTripleOut()
Convenience event that fires after click out sends 3.


getActiveOut

public BooleanField.EventOut getActiveOut()
Sends true while a click sequence is active. While false, no output events are generated.


stopActive

protected void stopActive()
Called by the system when the click sequence ends and active out should stop. Default implementation: Outputs a zero click count and sets active out false.