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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MouseGestures
public MouseGestures()
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
|