Eclipse Draw2d
2.1

org.eclipse.draw2d
Class PrintFigureOperation

java.lang.Object
  |
  +--org.eclipse.draw2d.PrintOperation
        |
        +--org.eclipse.draw2d.PrintFigureOperation

public class PrintFigureOperation
extends PrintOperation

Class responsible for printing Figures.


Constructor Summary
protected PrintFigureOperation(Printer p)
          Constructor for PrintFigureOperation.
  PrintFigureOperation(Printer p, IFigure srcFigure)
          Constructor for PrintFigureOperation.
 
Method Summary
protected  IFigure getPrintSource()
          Returns the printSource.
protected  void preparePrintSource()
          This method contains all operations performed to sourceFigure prior to being printed.
protected  void printPages()
          This method is responsible for printing pages.
protected  void restorePrintSource()
          This method contains all operations performed to sourceFigure after being printed.
protected  void setPrintSource(IFigure printSource)
          Sets the printSource.
protected  void setupPrinterGraphicsFor(Graphics g, IFigure f)
          Sets up Graphics object g for IFigure f.
 
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
 

Constructor Detail

PrintFigureOperation

protected PrintFigureOperation(Printer p)
Constructor for PrintFigureOperation.

Note: Descendants must call setPrintSource(IFigure) to set the IFigure that is to be printed.

See Also:
PrintOperation.PrintOperation(Printer)

PrintFigureOperation

public PrintFigureOperation(Printer p,
                            IFigure srcFigure)
Constructor for PrintFigureOperation.

Parameters:
p - Printer to print on
srcFigure - Figure to print
Method Detail

preparePrintSource

protected void preparePrintSource()
Description copied from class: PrintOperation
This method contains all operations performed to sourceFigure prior to being printed.

Overrides:
preparePrintSource in class PrintOperation
See Also:
PrintOperation.preparePrintSource()

restorePrintSource

protected void restorePrintSource()
Description copied from class: PrintOperation
This method contains all operations performed to sourceFigure after being printed.

Overrides:
restorePrintSource in class PrintOperation
See Also:
PrintOperation.restorePrintSource()

printPages

protected void printPages()
Description copied from class: PrintOperation
This method is responsible for printing pages. (A page is printed by calling Printer.startPage(), followed by painting to the PrinterGraphics object, and then calling Printer.endPage()).

Specified by:
printPages in class PrintOperation
See Also:
PrintOperation.printPages()

setupPrinterGraphicsFor

protected void setupPrinterGraphicsFor(Graphics g,
                                       IFigure f)
Sets up Graphics object g for IFigure f.

Parameters:
g - The Graphics to setup
f - The IFigure used to setup g

getPrintSource

protected IFigure getPrintSource()
Returns the printSource.

Returns:
IFigure The source IFigure

setPrintSource

protected void setPrintSource(IFigure printSource)
Sets the printSource.

Parameters:
printSource - The printSource to set

Eclipse Draw2d
2.1

Copyright (c) IBM Corp. and others 2000, 2003. All Rights Reserved.