|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.io.IOHandler yext.export.io.OutputHandler
public abstract class OutputHandler
Base class for all vector graphics generating IOHandler
implementations provided by yExport.
Method Summary | |
---|---|
void |
addRenderingHint(RenderingHints.Key key,
Object value)
Adds a rendering hint key-value-pair, that is passed to the underlying rendering subsystem. |
boolean |
canRead()
Returns false , since this IOHandler can only
export files. |
boolean |
canWrite()
Returns true . |
Graph2DView |
createDefaultGraph2DView(Graph2D graph)
Creates the default view used as rendering context of this output handler in case there is no current view associated with the graph. |
protected GraphicsContext |
createGraphicsContext(Graph2DView view,
Graphics2D g2d)
Factory method that creates the GraphicsContext that will be used
for the graphics object during the rendering of the image. |
String |
getCreator()
Returns the name of the application which uses this OutputHandler . |
String |
getFileFormatString()
Returns a descriptive string of the supported file format |
void |
read(Graph2D graph,
InputStream in)
Unsupported Operation. |
void |
removeRenderingHint(RenderingHints.Key key)
Removes a rendering hint key-value-pair, so that it is no longer passed to the underlying rendering subsystem. |
void |
setCreator(String creator)
Specifies the name of the application which uses this OutputHandler . |
void |
write(Graph2D graph,
OutputStream out)
Writes the contents of the given graph to a stream |
Methods inherited from class y.io.IOHandler |
---|
canWriteSubset, createObjectInputStream, createObjectOutputStream, getFileNameExtension, hide, read, read, shouldSerialize, shouldSerialize, write, writeSubset, writeSubset |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public String getFileFormatString()
getFileFormatString
in class IOHandler
public boolean canRead()
false
, since this IOHandler
can only
export files.
canRead
in class IOHandler
public boolean canWrite()
true
.
canWrite
in class IOHandler
public void read(Graph2D graph, InputStream in) throws IOException
read
in class IOHandler
IOException
public void write(Graph2D graph, OutputStream out) throws IOException
write
in class IOHandler
IOException
protected GraphicsContext createGraphicsContext(Graph2DView view, Graphics2D g2d)
GraphicsContext
that will be used
for the graphics object during the rendering of the image.
This implementation sets the GraphicsContext.isExportPainting()
property to true
.
view
- the view that will be used for the painting.g2d
- the graphics object to use for the painting
null
.public Graph2DView createDefaultGraph2DView(Graph2D graph)
The returned view will be automatically registered as one of the graph's views. After the returned view is not needed anymore it is advisable to remove it from the list of registered view of the given graph.
Graph2D.removeView(y.view.View)
public void addRenderingHint(RenderingHints.Key key, Object value)
key
- the key of the hint to be setvalue
- the value indicating preferences for the specified hint
categorypublic void removeRenderingHint(RenderingHints.Key key)
key
- the key of the hint to be removepublic String getCreator()
OutputHandler
.
OutputHandler
.public void setCreator(String creator)
OutputHandler
.
yExport 1.5
.
creator
- the name of the application which uses this
OutputHandler
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |