jcontrol.io
Interface IPointingDevice

All Known Implementing Classes:
Touch

public interface IPointingDevice


Method Summary
 void calibrate(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3)
          used to calibrate the touchscreen by the 4 corner-points of touch

(x0,y0)                  (x1,y1)
  +------------------------+
  |                        |
  |                        |
  |                        |
  |                        |
  |                        |
  +------------------------+
(x3,y3)                  (x2,y2)
 int getRawX()
          used to calibrate the touchscreen
 int getRawY()
          used to calibrate the touchscreen
 int getX()
          Returns the x-coordinate of the (last) touch.
 int getY()
          Returns the y-coordinate of the (last) touch.
 boolean isPressed()
          Returns true if touch is pressed.
 

Method Detail

isPressed

boolean isPressed()
Returns true if touch is pressed.


getX

int getX()
Returns the x-coordinate of the (last) touch.


getY

int getY()
Returns the y-coordinate of the (last) touch.


calibrate

void calibrate(int x0,
               int y0,
               int x1,
               int y1,
               int x2,
               int y2,
               int x3,
               int y3)
used to calibrate the touchscreen by the 4 corner-points of touch

(x0,y0)                  (x1,y1)
  +------------------------+
  |                        |
  |                        |
  |                        |
  |                        |
  |                        |
  +------------------------+
(x3,y3)                  (x2,y2)


getRawX

int getRawX()
used to calibrate the touchscreen

Returns:
the raw X coordinate

getRawY

int getRawY()
used to calibrate the touchscreen

Returns:
the raw Y coordinate