Package org.eclipse.draw2d
Class PrintFigureOperation
java.lang.Object
org.eclipse.draw2d.PrintOperation
org.eclipse.draw2d.PrintFigureOperation
Class responsible for printing Figures.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final intA 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 final intA print mode that scales the printer graphics so that the entire printed image fits on one page.static final intA 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 final intThe default print mode.
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedConstructor for PrintFigureOperation.PrintFigureOperation(Printer p, IFigure srcFigure) Constructor for PrintFigureOperation.
- 
Method SummaryModifier and TypeMethodDescriptionprotected intReturns the current print mode.protected IFigureReturns the printSource.protected voidThis method contains all operations performed to sourceFigure prior to being printed.protected voidPrints the pages based on the current print mode.protected voidThis method contains all operations performed to sourceFigure after being printed.voidsetPrintMode(int mode) Sets the print mode.protected voidsetPrintSource(IFigure printSource) Sets the printSource.protected voidsetupPrinterGraphicsFor(Graphics graphics, IFigure figure) Sets up Graphics object for the given IFigure.Methods inherited from class org.eclipse.draw2d.PrintOperationcleanup, createGraphics, getFreshGraphics, getFreshPrinterGraphics, getPrinter, getPrintRegion, run, setPrinter, setPrintMargin, setupGraphicsForPage, setupGraphicsForPage
- 
Field Details- 
TILEpublic static final int TILEThe default print mode. Prints at 100% scale and tiles horizontally and/or vertically, if necessary.- See Also:
 
- 
FIT_PAGEpublic static final int FIT_PAGEA print mode that scales the printer graphics so that the entire printed image fits on one page.- See Also:
 
- 
FIT_WIDTHpublic static final int FIT_WIDTHA print mode that scales the printer graphics so that the width of the printed image fits on one page and tiles vertically, if necessary.- See Also:
 
- 
FIT_HEIGHTpublic static final int FIT_HEIGHTA print mode that scales the printer graphics so that the height of the printed image fits on one page and tiles horizontally, if necessary.- See Also:
 
 
- 
- 
Constructor Details- 
PrintFigureOperationConstructor for PrintFigureOperation.Note: Descendants must call setPrintSource(IFigure) to set the IFigure that is to be printed. - See Also:
 
- 
PrintFigureOperationConstructor for PrintFigureOperation.- Parameters:
- p- Printer to print on
- srcFigure- Figure to print
 
 
- 
- 
Method Details- 
getPrintModeprotected int getPrintMode()- Returns:
- the print mode
 
- 
getPrintSourceReturns the printSource.- Returns:
- IFigure The source IFigure
 
- 
preparePrintSourceprotected void preparePrintSource()Description copied from class:PrintOperationThis method contains all operations performed to sourceFigure prior to being printed.- Overrides:
- preparePrintSourcein class- PrintOperation
- See Also:
 
- 
printPagesprotected void printPages()Prints the pages based on the current print mode.- Specified by:
- printPagesin class- PrintOperation
- See Also:
 
- 
restorePrintSourceprotected void restorePrintSource()Description copied from class:PrintOperationThis method contains all operations performed to sourceFigure after being printed.- Overrides:
- restorePrintSourcein class- PrintOperation
- See Also:
 
- 
setPrintModepublic void setPrintMode(int mode) - Parameters:
- mode- the print mode
 
- 
setPrintSourceSets the printSource.- Parameters:
- printSource- The printSource to set
 
- 
setupPrinterGraphicsForSets up Graphics object for the given IFigure.- Parameters:
- graphics- The Graphics to setup
- figure- The IFigure used to setup graphics
 
 
-