|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.asprise.util.jtwain.SourceManager
The SourceManager
class represents a TWAIN Source Manager.
There is one and only one Data Source Manager.
Source
Method Summary | |
void |
closeSource()
Closes the current active source. |
static void |
closeSourceManager()
Closes the source manager. |
Source[] |
getAllSources()
Queries all the available sources. |
Source |
getCurrentSource()
Gets the current active source. |
Source |
getDefaultSource()
Gets the default data source. |
String |
getJTwainDLLVersion()
Returns the version of JTwain native DLL used. |
static String |
getLibraryPath()
Get the DLL library path. |
int |
getState()
Gets the state of the source. |
static SourceManager |
instance()
Gets the singleton instance of SourceManager. |
boolean |
isTwainAvailable()
Checks whether the system supports Twain. |
void |
openSource(Source source)
Opens the target data source. |
Source |
selectSource(Source source)
Selects a Source and a Source as the current active source. |
Source |
selectSourceByName(String sourceName)
Selects the source with the specified name as the current active source. |
Source |
selectSourceUI()
Displays a dialog to let the user select a data source. |
static void |
setLibraryPath(String libraryPath)
Set the DLL library path. |
static void |
unloadSourceManager()
Unloads source manager. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static SourceManager instance() throws JTwainException
JTwainException
public boolean isTwainAvailable()
true
if the system supports Twain; false
otherwise.public String getJTwainDLLVersion()
public Source[] getAllSources()
public Source getDefaultSource()
null
if no source available.public void openSource(Source source) throws JTwainException
source
- the target source to be opened
JTwainException
public Source getCurrentSource()
public int getState() throws JTwainException
JTwainException
public void closeSource() throws JTwainException
JTwainException
public static void closeSourceManager()
public static void unloadSourceManager()
public Source selectSourceUI()
null
if the user presses CANCEL button.public Source selectSource(Source source)
source
- the Source to be select. null
argument
results source selection dialog.
public Source selectSourceByName(String sourceName)
sourceName
- the name of the Source to be select. null
argument
results source selection dialog.
getAllSources()
public static void setLibraryPath(String libraryPath)
null
, in which case
the system will load the DLL library from default locations,
such as system directory.
libraryPath
- path of the DLL library to be loaded;
set to null
to let the system load the library
by automatic search.public static String getLibraryPath()
null
if no library path
has been set yet.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |