eu.gnome.morena
Interface Device

All Superinterfaces:
Version
All Known Subinterfaces:
Camera, Scanner
All Known Implementing Classes:
DeviceBase, ICACamera, ICADevice, ICAScanner, WIACamera, WIADevice, WIAScanner

public interface Device
extends Version

A base interface corresponding to the generic image acquisition device like scanner or camera. Scanning (scanner) or image transfer (camera) is initiated via startTransfer(TransferDoneListener) method call.


Field Summary
 
Fields inherited from interface eu.gnome.morena.Version
BUILD_DATE, BUILD_TIME, TMP_DIR, VERSION, VERSION_BUILD, VERSION_MAJOR, VERSION_MINOR
 
Method Summary
 boolean setupDevice(java.lang.Object parentComponent)
          Setup device for image transfer initiation
 void startTransfer()
          Scanning (scanner) or image transfer initiation (camera).
 void startTransfer(TransferDoneListener transferDoneListener)
          Scanning (scanner) or image transfer initiation (camera).
 java.lang.String toString()
          Returns a string representation of this Device containing a description.
 

Method Detail

setupDevice

boolean setupDevice(java.lang.Object parentComponent)
Setup device for image transfer initiation

Parameters:
parentComponent - - Parent window component for displaying the dialogs.
Returns:
true, if image transfer was canceled

startTransfer

void startTransfer(TransferDoneListener transferDoneListener)
                   throws java.lang.Exception
Scanning (scanner) or image transfer initiation (camera). This method initiates an image transfer from this device. TransferDoneListener provided is a callback handler that handles a result of the transfer. Since the transfer process is asynchronous by nature it should be considered that this method call does not wait for the transfer is to be completed.

Parameters:
transferDoneListener - - specifies the handler of the transferred image.
Throws:
java.lang.Exception

startTransfer

void startTransfer()
                   throws java.lang.Exception
Scanning (scanner) or image transfer initiation (camera). This method initiates an image transfer from this device with the same parameters as used during last startTransfer() call. TransferDoneListener provided is a callback handler that handles a result of the transfer. Since the transfer process is asynchronous by nature it should be considered that this method call does not wait for the transfer is to be completed.

Throws:
java.lang.Exception

toString

java.lang.String toString()
Returns a string representation of this Device containing a description.

Overrides:
toString in class java.lang.Object