|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface BoxPrinter
Draws the preview for a box and prints the contents of a box. Must have a default constructor.
Method Summary | |
---|---|
void |
createPreview(java.awt.Graphics2D graphics,
IProgressMonitor monitor)
This method is called by the frame work when it is time to display itself on the screen. |
void |
draw(java.awt.Graphics2D graphics,
IProgressMonitor monitor)
This method will be called by Page when the actual printing is being performed. |
Box |
getBox()
Returns the box the box set when the setBox method is called. |
java.lang.String |
getExtensionPointID()
Must return the id of the extension point where you registered this box printer. |
boolean |
isNewPreviewNeeded()
Returns true if a the preview has changed since last call of 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. |
void |
setBox(Box box)
Sets the owning box. |
Method Detail |
---|
void save(IMemento memento)
AbstractBox
void load(IMemento value)
value
- the new value of the 'IMemento' attribute.save(IMemento)
void draw(java.awt.Graphics2D graphics, IProgressMonitor monitor)
graphics
- A Graphics2D
object to perform the drawing onmonitor
- Page
void createPreview(java.awt.Graphics2D graphics, IProgressMonitor monitor)
graphics
- A Graphics2D
object to perform the drawing on.monitor
- boolean isNewPreviewNeeded()
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. When it returns false the results of the last createPreview is
drawn onto the screen.
createPreview(Graphics2D, IProgressMonitor)
java.lang.String getExtensionPointID()
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".
Box getBox()
void setBox(Box box)
box
- The box that owns this BoxPrinter.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |