public class PageElement extends java.lang.Object implements RepeatedOutput
Please note that the only requirement for this output is that the number
of lines which it consumes MUST be constant across all invocations of the
render(com.goldencode.p2j.util.Stream) method. This is necessary to properly determine when a
header/footer needs to be emitted. The output within the given number of
lines may vary (e.g. page numbers may increment).
| Modifier and Type | Field and Description |
|---|---|
private int |
frameId
The frame id of the frame to be output.
|
private int |
height
The total number of rows output during rendering.
|
private ThinClient |
term
The client terminal which is redirected to a paged output stream.
|
| Constructor and Description |
|---|
PageElement(ThinClient term,
int frameId)
Construct a page element and initialize its data structures.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object x)
Compares two objects for equality.
|
int |
hashCode()
Return a hash code for the instance.
|
int |
height()
Returns the height of the output as the number of lines that will be
generated when
render(com.goldencode.p2j.util.Stream) is called. |
void |
render(Stream out)
Generate output and write it to the given stream.
|
private ThinClient term
private int frameId
private int height
public PageElement(ThinClient term, int frameId)
term - The client terminal which is redirected to a paged output
stream.frameId - The frame id of the frame to be output.public boolean equals(java.lang.Object x)
equals in class java.lang.Objectx - Object to compare with.true if instances are equal and
false otherwise.public int hashCode()
hashCode in class java.lang.Objectpublic int height()
render(com.goldencode.p2j.util.Stream) is called.height in interface RepeatedOutputpublic void render(Stream out)
render in interface RepeatedOutputout - A stream that is opened for output.