visit Kofax web site

de.softpro.signware.SPSmartcardDriverDialog Class Reference

List of all members.

Detailed Description

SPSmartcardDriverDialog implements a simple GUI to select one of the installed smartcard readers.

SPSmartcardDriverDialog uses class SPSmartcardDriver to query which readers are installed and displays a combo box to select a reader.

Method getResult will return the index of the selected driver, or -1 if the dialog was cancelled.

Typical usage:

 class MyApplication extends JFrame
 {
      byte[] readTemplate() {
          if(SPSmartcardDriver.getNumberDrivers() == 0) {
              // No readers installed, return error
              return null;
          }
          int iDriver = 0;
          if(if(SPSmartcardDriver.getNumberDrivers() > 1) {
              // set the button tooltip text
              SPSmartcardDriverDialog.butHelp[0] = "Press OK to confirm the selection";
              SPSmartcardDriverDialog.butHelp[1] = "Press Cancel to abort the selection";
              SPSmartcardDriverDialog scDialog = new SPSmartcardDriverDialog(this);
              iDriver = scDialog.getResult();
              if(iDriver < 0)
                  // Cancelled by user, return error
                  return null;
          }
          SPSmartcardDriver scDriver = new SPSmartcardDriver(iDriver);
          SPSmartcard sc = new SPSmartcard(scDriver);
          return scDriver.readTemplate();
      }
 }

Operating Systems:
Windows (Win32)


Public Member Functions

void actionPerformed (ActionEvent ae)
 implements ActionListener.
void dispose ()
 Override the dispose method.
int getResult ()
 Query the selected reader index.
 SPSmartcardDriverDialog () throws SPSignwareException
 Instantiate a Reader selection dialog
Exceptions:
SPSignwareException on error.

 SPSmartcardDriverDialog (Dialog compOwner) throws SPSignwareException
 Instantiate a Reader selection dialog with owner.
 SPSmartcardDriverDialog (Frame compOwner) throws SPSignwareException
 Instantiate a Reader selection dialog with owner.

Static Public Attributes

static String butHelp [] = new String[butID.length]
 button tooltip text
static Icon butIcon [] = new Icon[butID.length]
 button icons
static KeyStroke butKey [] = new KeyStroke[butID.length]
 button keybord accelerators
static String butText [] = {"OK", "Cancel"}
 button text
static String strDialogTitle = "Select Smartcard Reader"
 Dialog Title.
static String strLabelText = "Smartcard Reader"
 Label text.


Constructor & Destructor Documentation

de.softpro.signware.SPSmartcardDriverDialog.SPSmartcardDriverDialog Frame  compOwner  )  throws SPSignwareException
 

Instantiate a Reader selection dialog with owner.

Parameters:
compOwner Owner Frame
Exceptions:
SPSignwareException on error
Operating Systems:
Windows (Win32)

de.softpro.signware.SPSmartcardDriverDialog.SPSmartcardDriverDialog Dialog  compOwner  )  throws SPSignwareException
 

Instantiate a Reader selection dialog with owner.

Parameters:
compOwner Owner Frame
Exceptions:
SPSignwareException on error
Operating Systems:
Windows (Win32)

de.softpro.signware.SPSmartcardDriverDialog.SPSmartcardDriverDialog  )  throws SPSignwareException
 

Instantiate a Reader selection dialog

Exceptions:
SPSignwareException on error.

Operating Systems:
Windows (Win32)


Member Function Documentation

void de.softpro.signware.SPSmartcardDriverDialog.actionPerformed ActionEvent  ae  ) 
 

implements ActionListener.

Implementation of the ActionListener.

void de.softpro.signware.SPSmartcardDriverDialog.dispose  ) 
 

Override the dispose method.

int de.softpro.signware.SPSmartcardDriverDialog.getResult  ) 
 

Query the selected reader index.

Returns:
index of the selected reader, or -1 if cancelled by user
Operating Systems:
Windows (Win32)


Member Data Documentation

String de.softpro.signware.SPSmartcardDriverDialog.butHelp[] = new String[butID.length] [static]
 

button tooltip text

Override the tooltip text for the two buttons OK (butHelp[0]) and Cancel (butHelp[1])

Icon de.softpro.signware.SPSmartcardDriverDialog.butIcon[] = new Icon[butID.length] [static]
 

button icons

Override the icons for the two buttons OK (butIcon[0]) and Cancel (butIcon[1])

KeyStroke de.softpro.signware.SPSmartcardDriverDialog.butKey[] = new KeyStroke[butID.length] [static]
 

button keybord accelerators

Override the keyboard accelerators for the two buttons OK (butKey[0]) and Cancel (butKey[1])

String de.softpro.signware.SPSmartcardDriverDialog.butText[] = {"OK", "Cancel"} [static]
 

button text

Override the text for the two buttons OK (butText[0]) and Cancel (butText[1])

String de.softpro.signware.SPSmartcardDriverDialog.strDialogTitle = "Select Smartcard Reader" [static]
 

Dialog Title.

Override the dialog title

String de.softpro.signware.SPSmartcardDriverDialog.strLabelText = "Smartcard Reader" [static]
 

Label text.

Override the label text. The label text is displayed left of the selection combo box


The documentation for this class was generated from the following file: