org.malai.interaction.library
Class PointInteraction

java.lang.Object
  extended by org.malai.interaction.Interaction
      extended by org.malai.interaction.library.PointInteraction
All Implemented Interfaces:
EventHandler, IStateMachine
Direct Known Subclasses:
DoubleClick, Press, SimpleClick

public abstract class PointInteraction
extends Interaction

This abstract interaction defines an interaction used by pointing devices.
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.

04/13/2011

Since:
0.2
Author:
Arnaud BLOUIN

Nested Class Summary
(package private)  class PointInteraction.PointPressureTransition
          A press transition.
 
Field Summary
protected  int button
          The button used for the pressure.
protected  java.awt.Point point
          The pressed position.
protected  Pickable target
          The object picked at the pressed position.
 
Fields inherited from class org.malai.interaction.Interaction
activated, currentState, currentTimeout, handlers, initState, lastHIDUsed, states, stillProcessingEvents
 
Constructor Summary
PointInteraction()
          Creates the interaction.
 
Method Summary
 int getButton()
           
 java.awt.Point getPoint()
           
 Pickable getTarget()
           
 void reinit()
          Reinits the state machine.
 
Methods inherited from class org.malai.interaction.Interaction
addEvent, addHandler, addState, checkTimeoutTransition, clearEventsStillInProcess, getHandlers, getLastHIDUsed, getPickableAt, initStateMachine, 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

point

protected java.awt.Point point
The pressed position.


button

protected int button
The button used for the pressure.


target

protected Pickable target
The object picked at the pressed position.

Constructor Detail

PointInteraction

public PointInteraction()
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 Interaction

getPoint

public java.awt.Point getPoint()
Returns:
The pressed position.
Since:
0.1

getButton

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

getTarget

public Pickable getTarget()
Returns:
The object picked at the pressed position.
Since:
0.1