hmi.util
Class InputState.KeyPat

java.lang.Object
  extended by hmi.util.InputState.KeyPat
All Implemented Interfaces:
InputState.Pattern
Enclosing class:
InputState

public final class InputState.KeyPat
extends Object
implements InputState.Pattern

standard implementation of InputState.Pattern. A KeyPad Pattern is defined by a list of Keys that are required to be down, and a list of keys requir3ed tyo be up. (Both lists can be null).


Field Summary
private  boolean active
           
private  int[] down
           
private  int[] downLocation
           
private  int[] up
           
private  int[] upLocation
           
 
Constructor Summary
InputState.KeyPat(InputState.Key[] downKeys, InputState.Key[] upKeys)
          Crate a new KeyPat Pattern, for specified lists of ( down and up keys.
 
Method Summary
 void checkState()
           
 boolean isActive()
          returns whether this Pattern is currently active
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

up

private int[] up

down

private int[] down

upLocation

private int[] upLocation

downLocation

private int[] downLocation

active

private volatile boolean active
Constructor Detail

InputState.KeyPat

public InputState.KeyPat(InputState.Key[] downKeys,
                         InputState.Key[] upKeys)
Crate a new KeyPat Pattern, for specified lists of ( down and up keys. Each of downKeys and upKeys can be null.

Method Detail

isActive

public boolean isActive()
returns whether this Pattern is currently active

Specified by:
isActive in interface InputState.Pattern

checkState

public void checkState()
Specified by:
checkState in interface InputState.Pattern