|
Humboldt Alignment Editor 2.5.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecteu.esdihumboldt.hale.ui.util.graph.OffscreenGraph
public abstract class OffscreenGraph
Renders a graph to an image.
Constructor Summary | |
---|---|
OffscreenGraph(int width,
int height)
Create an off-screen graph. |
Method Summary | |
---|---|
protected abstract void |
configureViewer(org.eclipse.zest.core.viewers.GraphViewer viewer)
Configure the viewer. |
void |
dispose()
Dispose the off-screen graph shell. |
org.eclipse.zest.core.widgets.Graph |
getGraph()
|
void |
resize(int width,
int height)
Resize the off-screen graph. |
static void |
saveDot(org.eclipse.zest.core.widgets.Graph graph,
OutputStream out)
Save a graph in the dot format to an output stream. |
static void |
saveImage(org.eclipse.draw2d.IFigure root,
OutputStream out,
String format)
Save a figure as image to an output stream. |
void |
saveImage(OutputStream out,
String format)
Save the graph as image to an output stream. |
static void |
saveSVG(org.eclipse.draw2d.IFigure root,
OutputStream out)
Save a figure as Scalable Vector Graphics to an output stream. |
void |
saveSVG(OutputStream out)
Save the graph as Scalable Vector Graphics to an output stream. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OffscreenGraph(int width, int height)
width
- the graph widthheight
- the graph heightMethod Detail |
---|
public org.eclipse.zest.core.widgets.Graph getGraph()
public void resize(int width, int height)
width
- the graph widthheight
- the graph heightpublic void dispose()
Shell.dispose()
protected abstract void configureViewer(org.eclipse.zest.core.viewers.GraphViewer viewer)
viewer
- the graph viewerpublic void saveImage(OutputStream out, String format) throws IOException
out
- the output stream to write the image to (which is closed after
writing)format
- the informal name of the image format, if null
defaults to png
IOException
- if writing the image failsImageIO.write(java.awt.image.RenderedImage, String, OutputStream)
public void saveSVG(OutputStream out) throws IOException, TransformerFactoryConfigurationError, TransformerException
out
- the output stream to write the SVG DOM to (which is closed
after writing)
IOException
- if writing to the output stream fails
TransformerFactoryConfigurationError
- if creating the transformer
fails
TransformerException
- if writing the document failspublic static void saveImage(org.eclipse.draw2d.IFigure root, OutputStream out, String format) throws IOException
root
- the figure to drawout
- the output stream to write the image to (which is closed after
writing)format
- the informal name of the image format, if null
defaults to png
IOException
- if writing the image failsImageIO.write(java.awt.image.RenderedImage, String, OutputStream)
public static void saveSVG(org.eclipse.draw2d.IFigure root, OutputStream out) throws IOException, TransformerFactoryConfigurationError, TransformerException
root
- the figure to drawout
- the output stream to write the SVG DOM to (which is closed
after writing)
IOException
- if writing to the output stream fails
TransformerFactoryConfigurationError
- if creating the transformer
fails
TransformerException
- if writing the document failspublic static void saveDot(org.eclipse.zest.core.widgets.Graph graph, OutputStream out) throws IOException
graph
- the graphout
- the output stream (which is closed after writing)
IOException
- if writing to the output stream fails
|
Humboldt Alignment Editor 2.5.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |