public class ScanListenerAdapter extends java.lang.Object implements ScanListener
ScanListener. You may extend this subclass and provide
implementations of methods corresponding to events of interest to you.| Constructor and Description |
|---|
ScanListenerAdapter() |
| Modifier and Type | Method and Description |
|---|---|
void |
frameAcquisitionStarted(SaneDevice device,
au.com.southsky.jfreesane.SaneParameters parameters,
int currentFrame,
int likelyTotalFrames)
Called once frame acquisition has begun.
|
void |
recordRead(SaneDevice device,
int totalBytesRead,
int imageSize)
Called once for each record in a frame.
|
void |
scanningFinished(SaneDevice device)
Called once the current page is done.
|
void |
scanningStarted(SaneDevice device)
Called once scanning has begun.
|
public void scanningStarted(SaneDevice device)
ScanListenerscanningStarted in interface ScanListenerdevice - the device that is now acquiring an imagepublic void frameAcquisitionStarted(SaneDevice device, au.com.southsky.jfreesane.SaneParameters parameters, int currentFrame, int likelyTotalFrames)
ScanListenerframeAcquisitionStarted in interface ScanListenerdevice - the device that is acquiring the frameparameters - the parameters of the acquisitioncurrentFrame - the zero-based index of the frame in the current scan (normally 0, but will
be 0, 1 and 2 in successive calls for three-pass scanners)likelyTotalFrames - the number of frames that are likely to be received in this scan.
JFreeSane cannot know this for sure, so the number should not be relied upon for program
correctnesspublic void recordRead(SaneDevice device, int totalBytesRead, int imageSize)
ScanListenerrecordRead in interface ScanListenerdevice - the device that acquired the recordtotalBytesRead - the number of bytes read so far in this frameimageSize - the total number of bytes in the frame. When this cannot be known in
advance, this will be set to -1 (e.g. the scanner is a hand-held scanner or uses page height
detection)public void scanningFinished(SaneDevice device)
ScanListenerscanningFinished in interface ScanListenerdevice - the device that is now finished acquiring a page