org.malai.interaction
Class PointingDeviceTransition

java.lang.Object
  extended by org.malai.interaction.Transition
      extended by org.malai.interaction.PointingDeviceTransition
All Implemented Interfaces:
ITransition
Direct Known Subclasses:
MoveTransition, PressureTransition, ReleaseTransition, ScrollTransition

public abstract class PointingDeviceTransition
extends Transition

This abstract transition defines a model for transitions based on pointing device 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 button
          The button used.
protected  java.lang.Object source
          The object picked at the position (x, y).
protected  int x
          The X-coordinate of the pointing device.
protected  int y
          The Y-coordinate of the pointing device.
 
Fields inherited from class org.malai.interaction.Transition
hid, inputState, outputState
 
Constructor Summary
PointingDeviceTransition(SourceableState inputState, TargetableState outputState)
          Transition.Transition(SourceableState, TargetableState)
 
Method Summary
 int getButton()
           
 java.lang.Object getSource()
           
 int getX()
           
 int getY()
           
 void setButton(int button)
          Sets the button of the pointing device used by the event.
 void setSource(java.lang.Object source)
          Sets the object picked at the position (x, y).
 void setX(int x)
          Sets the X-coordinate of the pointing device.
 void setY(int y)
          Sets the Y-coordinate of the pointing device.
 
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

x

protected int x
The X-coordinate of the pointing device.


y

protected int y
The Y-coordinate of the pointing device.


button

protected int button
The button used.


source

protected java.lang.Object source
The object picked at the position (x, y).

Constructor Detail

PointingDeviceTransition

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

Method Detail

getButton

public int getButton()
Returns:
The button used.
Since:
0.1

getSource

public java.lang.Object getSource()
Returns:
The object picked at the position (x, y).
Since:
0.1

setSource

public void setSource(java.lang.Object source)
Sets the object picked at the position (x, y).

Parameters:
source - The object picked at the position (x, y).
Since:
0.1

setButton

public void setButton(int button)
Sets the button of the pointing device used by the event.

Parameters:
button - The button used.
Since:
0.1

getX

public int getX()
Returns:
The X-coordinate of the pointing device.
Since:
0.1

setX

public void setX(int x)
Sets the X-coordinate of the pointing device.

Parameters:
x - The X-coordinate of the pointing device.
Since:
0.1

getY

public int getY()
Returns:
The Y-coordinate of the pointing device.
Since:
0.1

setY

public void setY(int y)
Sets the Y-coordinate of the pointing device.

Parameters:
y - The Y-coordinate of the pointing device.
Since:
0.1