Package ilcd
Class ScreenParameters

Public Method getX

int getX()

_INSERT_METHOD_SIGNATURE_HERE_

Description:

Returns Range Description
x 0 ... display width -1 a integer which contains the width value

Returns the horizontal coordinate of the cursor position related to the viewport in the range of 0 ... display width - 1.

Example

// define and select a new viewport
Control.setCursorPosition(310,210);
Control.defineViewport(3, 2, 250, 200);
Control.selectViewport(3);

// set a new cursor position within the current selected viewport
Control.setCursorPosition(10,10);

// get screen parameter
ScreenParameters scrPar = Memory.getViewScreenParameters();
if (scrPar.getX() == 10) // verify if the cursor position is setup correctly
{
   Draw.writeText(" The current x cursor position is 10 within the viewport 3! ");
}

See also:

Memory.getDrawScreenParameters()
Memory.getViewScreenParameters()