|
Eclipse Draw2d 3.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.draw2d.PrintOperation
org.eclipse.draw2d.PrintFigureOperation
Class responsible for printing Figures.
Field Summary | |
static int |
FIT_HEIGHT
A print mode that scales the printer graphics so that the height of the printed image fits on one page and tiles horizontally, if necessary. |
static int |
FIT_PAGE
A print mode that scales the printer graphics so that the entire printed image fits on one page. |
static int |
FIT_WIDTH
A print mode that scales the printer graphics so that the width of the printed image fits on one page and tiles vertically, if necessary. |
static int |
TILE
The default print mode. |
Constructor Summary | |
protected |
PrintFigureOperation(Printer p)
Constructor for PrintFigureOperation. |
|
PrintFigureOperation(Printer p,
IFigure srcFigure)
Constructor for PrintFigureOperation. |
Method Summary | |
protected int |
getPrintMode()
Returns the current print mode. |
protected IFigure |
getPrintSource()
Returns the printSource. |
protected void |
preparePrintSource()
This method contains all operations performed to sourceFigure prior to being printed. |
protected void |
printPages()
Prints the pages based on the current print mode. |
protected void |
restorePrintSource()
This method contains all operations performed to sourceFigure after being printed. |
void |
setPrintMode(int mode)
Sets the print mode. |
protected void |
setPrintSource(IFigure printSource)
Sets the printSource. |
protected void |
setupPrinterGraphicsFor(Graphics graphics,
IFigure figure)
Sets up Graphics object for the given IFigure. |
Methods inherited from class org.eclipse.draw2d.PrintOperation |
cleanup, getFreshPrinterGraphics, getPrinter, getPrintRegion, run, setPrinter, setPrintMargin, setupGraphicsForPage |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int TILE
public static final int FIT_PAGE
public static final int FIT_WIDTH
public static final int FIT_HEIGHT
Constructor Detail |
protected PrintFigureOperation(Printer p)
Note: Descendants must call setPrintSource(IFigure) to set the IFigure that is to be printed.
PrintOperation.PrintOperation(Printer)
public PrintFigureOperation(Printer p, IFigure srcFigure)
p
- Printer to print onsrcFigure
- Figure to printMethod Detail |
protected int getPrintMode()
FIT_HEIGHT
,
FIT_PAGE
, or FIT_WIDTH
.
protected IFigure getPrintSource()
protected void preparePrintSource()
PrintOperation
preparePrintSource
in class PrintOperation
PrintOperation.preparePrintSource()
protected void printPages()
printPages
in class PrintOperation
PrintOperation.printPages()
protected void restorePrintSource()
PrintOperation
restorePrintSource
in class PrintOperation
PrintOperation.restorePrintSource()
public void setPrintMode(int mode)
TILE
, FIT_HEIGHT
,
FIT_WIDTH
and FIT_PAGE
.
mode
- the print modeprotected void setPrintSource(IFigure printSource)
printSource
- The printSource to setprotected void setupPrinterGraphicsFor(Graphics graphics, IFigure figure)
graphics
- The Graphics to setupfigure
- The IFigure used to setup graphics
|
Eclipse Draw2d 3.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |