|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IRenderer
Used to mark an implementation of RenderImpl.class; responsible for rendering a layer.
A renderer has the following responsibilities:
The state that the renderer can use are the following:
Field Summary | |
---|---|
static int |
CANCELLED
Indicates that the renderer has been cancelled rendering |
static int |
DISPOSED
Indicates that the renderer has been disposed and can no longer be used |
static int |
DONE
Indicates whether the renderer has finished rendering. |
static int |
NEVER
Indicates that the renderer has been reset and does not have anything to show |
static java.lang.String |
RENDER_EXT
The name of the Extension Point for Renderers |
static int |
RENDER_REQUEST
When a renderer sets its state to RENDER_REQUEST that indicates that is needs to be rerendered. |
static int |
RENDERING
Indicates whether the renderer job is currently running |
static int |
STARTING
Indicates that the renderer has started rendering but does not have data to be displayed |
Method Summary | |
---|---|
void |
dispose()
Informs the renderer to dispose of resources |
IRenderContext |
getContext()
Returns the renderer's context object |
Envelope |
getRenderBounds()
Gets the area that will be rendered next. |
int |
getState()
Returns the current state of rendering. |
boolean |
isCacheable()
Indicates whether the framework is permitted to cache the results of the renderer. |
void |
render(java.awt.Graphics2D destination,
IProgressMonitor monitor)
Requests the Renderer to render with the graphics2d object |
void |
render(IProgressMonitor monitor)
Ask the renderer to update the internal image using the smaller of getRenderBounds() or ViewportBounds. |
void |
setRenderBounds(Envelope boundsToRender)
Called to set the area that will be rendered. |
Field Detail |
---|
static final java.lang.String RENDER_EXT
static final int NEVER
static final int RENDERING
static final int DONE
This implies that rendering has started and finished
static final int DISPOSED
static final int STARTING
static final int CANCELLED
static final int RENDER_REQUEST
setRenderBounds(Envelope)
can be called to set the area that needs to be rendered}
Method Detail |
---|
int getState()
The state is the current state of the org.eclipse.core.runtime.jobs.Job
Options are:
void render(java.awt.Graphics2D destination, IProgressMonitor monitor) throws RenderException
This method will block
destination
- The objects that the Renderer will use for rendering
RenderException
void render(IProgressMonitor monitor) throws RenderException
public void render( IProgressMonitor monitor ) throws RenderException {
if( monitor == null ) monitor = NullProgressMonitor();
Graphics2D g = getContext().getImage().createGraphics();
render(g, monitor);
}
Please choose the smallest of:
RenderException
getContext()
,
IRenderContext.getImage()
,
This method will block
A value of null renders the bounds the entire viewport obtained from the
ViewportModel.getBounds().
IRenderContext getContext()
IRenderContext
void dispose()
boolean isCacheable()
void setRenderBounds(Envelope boundsToRender)
Envelope getRenderBounds()
Please make use of the smaller of getRenderBounds() or the viewport bounds when rendering.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |