|
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.util.CopyToImageUtil
Utility class to render a diagram to an image file.
| Constructor Summary | |
CopyToImageUtil()
|
|
| Method Summary | |
DiagramGenerator |
copyToImage(DiagramEditPart diagramEP,
IPath destination,
ImageFileFormat format,
IProgressMonitor monitor)
Copies the diagram to an image file in the specified format. |
void |
copyToImage(DiagramEditPart diagramEP,
java.util.List selection,
IPath destination,
ImageFileFormat format,
IProgressMonitor monitor)
Copies the diagram to an image file in the specified format. |
java.util.List |
copyToImage(Diagram diagram,
IPath destination,
ImageFileFormat format,
IProgressMonitor monitor,
PreferencesHint preferencesHint)
Copies the diagram to an image file in the specified format. |
DiagramEditPart |
createDiagramEditPart(Diagram diagram,
Shell shell,
PreferencesHint preferencesHint)
Creates a DiagramEditPart given the Diagram
without opening an editor. |
protected void |
saveSVGToFile(IPath destination,
DiagramSVGGenerator generator,
IProgressMonitor monitor)
Saves an SVG DOM to a file. |
protected void |
saveToFile(IPath destination,
Image image,
ImageFileFormat imageFormat,
IProgressMonitor monitor)
Saves the image to a file. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public CopyToImageUtil()
| Method Detail |
public DiagramEditPart createDiagramEditPart(Diagram diagram,
Shell shell,
PreferencesHint preferencesHint)
DiagramEditPart given the Diagram
without opening an editor.
diagram - the Diagramshell - An out parameter for the shell that must be disposed after the
copy to image operation has completed.preferencesHint - The preference hint that is to be used to find the appropriate
preference store from which to retrieve diagram preference
values. The preference hint is mapped to a preference store in
the preference registry <@link DiagramPreferencesRegistry>.
DiagramEditPart
public java.util.List copyToImage(Diagram diagram,
IPath destination,
ImageFileFormat format,
IProgressMonitor monitor,
PreferencesHint preferencesHint)
throws CoreException
diagram - the diagram to be copieddestination - the destination file, including path and file nameformat - the image file formatmonitor - progress monitor.preferencesHint - The preference hint that is to be used to find the appropriate
preference store from which to retrieve diagram preference
values. The preference hint is mapped to a preference store in
the preference registry <@link DiagramPreferencesRegistry>.
PartPositionInfo objects with details regarding
each top-level editpart on the diagram represented in the image.
CoreException - if this method fails
public DiagramGenerator copyToImage(DiagramEditPart diagramEP,
IPath destination,
ImageFileFormat format,
IProgressMonitor monitor)
throws CoreException
diagramEP - the diagram editpartdestination - the destination file, including path and file nameformat - the image format to create.monitor - progress monitor.
CoreException - if this method fails
public void copyToImage(DiagramEditPart diagramEP,
java.util.List selection,
IPath destination,
ImageFileFormat format,
IProgressMonitor monitor)
throws CoreException
diagramEP - the diagram edit partselection - selected shapes in the diagram.destination - the destination file, including path and file nameformat - the image format to create.monitor - progress monitor.
CoreException - if this method fails
protected void saveToFile(IPath destination,
Image image,
ImageFileFormat imageFormat,
IProgressMonitor monitor)
throws CoreException
destination - the destination file, including path and file nameimage - the SWT imageimageFormat - the selected image formatmonitor - progress monitor
CoreException - if this method fails
protected void saveSVGToFile(IPath destination,
DiagramSVGGenerator generator,
IProgressMonitor monitor)
throws CoreException
destination - the destination file, including path and file namegenerator - the svg generator for a diagram, used to writemonitor - the progress monitor
CoreException - if this method fails
|
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.