Package org.ghost4j.display
Class ImageWriterDisplayCallback
- java.lang.Object
-
- org.ghost4j.display.ImageWriterDisplayCallback
-
- All Implemented Interfaces:
DisplayCallback
public class ImageWriterDisplayCallback extends java.lang.Object implements DisplayCallback
Display callback that stores device output as java Image (on image = one page).
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<java.awt.Image>
images
Holds document images.
-
Constructor Summary
Constructors Constructor Description ImageWriterDisplayCallback()
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
displayClose()
Method called when device has been closed.void
displayOpen()
Method called when new device has been opened.void
displayPage(int width, int height, int raster, int format, int copies, int flush, byte[] imageData)
Method called on show page.void
displayPreClose()
Method called when device is about to be closed.void
displayPreSize(int width, int height, int raster, int format)
Method called when device is about to be resized.void
displaySize(int width, int height, int raster, int format)
Method called when device has been resized.void
displaySync()
Method called on page flush.void
displayUpdate(int x, int y, int width, int height)
Method called to notify whenever a portion of the raster is updated.java.util.List<java.awt.Image>
getImages()
-
-
-
Method Detail
-
displayOpen
public void displayOpen() throws GhostscriptException
Description copied from interface:DisplayCallback
Method called when new device has been opened. This is the first event from this device.- Specified by:
displayOpen
in interfaceDisplayCallback
- Throws:
GhostscriptException
-
displayPreClose
public void displayPreClose() throws GhostscriptException
Description copied from interface:DisplayCallback
Method called when device is about to be closed. Device will not be closed until this function returns.- Specified by:
displayPreClose
in interfaceDisplayCallback
- Throws:
GhostscriptException
-
displayClose
public void displayClose() throws GhostscriptException
Description copied from interface:DisplayCallback
Method called when device has been closed. This is the last event from this device.- Specified by:
displayClose
in interfaceDisplayCallback
- Throws:
GhostscriptException
-
displayPreSize
public void displayPreSize(int width, int height, int raster, int format) throws GhostscriptException
Description copied from interface:DisplayCallback
Method called when device is about to be resized.- Specified by:
displayPreSize
in interfaceDisplayCallback
- Parameters:
width
- Widthheight
- Heightraster
- Rasterformat
- Format- Throws:
GhostscriptException
-
displaySize
public void displaySize(int width, int height, int raster, int format) throws GhostscriptException
Description copied from interface:DisplayCallback
Method called when device has been resized.- Specified by:
displaySize
in interfaceDisplayCallback
- Parameters:
width
- Widthheight
- Heightraster
- Rasterformat
- Format- Throws:
GhostscriptException
-
displaySync
public void displaySync() throws GhostscriptException
Description copied from interface:DisplayCallback
Method called on page flush.- Specified by:
displaySync
in interfaceDisplayCallback
- Throws:
GhostscriptException
-
displayPage
public void displayPage(int width, int height, int raster, int format, int copies, int flush, byte[] imageData) throws GhostscriptException
Description copied from interface:DisplayCallback
Method called on show page.- Specified by:
displayPage
in interfaceDisplayCallback
- Parameters:
width
- Widthheight
- Heightraster
- Rasterformat
- Formatcopies
- Copiesflush
- FlushimageData
- Byte array representing image data. Data layout and order is controlled by the -dDisplayFormat argument.- Throws:
GhostscriptException
-
displayUpdate
public void displayUpdate(int x, int y, int width, int height) throws GhostscriptException
Description copied from interface:DisplayCallback
Method called to notify whenever a portion of the raster is updated.- Specified by:
displayUpdate
in interfaceDisplayCallback
- Parameters:
x
- X coordinatey
- Y coordinatewidth
- Widthheight
- Height- Throws:
GhostscriptException
-
getImages
public java.util.List<java.awt.Image> getImages()
-
-