org.malai.interaction.library
Class KeysTyped

java.lang.Object
  extended by org.malai.interaction.Interaction
      extended by org.malai.interaction.library.KeysTyped
All Implemented Interfaces:
EventHandler, IStateMachine

public class KeysTyped
extends Interaction

A KeyTyped interaction occurs when several keys are typed. It stops when the defined timeout expired.

This file is part of Malai.
Copyright (c) 2009-2012 Arnaud BLOUIN

Malai is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
Malai is distributed without any warranty; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

08/13/2011

Since:
0.2
Author:
Arnaud BLOUIN

Field Summary
protected  java.util.List<java.lang.Integer> keys
          The keys pressed while scrolling.
protected  java.lang.Object object
          The object that produced the interaction.
protected  TimeoutTransition timeoutTransition
          The timeout transition.
 
Fields inherited from class org.malai.interaction.Interaction
activated, currentState, currentTimeout, handlers, initState, lastHIDUsed, states, stillProcessingEvents
 
Constructor Summary
KeysTyped()
          Creates the interaction.
 
Method Summary
 java.util.List<java.lang.Integer> getKeys()
           
 java.lang.Object getObject()
           
 int getTimeout()
           
protected  void initStateMachine()
          Initialises the interaction: creates the states and the transitions.
 void reinit()
          Reinits the state machine.
 void setTimeout(int timeout)
           
 
Methods inherited from class org.malai.interaction.Interaction
addEvent, addHandler, addState, checkTimeoutTransition, clearEventsStillInProcess, getHandlers, getLastHIDUsed, getPickableAt, isRunning, linkToEventable, notifyHandlersOnAborting, notifyHandlersOnStart, notifyHandlersOnStop, notifyHandlersOnUpdate, onAborting, onButtonPressed, onCheckBoxModified, onItemSelected, onKeyPressure, onKeyRelease, onMenuItemPressed, onMove, onPressure, onRelease, onScroll, onSpinnerChanged, onStarting, onTabChanged, onTerminating, onTextChanged, onTimeout, onUpdating, onWindowClosed, processEvents, removeKeyEvent, removePressEvent, setActivated, setLastHIDUsed, stopCurrentTimeout
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

keys

protected java.util.List<java.lang.Integer> keys
The keys pressed while scrolling.


timeoutTransition

protected TimeoutTransition timeoutTransition
The timeout transition. Used to set the timeout value.


object

protected java.lang.Object object
The object that produced the interaction.

Constructor Detail

KeysTyped

public KeysTyped()
Creates the interaction.

Since:
0.2
Method Detail

reinit

public void reinit()
Description copied from interface: IStateMachine
Reinits the state machine.

Specified by:
reinit in interface IStateMachine
Overrides:
reinit in class Interaction

initStateMachine

protected void initStateMachine()
Description copied from class: Interaction
Initialises the interaction: creates the states and the transitions.

Specified by:
initStateMachine in class Interaction

getKeys

public java.util.List<java.lang.Integer> getKeys()
Returns:
the current key pressed.
Since:
0.2

getTimeout

public int getTimeout()
Returns:
the current timeout.
Since:
0.2

setTimeout

public void setTimeout(int timeout)
Parameters:
timeout - the timeout to set. Must be greater than 0.
Since:
0.2

getObject

public java.lang.Object getObject()
Returns:
The object that produced the interaction.
Since:
0.2