sk.uniba.euromath.gene
Class RendererContext

java.lang.Object
  extended by sk.uniba.euromath.gene.RendererContext

public final class RendererContext
extends Object

The context object for renderers and editors. Processes requests for rendering with child renderers, etc. Intended to be used by renderers and editors.

Author:
Martin Vysny

Field Summary
 XMLAccess xmlAccess
          XMLAccess instance.
 
Method Summary
 org.eclipse.draw2d.geometry.Dimension getCanvasSize(String id)
          Returns canvas size of a renderer.
 void render(String id, org.eclipse.draw2d.Graphics g, org.eclipse.draw2d.geometry.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

xmlAccess

public final XMLAccess xmlAccess
XMLAccess instance.

Method Detail

getCanvasSize

public org.eclipse.draw2d.geometry.Dimension getCanvasSize(String id)
                                                    throws EditorException
Returns canvas size of a renderer.

Parameters:
id - the identifier from appropriate emp:mark element.
Returns:
the canvas size in pixels.
Throws:
EditorException - if error occurs.

render

@Deprecated
public void render(String id,
                              org.eclipse.draw2d.Graphics g,
                              org.eclipse.draw2d.geometry.Rectangle rect)
            throws EditorException
Deprecated. renderers should not attempt to render child nametrees. They should leave enough free space instead and leave the rendering to the editor framework.

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.

Parameters:
id - calls renderer with this ID.
g - graphics where to paint.
rect - here the renderer shall paint.
Throws:
EditorException - if error happens.


Copyright © 2003-2006 null. All Rights Reserved.