synergynetframework.mtinput.simulator
Class DoubleFingerSimCursor

java.lang.Object
  extended by synergynetframework.mtinput.simulator.AbstractSimCursor
      extended by synergynetframework.mtinput.simulator.DoubleFingerSimCursor

public class DoubleFingerSimCursor
extends AbstractSimCursor

Behaviour: right-click + hold with a drag then release to define the first finger and second finger. Hold shift to rotate. Hold CTRL to scale. Left-click to finish.

Author:
dcs3ash

Field Summary
static int MODE_INITIAL_DISTANCE
          The Constant MODE_INITIAL_DISTANCE.
static int MODE_MOVE
          The Constant MODE_MOVE.
static int MODE_ROT
          The Constant MODE_ROT.
static int MODE_SCALE
          The Constant MODE_SCALE.
 
Fields inherited from class synergynetframework.mtinput.simulator.AbstractSimCursor
KEY_CONTROL, KEY_SHIFT, KEY_SPACE, MOUSE_BUTTON_LEFT, MOUSE_BUTTON_MIDDLE, MOUSE_BUTTON_RIGHT
 
Constructor Summary
DoubleFingerSimCursor(IMultiTouchSimulator simulator, int id1, int id2, int screenWidth, int screenHeight)
          Instantiates a new double finger sim cursor.
 
Method Summary
 java.awt.Point getCentralPoint()
          Gets the central point.
 java.awt.Point getFirstCursorPosition()
          Gets the first cursor position.
 int getIDForCursor1()
          Gets the ID for cursor1.
 int getIDForCursor2()
          Gets the ID for cursor2.
 int getMode()
          Gets the mode.
 int getMouseX()
          Gets the mouse x.
 int getMouseY()
          Gets the mouse y.
 java.awt.Point getSecondCursorPosition()
          Gets the second cursor position.
 void keyPressed(java.lang.String key)
          Key pressed.
 void keyReleased(java.lang.String key)
          Key released.
 void mouseDragged(int x, int y, int button)
          Mouse dragged.
 void mouseMoved(int x, int y)
          Mouse moved.
 void mousePressed(int x, int y, int button)
          Mouse pressed.
 void mouseReleased(int x, int y, int buttonNumber)
          Mouse released.
 
Methods inherited from class synergynetframework.mtinput.simulator.AbstractSimCursor
getScaledX, getScaledY
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MODE_INITIAL_DISTANCE

public static final int MODE_INITIAL_DISTANCE
The Constant MODE_INITIAL_DISTANCE.

See Also:
Constant Field Values

MODE_MOVE

public static final int MODE_MOVE
The Constant MODE_MOVE.

See Also:
Constant Field Values

MODE_ROT

public static final int MODE_ROT
The Constant MODE_ROT.

See Also:
Constant Field Values

MODE_SCALE

public static final int MODE_SCALE
The Constant MODE_SCALE.

See Also:
Constant Field Values
Constructor Detail

DoubleFingerSimCursor

public DoubleFingerSimCursor(IMultiTouchSimulator simulator,
                             int id1,
                             int id2,
                             int screenWidth,
                             int screenHeight)
Instantiates a new double finger sim cursor.

Parameters:
simulator - the simulator
id1 - the id1
id2 - the id2
screenWidth - the screen width
screenHeight - the screen height
Method Detail

getCentralPoint

public java.awt.Point getCentralPoint()
Gets the central point.

Returns:
the central point

getFirstCursorPosition

public java.awt.Point getFirstCursorPosition()
Gets the first cursor position.

Returns:
the first cursor position

getIDForCursor1

public int getIDForCursor1()
Gets the ID for cursor1.

Returns:
the ID for cursor1

getIDForCursor2

public int getIDForCursor2()
Gets the ID for cursor2.

Returns:
the ID for cursor2

getMode

public int getMode()
Gets the mode.

Returns:
the mode

getMouseX

public int getMouseX()
Gets the mouse x.

Returns:
the mouse x

getMouseY

public int getMouseY()
Gets the mouse y.

Returns:
the mouse y

getSecondCursorPosition

public java.awt.Point getSecondCursorPosition()
Gets the second cursor position.

Returns:
the second cursor position

keyPressed

public void keyPressed(java.lang.String key)
Description copied from class: AbstractSimCursor
Key pressed.

Specified by:
keyPressed in class AbstractSimCursor
Parameters:
key - the key

keyReleased

public void keyReleased(java.lang.String key)
Description copied from class: AbstractSimCursor
Key released.

Specified by:
keyReleased in class AbstractSimCursor
Parameters:
key - the key

mouseDragged

public void mouseDragged(int x,
                         int y,
                         int button)
Description copied from class: AbstractSimCursor
Mouse dragged.

Specified by:
mouseDragged in class AbstractSimCursor
Parameters:
x - the x
y - the y
button - the button number

mouseMoved

public void mouseMoved(int x,
                       int y)
Description copied from class: AbstractSimCursor
Mouse moved.

Specified by:
mouseMoved in class AbstractSimCursor
Parameters:
x - the x
y - the y

mousePressed

public void mousePressed(int x,
                         int y,
                         int button)
Description copied from class: AbstractSimCursor
Mouse pressed.

Specified by:
mousePressed in class AbstractSimCursor
Parameters:
x - the x
y - the y
button - the button number

mouseReleased

public void mouseReleased(int x,
                          int y,
                          int buttonNumber)
Description copied from class: AbstractSimCursor
Mouse released.

Specified by:
mouseReleased in class AbstractSimCursor
Parameters:
x - the x
y - the y
buttonNumber - the button number