public abstract class PrintablePage extends CellPrinter
The only method that must be overridden is composePage(). In this method you should create and add PrintCells to the page using addCell(). Or use addMarginedPanel() to create and add a PrintCellPanel that you can then add your data PrintCell objects to.
Modifier and Type | Field and Description |
---|---|
int |
pageNumber
The page number assigned to the Page, starting from 1.
|
static int |
ROTATE_180 |
static int |
ROTATE_270 |
static int |
ROTATE_90 |
static int |
ROTATE_NONE |
int |
rotation |
dontFreeAfterPrint, page
BOTTOM, CELLFLAG, CELLMASK, CENTER, CONTROLMASK, DONTCHANGE, DONTFILL, DONTSTRETCH, EAST, FILL, GROW, HCENTER, HCONTRACT, HEXPAND, HFILL, HGROW, HSHRINK, HSTRETCH, INITIALLY_CLOSED, INITIALLY_MINIMIZED, INITIALLY_PREFERRED_SIZE, LEFT, NORTH, NORTHEAST, NORTHWEST, RIGHT, SHRINK, SOUTH, SOUTHEAST, SOUTHWEST, STRETCH, TAG_BACKGROUND_IMAGE, TAG_BORDER, TAG_FIXEDSIZE, TAG_INSETS, TAG_MAXIMUMSIZE, TAG_MINIMUMSIZE, TAG_PREFERREDSIZE, TAG_RECT, TAG_SPAN, TAG_TEXTSIZE, TOP, VCENTER, VCONTRACT, VEXPAND, VFILL, VGROW, VSHRINK, VSTRETCH, WEST
Modifier | Constructor and Description |
---|---|
protected |
PrintablePage() |
protected |
PrintablePage(int rotation) |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
composePage(PointGraphics pg,
PageFormat format,
int pageNumber) |
void |
setPageNumber(int pageNumber)
This is called before setupForPage() is called.
|
protected void |
setupForPage(PointGraphics pg)
This is called before the doPrint() method is called.
|
addCell, addFullImageablePanel, addMarginedPanel, addMarginedPanel, addMarginedPanel, checkSetup, completeSetup, doPrint, doPrint, draw, free, getCurrentCell, getCurrentPage, isSetupFor, print, reset, setPageFormat, setup
public int pageNumber
public static final int ROTATE_NONE
public static final int ROTATE_90
public static final int ROTATE_180
public static final int ROTATE_270
public int rotation
protected PrintablePage()
protected PrintablePage(int rotation)
public void setPageNumber(int pageNumber)
protected final void setupForPage(PointGraphics pg)
setupForPage
in class CellPrinter
protected abstract void composePage(PointGraphics pg, PageFormat format, int pageNumber)