|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecty.io.IOHandler
y.io.TiledImageOutputHandler
public class TiledImageOutputHandler
This output handler is responsible for exporting a diagram to multiple image tiles that make up a complete image. The generation of the single image tiles will be handled by a output handler delegate. Optionally this class can also generate a html page that displays the tiles in one large table.
![]() |
![]() |
Constructor Summary | |
---|---|
TiledImageOutputHandler(IOHandler delegate)
Creates a new instance of TiledImageOutputHandler. |
Method Summary | |
---|---|
boolean |
canRead()
Returns false. |
boolean |
canWrite()
This method is delegated to the internal IOHandler. |
protected java.lang.String |
createTileFileName(Graph2D graph,
IOHandler delegateIO,
java.lang.String baseName,
int row,
int col)
Creates the file name for a specific tile. |
java.lang.String |
getFileFormatString()
This method is delegated to the internal IOHandler. |
java.lang.String |
getFileNameExtension()
This method is delegated to the internal IOHandler. |
boolean |
isHTMLTableGenerationActive()
Returns whether or not to produce an HTL page. |
void |
read(Graph2D graph,
java.io.InputStream in)
This method is delegated to the internal IOHandler. |
void |
setColumnCount(int cols)
Sets the number of columns the output image will be split into. |
void |
setHTMLTableGenerationActive(boolean generate)
Whether or not to generate an HTML page that displays the image tiles in one large table. |
void |
setMaximumTileSize(int width,
int height)
Sets the maximum size for each output image tile. |
void |
setRowCount(int rows)
Sets the number of rows the output image will be split into. |
void |
write(Graph2D graph,
java.io.OutputStream out)
This method is delegated to the internal IOHandler. |
void |
write(Graph2D graph,
java.lang.String name)
Exports a diagram to multiple output files. |
protected void |
writeTile(Graph2D graph,
IOHandler delegateIO,
java.lang.String tileName,
int row,
int col)
Writes a specific tile of the image by the means of a delegate IOHandler. |
Methods inherited from class y.io.IOHandler |
---|
canWriteSubset, createObjectInputStream, createObjectOutputStream, hide, read, read, shouldSerialize, shouldSerialize, writeSubset, writeSubset |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TiledImageOutputHandler(IOHandler delegate)
delegate
- the delegate IOHandler that will be invoked
for each image tile with a different viewport.Method Detail |
---|
public java.lang.String getFileFormatString()
getFileFormatString
in class IOHandler
public void setHTMLTableGenerationActive(boolean generate)
.html
Its base name will be the same as the output file.
By default this feature is deactivated.
public boolean isHTMLTableGenerationActive()
setHTMLTableGenerationActive(boolean)
public void setMaximumTileSize(int width, int height)
setRowCount(int)
and setColumnCount(int)
.
public void setRowCount(int rows)
setMaximumTileSize(int,int)
.
public void setColumnCount(int cols)
setMaximumTileSize(int,int)
.
public boolean canRead()
canRead
in class IOHandler
public boolean canWrite()
canWrite
in class IOHandler
public void write(Graph2D graph, java.lang.String name) throws java.io.IOException
setRowCount(int)
and setColumnCount(int)
or the method setMaximumTileSize(int, int)
.
The names of the output files will have the form
{base name}{row}_{column}.{extension} given that the name parameter
has the form {base name}.{extension}.
Additionally this method creates HTML file when requested.
write
in class IOHandler
name
- The name of the output file
java.io.IOException
protected void writeTile(Graph2D graph, IOHandler delegateIO, java.lang.String tileName, int row, int col) throws java.io.IOException
graph
- the graph comprising the diagram to be serializeddelegateIO
- the IOHandler used to write the image tiletileName
- the file name of the tile being written.row
- the tile row currently written. Row numbers start with 0
col
- the tile column currently written. Column numbers start with 0
java.io.IOException
protected java.lang.String createTileFileName(Graph2D graph, IOHandler delegateIO, java.lang.String baseName, int row, int col)
graph
- the graph comprising the diagram to be serializeddelegateIO
- the IOHandler used to write the image tilebaseName
- the original file name with the dot-separated name suffix already stripped off.row
- the tile row currently written. Row numbers start with 0
col
- the tile column currently written. Column numbers start with 0
public java.lang.String getFileNameExtension()
getFileNameExtension
in class IOHandler
public void read(Graph2D graph, java.io.InputStream in) throws java.io.IOException
read
in class IOHandler
java.io.IOException
public void write(Graph2D graph, java.io.OutputStream out) throws java.io.IOException
write
in class IOHandler
java.io.IOException
|
© Copyright 2000-2022, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |