jcontrol.io
Class Touch

java.lang.Object
  extended by jcontrol.io.Touch
All Implemented Interfaces:
IPointingDevice

public class Touch
extends Object
implements IPointingDevice

Implements the TouchScreen of JControl-Devices


Constructor Summary
Touch()
          creates a new Touch-Object
 
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)
protected  void finalize()
          native finalize method
 int getRawX()
          used to calibrate the touchscreen
 int getRawY()
          used to calibrate the touchscreen
 int getX()
          returns the last X-Coordinates of TouchEvent
 int getY()
          returns the last Y-Coordinates of TouchEvent
 boolean isPressed()
          returns true if right now touched (native implemenation)
 
Methods inherited from class java.lang.Object
clone, equals, getClass, notifyAll, toString, wait
 

Constructor Detail

Touch

public Touch()
      throws IOException
creates a new Touch-Object

Throws:
IOException - if not Touch exist
Method Detail

isPressed

public boolean isPressed()
returns true if right now touched (native implemenation)

Specified by:
isPressed in interface IPointingDevice
Returns:
true if right now touched

getX

public int getX()
returns the last X-Coordinates of TouchEvent

Specified by:
getX in interface IPointingDevice
Returns:
the last X-Coordinates

getY

public int getY()
returns the last Y-Coordinates of TouchEvent

Specified by:
getY in interface IPointingDevice
Returns:
the last Y-Coordinates

calibrate

public 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)

Specified by:
calibrate in interface IPointingDevice

getRawX

public int getRawX()
used to calibrate the touchscreen

Specified by:
getRawX in interface IPointingDevice
Returns:
the raw X coordinate

getRawY

public int getRawY()
used to calibrate the touchscreen

Specified by:
getRawY in interface IPointingDevice
Returns:
the raw Y coordinate

finalize

protected void finalize()
native finalize method