public class CustomPaperSize extends PaperSize
paper = new CustomPaperSize("Business Card", 90, 55, Unit.MM);
Constructor and Description |
---|
CustomPaperSize(String name,
double width,
double height,
Unit units)
Create a PaperSize constant (or, at least, once you've created one you
don't need to create any more) for a custom size.
|
equals, getDefault, getDisplayName, getHeight, getWidth, toString
public CustomPaperSize(String name, double width, double height, Unit units)
The width
and height
parameters are in terms
of units
, obviously. Note that you must use a physical
measurement; you can't specify pixels.
You need to specify a human readable display name describing this
PaperSize in a word or two. You should mark it for translation. Try
"Custom"
if you're lacking for inspiration.