org.malai.interaction
Class KeyboardTransition

java.lang.Object
  extended by org.malai.interaction.Transition
      extended by org.malai.interaction.KeyboardTransition
All Implemented Interfaces:
ITransition
Direct Known Subclasses:
KeyPressureTransition, KeyReleaseTransition

public abstract class KeyboardTransition
extends Transition

This abstract transition is used a model for transition based on keyboard events.

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.

06/01/2010

Since:
0.1
Author:
Arnaud BLOUIN

Field Summary
protected  int key
          The pressed key.
protected  java.lang.Object source
          The object that produced the event.
 
Fields inherited from class org.malai.interaction.Transition
hid, inputState, outputState
 
Constructor Summary
KeyboardTransition(SourceableState inputState, TargetableState outputState)
          Transition.Transition(SourceableState, TargetableState)
 
Method Summary
 int getKey()
           
 java.lang.Object getSource()
           
 void setKey(int key)
          Sets the pressed key.
 void setSource(java.lang.Object source)
           
 
Methods inherited from class org.malai.interaction.Transition
action, getHid, getInputState, getOutputState, isGuardRespected, setHid, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

key

protected int key
The pressed key.


source

protected java.lang.Object source
The object that produced the event.

Constructor Detail

KeyboardTransition

public KeyboardTransition(SourceableState inputState,
                          TargetableState outputState)
Transition.Transition(SourceableState, TargetableState)

Method Detail

getKey

public int getKey()
Returns:
The pressed key.
Since:
0.1

setKey

public void setKey(int key)
Sets the pressed key.

Parameters:
key - The pressed key.
Since:
0.1

getSource

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

setSource

public void setSource(java.lang.Object source)
Parameters:
source - The object that produced the event.
Since:
0.2