|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.pentaho.reporting.engine.classic.core.modules.output.pageable.plaintext.driver.PlainTextPage
public class PlainTextPage
The plain text page is used to buffer a complete page and to write the buffered data when the page is closed.
| Constructor Summary | |
|---|---|
PlainTextPage(Paper pageFormat,
PrinterDriver driver,
String defaultEncoding)
Creates a new PlainTextPage with the given dimensions and the specified PrinterCommandSet. |
|
| Method Summary | |
|---|---|
void |
addTextChunk(int x,
int y,
int w,
String text,
StyleSheet format)
Adds a new text chunk to this PlainTextPage. |
static int |
correctedDivisionFloor(float c,
float d)
Fixes some floating point errors when calculating positions. |
int |
getHeight()
Returns the page height in lines. |
int |
getWidth()
Returns the page width in characters. |
void |
writePage()
Writes the contents of the page using the printer command set. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PlainTextPage(Paper pageFormat,
PrinterDriver driver,
String defaultEncoding)
driver - the commandset for printing and formating the text.| Method Detail |
|---|
public static int correctedDivisionFloor(float c,
float d)
c - the divisord - the divident
public int getWidth()
public int getHeight()
public void addTextChunk(int x,
int y,
int w,
String text,
StyleSheet format)
x - the column of the first character of the texty - the row where to print the textw - the number of characters to print.text - the text that should be printed.format - the fontdefinition used to format the text.
public void writePage()
throws IOException
IOException - if an I/O error occured while writing the page.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||