Runtime

org.eclipse.gmf.runtime.diagram.ui.render.util
Class DiagramRenderUtil

java.lang.Object
  extended byorg.eclipse.gmf.runtime.diagram.ui.render.util.DiagramRenderUtil

public class DiagramRenderUtil
extends java.lang.Object

Provides miscellaneous utilities for this plug-in.


Constructor Summary
DiagramRenderUtil()
           
 
Method Summary
static java.awt.Image renderToAWTImage(Diagram diagram)
          Utility api to generate an AWT based image representation of the diagram contents.
static Image renderToSWTImage(Diagram diagram)
          Utility api to generate an SWT based image representation of the diagram contents.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DiagramRenderUtil

public DiagramRenderUtil()
Method Detail

renderToAWTImage

public static java.awt.Image renderToAWTImage(Diagram diagram)
Utility api to generate an AWT based image representation of the diagram contents.

Parameters:
diagram - The Diagram to render the image from.
Returns:
java.awt.Image that is the bitmap representation of the diagram contents.
Throws:
java.lang.NullPointerException - diagram is null

renderToSWTImage

public static Image renderToSWTImage(Diagram diagram)
Utility api to generate an SWT based image representation of the diagram contents.

Parameters:
diagram - The Diagram to render the image from.
Returns:
org.eclipse.swt.graphics.Image that is the bitmap representation of the diagram contents. Caller is responsible for calling dispose() on the return image.
Throws:
java.lang.NullPointerException - diagram is null

Runtime

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.