Package ilcd
Class TouchEvent

Public Method getY

int getY()

_INSERT_METHOD_SIGNATURE_HERE_

Description:

Returns Range Description
y created and defined touch field height:
- display height ... display height - 1
y value depends on the cursor position of the created and defined touch field

With the getY() method the y position of the current event is returned. The value of the y coordinate depends not on the screen but on the defined and created touch field. So if a defined and created touch field starts with a current cursor position of 100/100 (y/x coordinate). The getY() method will return 0 even if the absolute y coordinate is 100. The getY() method returns the y coordinate of the current touch field, and not the absolute y coordinate of the entire screen.

Example

public void onTouch(TouchEvent event)

{ ...

   if(event.isTouchReleased())

   {

      Draw.writeText(" getY: " + event.getY());

      ...

See also:

Touch.isTouchPressed()
Touch.isTouchReleased()