|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectplatypus.pdf.PageSize
public class PageSize
All functions relating to setting, getting, and dumping the page size
| Field Summary | |
|---|---|
private float |
height
page height in points |
private int |
lineNumber
line where page size is specified |
private java.util.HashMap<java.lang.String,com.lowagie.text.Rectangle> |
pageNames
HashMap that maps strings of page-size names to iText rectangles |
private float |
width
page width in points |
| Constructor Summary | |
|---|---|
PageSize()
Default constructor simply uses the default values (letter, or 8.5" x 11") |
|
| Method Summary | |
|---|---|
java.lang.String |
dump()
Creates a string containing the line # and the values of page size when last set |
float |
getHeight()
getter for page height |
float |
getWidth()
getter for page width |
void |
initialize(java.lang.String sizeName)
Initialize the page size to one of the pre-written shorthand sizes (LTR, LGL, A4, etc.) |
private void |
loadPageNames()
Load the page names and the corresponding iText rectangles into a hash table. |
void |
setCustomPageHeight(java.lang.String newHeight)
sets page height to a custom amount (not using of the many predefined page sizes) |
void |
setCustomPageWidth(java.lang.String newWidth)
sets page width to a custom amount (not using one of the many predefined sizes) |
java.lang.String |
tooLateError()
Logs an error when the user tries to change the size of the page after any text has been emitted. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private float width
private float height
private int lineNumber
private java.util.HashMap<java.lang.String,com.lowagie.text.Rectangle> pageNames
| Constructor Detail |
|---|
public PageSize()
| Method Detail |
|---|
public float getWidth()
public float getHeight()
public void setCustomPageHeight(java.lang.String newHeight)
throws java.lang.IllegalArgumentException
newHeight - string containing what the user newHeight
java.lang.IllegalArgumentException - if invalid page height is specified
public void setCustomPageWidth(java.lang.String newWidth)
throws java.lang.IllegalArgumentException
newWidth - string containing what the user newWidth
java.lang.IllegalArgumentException - if invalid page width is specified
public void initialize(java.lang.String sizeName)
throws java.lang.IllegalArgumentException
sizeName - the pre-existing shorthand name for a specific page size
java.lang.IllegalArgumentException - if invalid string is passed in.private void loadPageNames()
public java.lang.String dump()
public java.lang.String tooLateError()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||