public class RAPPHostCell extends Object implements RAPPEnumerationItem, RAPPHostReply
The information for each host cell is:
The class is intended form data exchange from the server to the client.
See the class RAPPCallHost for example.
RAPPCallHost
Modifier | Constructor and Description |
---|---|
protected |
RAPPHostCell()
Creates an empty host cell with no data initialized
used for serializing data with XML documents.
|
|
RAPPHostCell(String name,
int length,
int hostLength,
int column,
int hostColumn,
int hostFieldColumn,
int row,
int hostRow,
int hostFieldRow,
boolean isProtected,
boolean isHidden,
int color,
String value,
int index)
Creates a new host cell initialized with the information
about it.
|
Modifier and Type | Method and Description |
---|---|
int |
getBackgroundColor()
Gets the background color.
|
int |
getColor()
Gets the combined fore- and background colors.
|
int |
getColumn()
Gets the column where the field starts on the screen of the Phantom
Host Field definition (first column = 0).
|
int |
getForegroundColor()
Gets the foreground color.
|
int |
getHostColumn()
Gets the column where the terminal host field starts (first column = 0),
host pop-up window taken into account.
|
int |
getHostFieldColumn()
Gets the column where the terminal "real" host field starts
(first column = 0).
|
int |
getHostFieldRow()
Gets the row where the terminal "real" host field starts
(first row = 0).
|
int |
getHostLength()
Gets the length of the terminal underlying host field where the
field starts, host pop-up window taken into account.
|
int |
getHostRow()
Gets the row where the terminal host field starts (first row = 0),
host pop-up window taken into account.
|
int |
getIndex()
The index of this cell in an enumeration of cells,
-1 indicates a single field.
|
int |
getLength()
Gets the length of this cell in the Phantom Host Field definition.
|
String |
getName()
Gets the name of the host field.
|
int |
getRow()
Gets the row where the field starts on the screen of the Phantom
Host Field definition (first row = 0).
|
String |
getValue()
The string contents of the host field, even if the field
|
boolean |
isHidden()
Gets the flag indicating if the underlying host field is hidden
or not.
|
boolean |
isProtected()
Gets the flag indicating if the underlying host field is protected
or not.
|
void |
serializeFromDocument(RAPPElement reply,
int index)
Initializes the item class instance from a reply element
in the enumeration.
|
void |
serializeFromReply(RAPPElement reply)
Initializes the host cell class instance from a
reply element.
|
void |
serializeToDocument(RAPPElement reply,
int index)
Initializes reply Element for the item in the enumeration.
|
void |
serializeToReply(RAPPElement reply)
Initializes the reply Element with all attributes.
|
String |
toString()
Converts this class into a string for testing purposes.
|
protected RAPPHostCell()
public RAPPHostCell(String name, int length, int hostLength, int column, int hostColumn, int hostFieldColumn, int row, int hostRow, int hostFieldRow, boolean isProtected, boolean isHidden, int color, String value, int index)
public String getName()
public int getLength()
Note that host fields can wrap the screen both right-to-left and bottom-to-top.
public int getHostLength()
Note that host fields can wrap the screen both right-to-left and bottom-to-top.
public int getColumn()
public int getHostColumn()
public int getRow()
public int getHostRow()
public int getHostFieldColumn()
Note that host fields can wrap the screen both right-to-left and bottom-to-top.
public int getHostFieldRow()
Note that host fields can wrap the screen both right-to-left and bottom-to-top.
public boolean isProtected()
public boolean isHidden()
public int getForegroundColor()
The table below indicates the color values:
0 = black 1 = dark blue 2 = dark green 3 = dark cyan 4 = dark red 5 = dark pink 6 = brown 7 = pale gray 8 = dark gray 9 = blue 10 = green 11 = cyan 12 = red 13 = pink 14 = yellow 15 = white
public int getBackgroundColor()
The table below indicates the color values:
0 = black 1 = dark blue 2 = dark green 3 = dark cyan 4 = dark red 5 = dark pink 6 = brown 7 = pale gray 8 = dark gray 9 = blue 10 = green 11 = cyan 12 = red 13 = pink 14 = yellow 15 = white
public int getColor()
To extract the foreground color, use color & 0x0f
.
To extract the background color, use
((color & 0xf0) >> 4)
.
public String getValue()
public int getIndex()
public void serializeToReply(RAPPElement reply)
The XML for the node looks like (replace parenthesis with less-more-than signs):
(hostCell name = "FLDNAME" length = "20" [ hostLength = "78" ] column = "28" [ hostColumn = "1" ] [ hostFieldColumn = "0" ] row = "10" [ hostRow = "8" ] [ hostFieldRow = "8" ] protected = "true" hidden = "false" color = "7" value = "Abraham Lincoln" [ index = "12" ] /)
serializeToReply
in interface RAPPHostReply
RAPPHostCell
,
RAPPHostCells
,
RAPPHostScreen
public void serializeToDocument(RAPPElement reply, int index)
index
parameter indicates the index in
the enumeration of the element.serializeToDocument
in interface RAPPEnumerationItem
public void serializeFromReply(RAPPElement reply) throws SAXException
serializeFromReply
in interface RAPPHostReply
SAXException
- for errors in the document.public void serializeFromDocument(RAPPElement reply, int index) throws SAXException
serializeFromDocument
in interface RAPPEnumerationItem
SAXException
- for errors in the document.Phantom® and NetPhantom® are registered trademarks of Mindus SARL.
© © Mindus SARL, 2024. All rights reserved.