Elexis API documentation
Version 2.1.6 as of December 11 2011

ch.elexis.exchange
Interface IScannerAccess


public interface IScannerAccess

Interface to specify a Java (SWT) connection to scanner devices e.g. via TWAIN or SANE Implementing class must implement IScannerAccess and IScannerAccess.ISource. It must return all available Sources on a call to getSources(), let the user configure a source via configureSource(), and must aquire an image from the source on a call to aquire

Author:
gerry

Nested Class Summary
static interface IScannerAccess.ISource
          An Image source
 
Method Summary
 ImageData aquire(IScannerAccess.ISource src)
          Aquire an Image from the Scanner and create an SWT image from it.
 void configureSource(IScannerAccess.ISource src, java.lang.Object configuration)
          let the user enter configuration details (e.g. resolution settings, color settings) with the scanner specific dialog
 IScannerAccess.ISource getDefaultSource()
           
 IScannerAccess.ISource[] getSources()
          Retrieve all available Sources (scanners, cameras etc)
 void setDefaultSource(IScannerAccess.ISource src)
           
 

Method Detail

getSources

IScannerAccess.ISource[] getSources()
Retrieve all available Sources (scanners, cameras etc)

Returns:
an Array of SourceDefinitions, or null if there is no available Sources

getDefaultSource

IScannerAccess.ISource getDefaultSource()

setDefaultSource

void setDefaultSource(IScannerAccess.ISource src)

configureSource

void configureSource(IScannerAccess.ISource src,
                     java.lang.Object configuration)
let the user enter configuration details (e.g. resolution settings, color settings) with the scanner specific dialog

Parameters:
src - the scan source o configure

aquire

ImageData aquire(IScannerAccess.ISource src)
                 throws java.lang.Exception
Aquire an Image from the Scanner and create an SWT image from it. As every ISource has its own configuration stored, the TWAIN device will use the source configuration

Parameters:
src - the Scanner to use
Returns:
the image from the scanner
Throws:
java.lang.Exception

Elexis API documentation
Version 2.1.6 as of December 11 2011

Copyright 2005-2011 by Gerry Weirich, Elexis