|
Runtime | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.eclipse.gmf.runtime.diagram.ui.render.clipboard.DiagramGenerator
Provides the framework to generate SWT and AWT images of a diagram or a subset of editparts on a diagram.
| Constructor Summary | |
DiagramGenerator(DiagramEditPart dgrmEP)
Creates a new instance. |
|
| Method Summary | |
protected Rectangle |
calculateImageRectangle(java.util.List editparts)
Determine the minimal rectangle required to bound the list of editparts. |
java.awt.Image |
createAWTImageForDiagram()
Creates an AWT image for the contents of the diagram editpart. |
abstract java.awt.Image |
createAWTImageForParts(java.util.List editparts)
Creates an AWT image for the list of editparts passed in. |
ImageDescriptor |
createSWTImageDescriptorForDiagram()
Creates an SWT image descriptor for the contents of the diagram editpart. |
ImageDescriptor |
createSWTImageDescriptorForParts(java.util.List editparts)
Creates an SWT image descriptor for the list of editparts passed in.Any connections where both the source and target editparts are passed in are also drawn. |
protected void |
disposeGraphics(Graphics g)
Allows hook to dispose of any artifacts around the creation of the Graphics object used for rendering. |
protected DiagramEditPart |
getDiagramEditPart()
|
java.util.List |
getDiagramPartInfo(DiagramEditPart diagramEditPart)
Get the positional data and the semantic elements for each ShapeEditPart, ShapeCompartmentEditPart,
and ConnectionEditPart on the diagram. |
protected abstract ImageDescriptor |
getImageDescriptor(Graphics g)
Creates an image descriptor representing the image rendered from the diagram. |
protected int |
getImageMargin()
|
protected org.eclipse.gmf.runtime.draw2d.ui.mapmode.IMapMode |
getMapMode()
|
protected void |
renderToGraphics(Graphics graphics,
Point translateOffset,
java.util.List editparts)
Renders the list of editparts to the graphics object. |
protected abstract Graphics |
setUpGraphics(int width,
int height)
Allows hook for the creation of a Graphics object that is
used for the rendering of the diagram. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DiagramGenerator(DiagramEditPart dgrmEP)
dgrmEP - the diagram editpart| Method Detail |
protected DiagramEditPart getDiagramEditPart()
protected abstract Graphics setUpGraphics(int width,
int height)
Graphics object that is
used for the rendering of the diagram.
width - of the clipping areaheight - of the clipping area
protected void disposeGraphics(Graphics g)
Graphics object used for rendering.
g - Graphics element that is to be disposed.protected abstract ImageDescriptor getImageDescriptor(Graphics g)
g - Graphics object where information to form the image descriptor
can be retrieved from.
public final java.awt.Image createAWTImageForDiagram()
public abstract java.awt.Image createAWTImageForParts(java.util.List editparts)
editparts - the list of IGraphicalEditParts that will be
rendered to the Image
public final ImageDescriptor createSWTImageDescriptorForDiagram()
public final ImageDescriptor createSWTImageDescriptorForParts(java.util.List editparts)
editparts - the list of IGraphicalEditParts that will be
rendered to the Image
protected org.eclipse.gmf.runtime.draw2d.ui.mapmode.IMapMode getMapMode()
protected final void renderToGraphics(Graphics graphics,
Point translateOffset,
java.util.List editparts)
graphics - the graphics object on which to drawtranslateOffset - a Point that the value the graphics object
will be translated by in relative coordinates.editparts - the list of IGraphicalEditParts that will be
rendered to the graphics objectprotected Rectangle calculateImageRectangle(java.util.List editparts)
editparts - the list of IGraphicalEditParts from which
their figure bounds will be used
public java.util.List getDiagramPartInfo(DiagramEditPart diagramEditPart)
ShapeEditPart, ShapeCompartmentEditPart,
and ConnectionEditPart on the diagram.
diagramEditPart - The diagram edit part.
PartPositionInfoobjects with positional data
and the semantic element for the relevant editparts on the
diagram.protected int getImageMargin()
int value that is the margin around the generated image in logical coordinates.
|
Runtime | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.