public interface PageMessage extends Message
An instance of PageMessage
represents updates to a Page subject.
An object implementing this interface cannot be instantiated directly, but can be constructed
using the MessageFactory
that is available on the
Publisher
interface.
Each update applies to a region of the page that starts at a specific column and row.
If you call setContent(int, int, String)
more than once, and the page regions specified
in successive calls overlap, the updates are still held separately in the message; they are not
merged together.
Modifier and Type | Method and Description |
---|---|
int |
getHeight()
Gets the height of the page, in text rows.
|
java.lang.String |
getPageType()
Gets the type of the page.
|
java.util.List<PageElement> |
getUpdatedElements()
Gets a read-only list of the updated page elements.
|
int |
getWidth()
Gets the width of the page, in text columns.
|
void |
setContent(int column,
int row,
java.lang.String content)
Updates the contents of the page at the specified location.
|
void |
setHeight(int height)
Sets the height of the page, in text rows.
|
void |
setPageType(java.lang.String pageType)
Sets the type of the page.
|
void |
setWidth(int width)
Sets the width of the page, in text columns.
|
getSubject, isImage, setImage
void setContent(int column, int row, java.lang.String content)
Updates the contents of the page at the specified location.
column
- The column at which the content is to be updated. The leftmost column of the page is
column 0.row
- The row at which the content is to be updated. The top row of the page is row 0.content
- The page content to be placed at the specified row and column.int getWidth()
Gets the width of the page, in text columns.
This value is valid on all PageMessage
instances created using the
MessageFactory
interface. However it may be undefined
(and hence have a value of -1) on instances received by an implementation of
SubscriptionListener
The first character on a page is at column zero. Therefore the maximum modifiable column is at position (Width - 1).
void setWidth(int width)
Sets the width of the page, in text columns.
This value is valid on all PageMessage
instances created using the
MessageFactory
interface. However it may be undefined
(and hence have a value of -1) on instances received by an implementation of
SubscriptionListener
.
The first character on a page is at column zero. Therefore the maximum modifiable column is at position (Width - 1).
width
- The width of the page, in text columns.int getHeight()
Gets the height of the page, in text rows.
This value is valid on all PageMessage
instances created using the
MessageFactory
interface, however it may be undefined (and hence have a value of
-1) on instances received by an implementation of
SubscriptionListener
.
The first character on a page is at row zero. Therefore the maximum modifiable row is at position (height - 1).
void setHeight(int height)
Sets the height of the page, in text rows.
The first character on a page is at row zero. Therefore the maximum modifiable row is at row (height - 1).
height
- The height of the page, in text rows.java.lang.String getPageType()
Gets the type of the page.
The type of the page is available to StreamLink clients and can be used to control the display of the page.
void setPageType(java.lang.String pageType)
Sets the type of the page.
The type of the page is available to StreamLink clients and can be used to control the display of the page.
pageType
- The type of the page.java.util.List<PageElement> getUpdatedElements()
Gets a read-only list of the updated page elements.
Please send bug reports and comments to Caplin support