public interface PresentationSpace
Modifier and Type | Interface and Description |
---|---|
static class |
PresentationSpace.SearchDirection
Used for search related methods.
|
Modifier and Type | Method and Description |
---|---|
void |
addPresentationSpaceListener(PresentationSpaceListener listener,
PresentationSpaceEvent.Origin... origin)
Registers a listener to receive presentation space events from this
PresentationSpace instance.
|
Position |
getCursorPosition()
Returns a Position instance representing the current cursor position.
|
List<DataCell> |
getDataCells()
Returns a list of DataCell instances representing each position of the
presentation space with the first member of the list being the first
position on the host screen and the last member being the last position.
|
List<DataCell> |
getDataCells(Position start,
int length)
Returns a list of DataCell instances where the first member of the list
will be for the position specified by the start parameter.
|
FieldList |
getFields()
Returns a list of the fields in the presentation space.
|
Dimension |
getSize()
Returns the size of the screen as a Dimension object.
|
String |
getText(Position start,
int length)
Returns a string representing a linear area of the presentation space.
|
boolean |
isCursorVisible()
Tests if the cursor is currently visible in the presentation space.
|
boolean |
removePresentationSpaceListener(PresentationSpaceListener listener)
Unregisters a listener that no longer wishes to receive presentation
space events from this PresentationSpace instance.
|
void |
sendKeys(String s)
Transmits a string and/or terminal keys to the host at the current cursor
position in the presentation space.
|
void |
setCursorPosition(Position location)
Moves the host cursor to the specified row and column position.
|
void addPresentationSpaceListener(PresentationSpaceListener listener, PresentationSpaceEvent.Origin... origin)
PresentationSpaceEvent.Origin.HOST
and
PresentationSpaceEvent.Origin.USER
regardless of what is
specified for the event origin.listener
- the object that wishes to receive events.origin
- optional filter for events the listener wishes to receive.
Defaults to PresentationSpaceEvent.Origin.HOST
and
PresentationSpaceEvent.Origin.USER
if no origin is specified.PresentationSpaceEvent.Origin
boolean removePresentationSpaceListener(PresentationSpaceListener listener)
listener
- the PresentationSpaceListener instance to be removedFieldList getFields()
FieldList
List<DataCell> getDataCells() throws PresentationSpaceException
PresentationSpaceException
- if an error occursList<DataCell> getDataCells(Position start, int length) throws PresentationSpaceException
start
- the first position on the host screen in which to retrieve
DataCell instances forlength
- the maximum number of DataCell instances to be retrievedInvalidPositionException
- if the start parameter in not part of
the presentation spacePresentationSpaceException
- if an error occursString getText(Position start, int length) throws PresentationSpaceException
start
- the start position in which to retrieve text forlength
- the maximum number of characters to return. If the length
parameter would cause the last position of the presentation space to be
exceeded then only those characters up to the last position will be
returned.InvalidPositionException
- if the start parameter in not part of
the presentation spacePresentationSpaceException
- if an error occurs.Dimension getSize()
Position getCursorPosition()
void setCursorPosition(Position location) throws PresentationSpaceException
location
- a Position instance representing where the cursor should
be moved to.InvalidPositionException
- if the location parameter is out of
range for the presentation space.PresentationSpaceException
- if an error occurs.boolean isCursorVisible()
void sendKeys(String s) throws PresentationSpaceException
s
- the string of text and key mnemonics to transmit.PresentationSpaceException
- if an error occurs in parsing or
transmitting the stringCopyright © 2020 Micro Focus. All rights reserved.