|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecty.io.IOHandler
y.io.ImageOutputHandler
y.io.ImageIoOutputHandler
public class ImageIoOutputHandler
This class serves as an adapter to the javax.imageio API which is available in J2RE version 1.4 and later. It can be used to adapt an ImageWriter to an ImageOutputHandler.
![]() |
![]() |
| Constructor Summary | |
|---|---|
ImageIoOutputHandler(ImageWriter iWriter)
Creates a new instance of ImageIoOutputHandler using the given ImageWriter. |
|
| Method Summary | |
|---|---|
protected BufferedImage |
createImage(int width,
int height)
Creates the buffered image on which the graph will be rendered. |
protected void |
encode(BufferedImage image,
OutputStream out)
Encodes the given image to the given output stream. |
String |
getFileFormatString()
Returns a descriptive string of the supported file format. |
String |
getFileNameExtension()
Returns the file name extension of the supported file format. |
ImageWriteParam |
getImageWriteParam()
Returns the current ImageWriteParam for the ImageWriter. |
ImageWriter |
getImageWriter()
Returns the currently set ImageWriter instance. |
void |
setImageWriteParam(ImageWriteParam iwp)
Sets the current ImageWriteParam for the ImageWriter. |
void |
setImageWriter(ImageWriter iWriter)
Sets the new ImageWriter instance. |
| Methods inherited from class y.io.ImageOutputHandler |
|---|
canRead, createDefaultGraph2DView, createGraphicsContext, isAntialiasingEnabled, read, setAntialiasingEnabled, write, write |
| Methods inherited from class y.io.IOHandler |
|---|
canWrite, canWriteSubset, createObjectInputStream, createObjectOutputStream, 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 |
| Constructor Detail |
|---|
public ImageIoOutputHandler(ImageWriter iWriter)
| Method Detail |
|---|
public void setImageWriter(ImageWriter iWriter)
iWriter - the new writer - must not be nullpublic ImageWriter getImageWriter()
protected void encode(BufferedImage image,
OutputStream out)
throws IOException
ImageOutputHandler
encode in class ImageOutputHandlerIOExceptionpublic String getFileNameExtension()
IOHandler
getFileNameExtension in class IOHandlerpublic String getFileFormatString()
IOHandler
getFileFormatString in class IOHandler
protected BufferedImage createImage(int width,
int height)
ImageOutputHandler
createImage in class ImageOutputHandlerpublic ImageWriteParam getImageWriteParam()
public void setImageWriteParam(ImageWriteParam iwp)
|
© Copyright 2000-2008, yWorks GmbH. All rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||