public class PageFormat extends DataObject
Modifier and Type | Field and Description |
---|---|
double |
fullPageHeight |
double |
fullPageWidth |
double |
imageableHeight |
double |
imageableWidth |
double |
imageableX |
double |
imageableY |
double |
requestedFullHeight |
double |
requestedFullWidth |
double |
requestedHeight |
double |
requestedWidth |
double |
requestedX |
double |
requestedXDpi |
double |
requestedY |
double |
requestedYDpi |
static int |
TRANSFORM_NONE |
static int |
TRANSFORM_ROTATE_180 |
static int |
TRANSFORM_ROTATE_270 |
static int |
TRANSFORM_ROTATE_90 |
static int |
TRANSFORM_ROTATE_NOT_RIGHT |
double |
xDPI
This is the output X-DPI and it may not be know, and if so, it will be 0.
|
double |
xScreenScale |
double |
yDPI
This is the output Y-DPI and it may not be know, and if so, it will be 0.
|
double |
yScreenScale |
Constructor and Description |
---|
PageFormat() |
Modifier and Type | Method and Description |
---|---|
void |
acceptRequests()
This is used to tell the PageFormat that the physical device has accepted its requests
and it can alter its values to match the requests.
|
static PageFormat |
getForSize(double widthInPoints,
double heightInPoints)
A convenience method to get a PageFormat for a specfic size.
|
PointRect |
getMargined(double top,
double left,
double bottom,
double right,
PointRect dest)
Get the co-ordinates into the printer Page for the specified margins.
|
AffineTransform |
getTransform() |
int |
getTransformation() |
void |
matchTransform(PageFormat other) |
void |
requestDPI(double xDPI,
double yDPI)
This requests that the output DPI be set to the specified values.
|
void |
requestImageableArea(double x,
double y,
double width,
double height)
This requests that the imageable area of the paper to be set to the specified values, which
are given in units of Points (printer dots - 1/72 of an inch).
|
void |
requestPageSize(double width,
double height)
This requests that the size of the paper be set to specified values, which
are given in units of Points (printer dots - 1/72 of an inch).
|
String |
toString()
Return a String representation of this object.
|
void |
transform(int transformation)
Apply a transform to the page thereby altering its layout.
|
_getFieldType, _getSetField, cache, compareTo, copied, copyFrom, equals, getCopy, getDeclaredField, getDeclaredFieldValue, getMyFieldList, getNew
public double fullPageWidth
public double fullPageHeight
public double imageableWidth
public double imageableHeight
public double xScreenScale
public double yScreenScale
public double imageableX
public double imageableY
public double xDPI
public double yDPI
public double requestedX
public double requestedY
public double requestedWidth
public double requestedHeight
public double requestedFullWidth
public double requestedFullHeight
public double requestedXDpi
public double requestedYDpi
public static final int TRANSFORM_ROTATE_90
public static final int TRANSFORM_ROTATE_180
public static final int TRANSFORM_ROTATE_270
public static final int TRANSFORM_NONE
public static final int TRANSFORM_ROTATE_NOT_RIGHT
public AffineTransform getTransform()
public int getTransformation()
public void matchTransform(PageFormat other)
public void transform(int transformation)
transformation
- one of the TRANSFORM_XXX values.public void requestDPI(double xDPI, double yDPI)
public void requestImageableArea(double x, double y, double width, double height)
x
- the x offset of the imageable area.y
- the y offset of the imageable area.width
- the width of the imageable area.height
- the height of the imageable area.public void requestPageSize(double width, double height)
width
- the requested size of the paper.height
- the requested height of the paper.public String toString()
Object
public void acceptRequests()
public PointRect getMargined(double top, double left, double bottom, double right, PointRect dest)
top
- the top margin.left
- the left margin.bottom
- the bottom margin.right
- the right margin.dest
- an optional destination PointRect.public static PageFormat getForSize(double widthInPoints, double heightInPoints)
widthInPoints
- the width in points.heightInPoints
- the height in points.