Home about services products contact login
   com.smardec

Mouse Gestures

  mousegestures
com.smardec.mousegestures
Class MouseGestures

java.lang.Object
|
+--com.smardec.mousegestures.MouseGestures

public class MouseGestures
extends java.lang.Object

Main class for mouse gestures.
Sample usage:

      MouseGestures mouseGestures = new MouseGestures();
      mouseGestures.addMouseGesturesListener(myMouseGesturesListener);
      mouseGestures.start();

Version:
1.2
Author:
Smardec

Constructor Summary
MouseGestures()
Method Summary
void addMouseGesturesListener(MouseGesturesListener listener)
Adds mouse gestures listener.
int getGridSize()
Returns current grid size (minimum mouse movement length to be recognized).
int getMouseButton()
Returns mouse button used for gestures handling.
void removeMouseGesturesListener(MouseGesturesListener listener)
Removes mouse gestures listener.
void setGridSize(int gridSize)
Sets grid size (minimum mouse movement length to be recognized).
void setMouseButton(int mouseButton)
Sets mouse button used for gestures handling.
void start()
Starts monitoring mouse gestures.
void stop()
Stops monitoring mouse gestures.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail
MouseGestures
public MouseGestures()

Method Detail
start
public void start()
Starts monitoring mouse gestures.


stop
public void stop()
Stops monitoring mouse gestures.


getGridSize
public int getGridSize()
Returns current grid size (minimum mouse movement length to be recognized).

Returns:
Grid size in pixels. Default is 30.

setGridSize
public void setGridSize(int gridSize)
Sets grid size (minimum mouse movement length to be recognized).

Parameters:
gridSize - New grid size in pixels

getMouseButton
public int getMouseButton()
Returns mouse button used for gestures handling.

Returns:
MouseEvent.BUTTON1_MASK, MouseEvent.BUTTON2_MASK or MouseEvent.BUTTON3_MASK

setMouseButton
public void setMouseButton(int mouseButton)
Sets mouse button used for gestures handling.

Parameters:
mouseButton - MouseEvent.BUTTON1_MASK, MouseEvent.BUTTON2_MASK or MouseEvent.BUTTON3_MASK

addMouseGesturesListener
public void addMouseGesturesListener(MouseGesturesListener listener)
Adds mouse gestures listener.

Parameters:
listener - Instance of MouseGesturesListener

removeMouseGesturesListener
public void removeMouseGesturesListener(MouseGesturesListener listener)
Removes mouse gestures listener.

Parameters:
listener - Instance of MouseGesturesListener
Home about services products contact login