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>imagesHolds document images.
-
Constructor Summary
Constructors Constructor Description ImageWriterDisplayCallback()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddisplayClose()Method called when device has been closed.voiddisplayOpen()Method called when new device has been opened.voiddisplayPage(int width, int height, int raster, int format, int copies, int flush, byte[] imageData)Method called on show page.voiddisplayPreClose()Method called when device is about to be closed.voiddisplayPreSize(int width, int height, int raster, int format)Method called when device is about to be resized.voiddisplaySize(int width, int height, int raster, int format)Method called when device has been resized.voiddisplaySync()Method called on page flush.voiddisplayUpdate(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 GhostscriptExceptionDescription copied from interface:DisplayCallbackMethod called when new device has been opened. This is the first event from this device.- Specified by:
displayOpenin interfaceDisplayCallback- Throws:
GhostscriptException
-
displayPreClose
public void displayPreClose() throws GhostscriptExceptionDescription copied from interface:DisplayCallbackMethod called when device is about to be closed. Device will not be closed until this function returns.- Specified by:
displayPreClosein interfaceDisplayCallback- Throws:
GhostscriptException
-
displayClose
public void displayClose() throws GhostscriptExceptionDescription copied from interface:DisplayCallbackMethod called when device has been closed. This is the last event from this device.- Specified by:
displayClosein interfaceDisplayCallback- Throws:
GhostscriptException
-
displayPreSize
public void displayPreSize(int width, int height, int raster, int format) throws GhostscriptExceptionDescription copied from interface:DisplayCallbackMethod called when device is about to be resized.- Specified by:
displayPreSizein interfaceDisplayCallback- Parameters:
width- Widthheight- Heightraster- Rasterformat- Format- Throws:
GhostscriptException
-
displaySize
public void displaySize(int width, int height, int raster, int format) throws GhostscriptExceptionDescription copied from interface:DisplayCallbackMethod called when device has been resized.- Specified by:
displaySizein interfaceDisplayCallback- Parameters:
width- Widthheight- Heightraster- Rasterformat- Format- Throws:
GhostscriptException
-
displaySync
public void displaySync() throws GhostscriptExceptionDescription copied from interface:DisplayCallbackMethod called on page flush.- Specified by:
displaySyncin interfaceDisplayCallback- Throws:
GhostscriptException
-
displayPage
public void displayPage(int width, int height, int raster, int format, int copies, int flush, byte[] imageData) throws GhostscriptExceptionDescription copied from interface:DisplayCallbackMethod called on show page.- Specified by:
displayPagein 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 GhostscriptExceptionDescription copied from interface:DisplayCallbackMethod called to notify whenever a portion of the raster is updated.- Specified by:
displayUpdatein interfaceDisplayCallback- Parameters:
x- X coordinatey- Y coordinatewidth- Widthheight- Height- Throws:
GhostscriptException
-
getImages
public java.util.List<java.awt.Image> getImages()
-
-