net.sf.sdedit.server
Class Exporter
java.lang.Object
net.sf.sdedit.diagram.PaintDevice
net.sf.sdedit.ui.Graphics2DPaintDevice
net.sf.sdedit.server.Exporter
- All Implemented Interfaces:
- Iterable<Drawable>
public abstract class Exporter
- extends Graphics2DPaintDevice
An Exporter is a paint device that can redirect its output to an output
stream, using one of various output formats.
- Author:
- Markus Strauch
|
Constructor Summary |
protected |
Exporter()
|
| Methods inherited from class net.sf.sdedit.diagram.PaintDevice |
addOtherDrawable, addSequenceElement, announce, clear, computeAxes, computeBounds, getColor, getDiagram, getFont, getHeight, getRightBound, getTextHeight, getTextWidth, getWidth, isEmpty, iterator, reinitialize, setDiagram, writeToStream |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Exporter
protected Exporter()
isAvailable
public static boolean isAvailable()
getExporter
public static Exporter getExporter(String type,
String orientation,
String format,
OutputStream stream)
- Returns an Exporter object if the exporting library is available,
otherwise null. The following output types are supported:
ps, pdf, swf, emf, svg, png, gif, jpg, bmp
- Parameters:
type - describes the output formatorientation - one of {Portrait,Landscape}stream - the stream to redirect the output to
- Returns:
- an instance of an Exporter
setType
protected abstract void setType(String type)
setOutputStream
protected abstract void setOutputStream(OutputStream stream)
export
public abstract void export()
- This method should be called when the generation of the diagram has
finished and PaintDevice.computeBounds() has been called. It redirects
the output to the stream set via
setOutputStream(OutputStream).
Copyright © 2011. All Rights Reserved.