public abstract class CellPrinter extends Object implements PrintCellConstants, PointDrawable
Modifier and Type | Field and Description |
---|---|
boolean |
dontFreeAfterPrint
Normally after a the print() method is called the free() method is
called.
|
protected PageFormat |
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
Constructor and Description |
---|
CellPrinter() |
Modifier and Type | Method and Description |
---|---|
protected void |
addCell(PrintCell cell,
PointRect location) |
protected PrintCellPanel |
addFullImageablePanel() |
protected PrintCellPanel |
addMarginedPanel(double top,
double left,
double bottom,
double right) |
protected PrintCellPanel |
addMarginedPanel(double top,
double left,
double bottom,
double right,
PointFont font) |
protected PrintCellPanel |
addMarginedPanel(double edge,
PointFont font) |
void |
checkSetup(PointGraphics pg)
This will call setup() if the PointGraphics is a different DPI to
that when previously called, or if setup() has not been called at all.
|
protected void |
completeSetup(PointGraphics pg) |
void |
doPrint(PointGraphics pg) |
void |
doPrint(PointGraphics pg,
PointRect area) |
void |
draw(PointGraphics pg,
PointRect area)
Draw this PointDrawable on to a PointGraphics.
|
void |
free() |
PrintCell |
getCurrentCell() |
protected PageFormat |
getCurrentPage() |
boolean |
isSetupFor(double xdpi,
double ydpi) |
void |
print(PointGraphics pg,
PageFormat pf) |
protected void |
reset(PageFormat format) |
void |
setPageFormat(PageFormat pf) |
void |
setup(PointGraphics pg,
PageFormat format) |
protected abstract void |
setupForPage(PointGraphics pg)
Setup the PrintCells within the CellPrinter.
|
protected PageFormat page
public boolean dontFreeAfterPrint
public PrintCell getCurrentCell()
public void setPageFormat(PageFormat pf)
protected PageFormat getCurrentPage()
protected void completeSetup(PointGraphics pg)
protected abstract void setupForPage(PointGraphics pg)
public final void setup(PointGraphics pg, PageFormat format)
protected PrintCellPanel addFullImageablePanel()
protected PrintCellPanel addMarginedPanel(double top, double left, double bottom, double right)
protected PrintCellPanel addMarginedPanel(double top, double left, double bottom, double right, PointFont font)
protected PrintCellPanel addMarginedPanel(double edge, PointFont font)
protected void reset(PageFormat format)
public void free()
public final void doPrint(PointGraphics pg)
public boolean isSetupFor(double xdpi, double ydpi)
public void checkSetup(PointGraphics pg)
pg
- the PointGraphics to draw on.public void doPrint(PointGraphics pg, PointRect area)
public void print(PointGraphics pg, PageFormat pf)
public void draw(PointGraphics pg, PointRect area)
PointDrawable
draw
in interface PointDrawable
pg
- the destination PointGraphics.area
- the area on the PointGraphics that needs updating.