org.eclipse.ohf.stem.ui.views.map
Class Graphics2DRenderer

java.lang.Object
  extended by org.eclipse.ohf.stem.ui.views.map.Graphics2DRenderer

public class Graphics2DRenderer
extends java.lang.Object

Helper class allowing the use of Java 2D on SWT or Draw2D graphical context. See: http://www-128.ibm.com/developerworks/java/library/j-2dswt/?ca=dgr-jw17j-2dswt


Constructor Summary
Graphics2DRenderer()
           
 
Method Summary
 void dispose()
          Dispose the resources attached to this 2D renderer.
 java.awt.Graphics2D getGraphics2D()
          Returns the Graphics2D context to use.
 void prepareRendering(org.eclipse.swt.graphics.GC gc)
          Prepare to render on a SWT graphics context.
 void prepareRendering(int clipX, int clipY, int clipW, int clipH)
          Prepare the AWT offscreen image for the rendering of the rectangular region given as parameter.
 void render(org.eclipse.swt.graphics.GC gc)
          Complete the rendering by flushing the 2D renderer on a SWT graphical context.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Graphics2DRenderer

public Graphics2DRenderer()
Method Detail

prepareRendering

public void prepareRendering(org.eclipse.swt.graphics.GC gc)
Prepare to render on a SWT graphics context.

Parameters:
gc -

prepareRendering

public void prepareRendering(int clipX,
                             int clipY,
                             int clipW,
                             int clipH)
Prepare the AWT offscreen image for the rendering of the rectangular region given as parameter.

Parameters:
clipX -
clipY -
clipW -
clipH -

getGraphics2D

public java.awt.Graphics2D getGraphics2D()
Returns the Graphics2D context to use.

Returns:
Graphics2D

render

public void render(org.eclipse.swt.graphics.GC gc)
Complete the rendering by flushing the 2D renderer on a SWT graphical context.

Parameters:
gc -

dispose

public void dispose()
Dispose the resources attached to this 2D renderer.