Package com.rs.seagull.emulator.api
Interface BareCursor
-
- All Known Subinterfaces:
Cursor
public interface BareCursor
A BareCursor represents the current "type-in" point on the screen.- Version:
- $Id$
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
BareCursor.CursorType
This is the type of the cursor.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description com.seagullsw.common.toolbox.geometry.Point
getPosition()
Return the current cursor position.BareCursor.CursorType
getType()
Get the type of cursor.boolean
isVisible()
Returntrue
if the cursor is visible.void
setPosition(int offset)
Set the cursor position.void
setPosition(int x, int y)
Set the cursor position.void
setPosition(com.seagullsw.common.toolbox.geometry.Point at)
Set the cursor position.
-
-
-
Method Detail
-
getPosition
com.seagullsw.common.toolbox.geometry.Point getPosition()
Return the current cursor position. All screen coordinates are relative to 0,0 origin upper left. Will returnnull
when the cursor position has not been set.- Returns:
- the current cursor position or
null
-
setPosition
void setPosition(com.seagullsw.common.toolbox.geometry.Point at) throws UnsupportedOperationException
Set the cursor position. All screen coordinates are relative to 0,0 origin upper left.- Parameters:
at
- the cursor position- Throws:
UnsupportedOperationException
- when the emulator does not support setting the cursor
-
setPosition
void setPosition(int offset) throws UnsupportedOperationException
Set the cursor position. All screen coordinates are relative to 0,0 origin upper left.- Parameters:
offset
- the zero-based offset of the cursor position- Throws:
UnsupportedOperationException
- when the emulator does not support setting the cursor
-
setPosition
void setPosition(int x, int y) throws UnsupportedOperationException
Set the cursor position. All screen coordinates are relative to 0,0 origin upper left.- Parameters:
x
- the horizontal screen coordinate for the cursory
- the vertical screen coordinate for the cursor- Throws:
UnsupportedOperationException
- when the emulator does not support setting the cursor
-
getType
BareCursor.CursorType getType()
Get the type of cursor. Will returnnull
when the cursor type has not been set.- Returns:
- the type of cursor
-
isVisible
boolean isVisible()
Returntrue
if the cursor is visible. This is the same asCursor.getType().isVisible()
, but with a safeguard to returnfalse
when the cursor type has not been set.- Returns:
true
if the cursor is visible orfalse
if the cursor is not visible or the cursor type has not been set
-
-