jimm.datavision
Class PaperFormat
java.lang.Object
java.awt.print.Paper
jimm.datavision.PaperFormat
- All Implemented Interfaces:
- java.lang.Cloneable, Nameable, Writeable
public class PaperFormat
- extends java.awt.print.Paper
- implements Nameable, Writeable
The class manages lists of paper sizes and instances represents specific
paper sizes and orientations. Instances are immutable.
- Author:
- Jim Menard, jimm@io.com
Constructor Summary |
PaperFormat(int orientation,
java.lang.String name,
double w,
double h,
double hMargin,
double vMargin,
java.lang.String latexPaperSizeString)
|
Methods inherited from class java.awt.print.Paper |
clone, getHeight, getImageableHeight, getImageableWidth, getImageableX, getImageableY, getWidth, setImageableArea, setSize |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PORTRAIT
public static final int PORTRAIT
- See Also:
- Constant Field Values
LANDSCAPE
public static final int LANDSCAPE
- See Also:
- Constant Field Values
RESOURCE_FILE_PREFIX
protected static final java.lang.String RESOURCE_FILE_PREFIX
- See Also:
- Constant Field Values
orientations
protected static java.util.HashMap[] orientations
names
protected static java.util.TreeSet names
defaultPaper
protected static PaperFormat defaultPaper
name
protected java.lang.String name
orientation
protected int orientation
pageFormat
protected java.awt.print.PageFormat pageFormat
latexPaperSizeString
protected java.lang.String latexPaperSizeString
PaperFormat
PaperFormat(int orientation,
java.lang.String name,
double w,
double h,
double hMargin,
double vMargin,
java.lang.String latexPaperSizeString)
get
public static PaperFormat get(int orientation,
java.lang.String name)
getDefault
public static PaperFormat getDefault()
names
public static java.util.Iterator names()
getOrientation
public int getOrientation()
getName
public java.lang.String getName()
- Description copied from interface:
Nameable
- Returns the name.
- Specified by:
getName
in interface Nameable
setName
public void setName(java.lang.String name)
- A paper format's name is immutable.
- Specified by:
setName
in interface Nameable
- Parameters:
name
- the new name
getLaTeXPaperSizeString
public java.lang.String getLaTeXPaperSizeString()
getPageFormat
public java.awt.print.PageFormat getPageFormat()
- Returns a
java.awt.print.PageFormat
that describes
our orientation, size, and margins. Used by print jobs.
- Returns:
- a page format
- See Also:
SwingLE.printReport()
writeXML
public void writeXML(XMLWriter out)
- Description copied from interface:
Writeable
- Writes this object as an XML tag.
- Specified by:
writeXML
in interface Writeable
- Parameters:
out
- a writer that knows how to write XML