Interface PageMessage
-
- All Superinterfaces:
Message
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 thePublisher
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.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method 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.-
Methods inherited from interface com.caplin.datasource.messaging.Message
getMessageType, getSubject, isImage, setImage
-
-
-
-
Method Detail
-
setContent
void setContent(int column, int row, java.lang.String content)
Updates the contents of the page at the specified location.
- Parameters:
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.
-
getWidth
int getWidth()
Gets the width of the page, in text columns.
This value is valid on all
PageMessage
instances created using theMessageFactory
interface. However it may be undefined (and hence have a value of -1) on instances received by an implementation ofSubscriptionListener
The first character on a page is at column zero. Therefore the maximum modifiable column is at position (Width - 1).
- Returns:
- The width of the page, in text columns.
-
setWidth
void setWidth(int width)
Sets the width of the page, in text columns.
This value is valid on all
PageMessage
instances created using theMessageFactory
interface. However it may be undefined (and hence have a value of -1) on instances received by an implementation ofSubscriptionListener
.The first character on a page is at column zero. Therefore the maximum modifiable column is at position (Width - 1).
- Parameters:
width
- The width of the page, in text columns.
-
getHeight
int getHeight()
Gets the height of the page, in text rows.
This value is valid on all
PageMessage
instances created using theMessageFactory
interface, however it may be undefined (and hence have a value of -1) on instances received by an implementation ofSubscriptionListener
.The first character on a page is at row zero. Therefore the maximum modifiable row is at position (height - 1).
- Returns:
- The height of the page, in text rows.
-
setHeight
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).
- Parameters:
height
- The height of the page, in text rows.
-
getPageType
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.
- Returns:
- The type of the page.
-
setPageType
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.
- Parameters:
pageType
- The type of the page.
-
getUpdatedElements
java.util.List<PageElement> getUpdatedElements()
Gets a read-only list of the updated page elements.
- Returns:
- The updated page elements.
-
-