|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object sk.uniba.euromath.editor.RendererContext
public final class RendererContext
The context object for renderers and editors. Processes requests for rendering with child renderers, etc. Intended to be used by renderers and editors.
Field Summary | |
---|---|
XMLAccess |
xmlAccess
XMLAccess instance. |
Constructor Summary | |
---|---|
RendererContext(Map<String,CoordinatorInputKey> geneIdMapping,
Map<CoordinatorInputKey,GeneDataProvider.RendererSite> rendererKeys,
XMLAccess xmlAccess)
Constructor. |
Method Summary | |
---|---|
Dimension |
getCanvasSize(String id)
Returns canvas size of a renderer. |
void |
render(String id,
Graphics g,
Rectangle rect)
Deprecated. renderers should not attempt to render child nametrees. They should leave enough free space instead and leave the rendering to the editor framework. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public final XMLAccess xmlAccess
Constructor Detail |
---|
RendererContext(Map<String,CoordinatorInputKey> geneIdMapping, Map<CoordinatorInputKey,GeneDataProvider.RendererSite> rendererKeys, XMLAccess xmlAccess)
Constructor.
Receives instances of two live maps - modified outside this object, in
the GeneDataProvider
class.
geneIdMapping
- Maps GENE-generated ids to the coordinator input key instance.
Used by renderer context to map from GENE id (provided to the
renderer) to child renderer instance.rendererKeys
- maps input pipe ID to a renderer instance.xmlAccess
- the source document instance.Method Detail |
---|
public Dimension getCanvasSize(String id) throws EditorException
id
- the identifier from appropriate emp:mark
element.
EditorException
- if error occurs.@Deprecated public void render(String id, Graphics g, Rectangle rect) throws EditorException
Asks renderer to paint its contents on given graphics into given rectangle.
The function automatically adjusts the graphics coordinate system: rect's upper-left corner becomes the starting (0, 0) point, and a clipping area is set to the rectangle. When the renderer finishes, graphics coordinate system and clip rectangle is returned to its previous state.
id
- calls renderer with this ID.g
- graphics where to paint.rect
- here the renderer shall paint.
EditorException
- if error happens.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |