| net.refractions.udig.printing.model.BoxPrinter
All known Subclasses: net.refractions.udig.printing.model.impl.DecoratorBoxImpl, net.refractions.udig.printing.model.AbstractBoxPrinter,
BoxPrinter | public interface BoxPrinter (Code) | | Draws the preview for a box and prints the contents of a box. Must have a default constructor.
author: Jesse since: 1.1.0 |
Method Summary | |
public void | createPreview(Graphics2D graphics, IProgressMonitor monitor) This method is called by the frame work when it is time to display itself on
the screen. | public void | draw(Graphics2D graphics, IProgressMonitor monitor) This method will be called by Page when the actual printing is being performed. | public Box | getBox() Returns the box the box set when the setBox method is called. | public String | getExtensionPointID() Must return the id of the extension point where you registered this box printer. | public boolean | isNewPreviewNeeded() Returns true if a the preview has changed since last call of
BoxPrinter.createPreview(Graphics2D,IProgressMonitor) This method must NOT always return true because as long as it returns true createPreview is
called and the screen is not updated. | void | load(IMemento value) | void | save(IMemento memento) Passes in a memento object so that the printer can be saved. | public void | setBox(Box box) Sets the owning box. |
createPreview | public void createPreview(Graphics2D graphics, IProgressMonitor monitor)(Code) | | This method is called by the frame work when it is time to display itself on
the screen. It does not have to be a perfect representation of the actual printed value because
It is not called during printing. It is recommended that caching be used for the preview as
much as possible. This method may take as long as necessary, it is not run in the display thread.
Parameters: graphics - A Graphics2D object to perform the drawing on. Parameters: monitor - |
draw | public void draw(Graphics2D graphics, IProgressMonitor monitor)(Code) | | This method will be called by Page when the actual printing is being performed.
The graphics object passed in will have its appropriate clipping set,
so the drawing code can only draw inside this clip.
See Also: Page Parameters: graphics - A Graphics2D object to perform the drawing on Parameters: monitor - |
getBox | public Box getBox()(Code) | | Returns the box the box set when the setBox method is called.
the box the box set when the setBox method is called. |
getExtensionPointID | public String getExtensionPointID()(Code) | | Must return the id of the extension point where you registered this box printer.
Each box printer has to be registered in an extension to the extension point "net.refractions.udig.printing.ui.boxprinter".
Say you have registered the extension with the id "myPrintBoxes" in the plugin "net.refractions.example.plugin":
this method should then return the extension id "net.refractions.example.plugin.myPrintBoxes".
Failure to properly configure the extension point id will be noted on the console logs, no user
interface notification will be performed.
the id of the extension point that is used to load the BoxPrinter |
save | void save(IMemento memento)(Code) | | Passes in a memento object so that the printer can be saved.
See Also: AbstractBox |
setBox | public void setBox(Box box)(Code) | | Sets the owning box. getBox() should return the same box.
Parameters: box - The box that owns this BoxPrinter. |
|
|