org.malai.interaction.library
Class KeysScrolling

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

public class KeysScrolling
extends Scrolling

Defines an interaction based on mouse scrolling and keyboard.

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.

05/13/2010

Since:
0.2
Version:
0.2
Author:
Arnaud BLOUIN

Nested Class Summary
 
Nested classes/interfaces inherited from class org.malai.interaction.library.Scrolling
Scrolling.ScrollingScrollTransition
 
Field Summary
protected  int keyHIDUsed
          The id of the hid used for the keyboard events.
protected  java.util.List<java.lang.Integer> keys
          The keys pressed while scrolling.
 
Fields inherited from class org.malai.interaction.library.Scrolling
increment, px, py, scrollTarget
 
Fields inherited from class org.malai.interaction.Interaction
activated, currentState, currentTimeout, handlers, initState, lastHIDUsed, states, stillProcessingEvents
 
Constructor Summary
KeysScrolling()
          Creates the interaction.
 
Method Summary
 int getKeyHIDUsed()
           
 java.util.List<java.lang.Integer> getKeys()
           
protected  void initStateMachine()
          Initialises the interaction: creates the states and the transitions.
 void reinit()
          Reinits the state machine.
protected  void setKeyHIDUsed(int keyHIDUsed)
           
 
Methods inherited from class org.malai.interaction.library.Scrolling
getIncrement, getPx, getPy, getScrollTarget
 
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.


keyHIDUsed

protected int keyHIDUsed
The id of the hid used for the keyboard events.

Constructor Detail

KeysScrolling

public KeysScrolling()
Creates the interaction.

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 Scrolling

initStateMachine

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

Overrides:
initStateMachine in class Scrolling

getKeys

public java.util.List<java.lang.Integer> getKeys()
Returns:
The keys pressed while scrolling.
Since:
0.2

getKeyHIDUsed

public int getKeyHIDUsed()
Returns:
the The id of the hid used for the keyboard events.
Since:
0.2

setKeyHIDUsed

protected void setKeyHIDUsed(int keyHIDUsed)
Parameters:
keyHIDUsed - The id of the hid used for the keyboard events.
Since:
0.2