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
| ||||
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
|
Instantiate a Reader selection dialog with owner.
|
|
Instantiate a Reader selection dialog with owner.
|
|
Instantiate a Reader selection dialog
|
Member Function Documentation
|
implements ActionListener. Implementation of the ActionListener. |
|
Override the dispose method.
|
|
Query the selected reader index.
|
Member Data Documentation
|
button tooltip text Override the tooltip text for the two buttons OK (butHelp[0]) and Cancel (butHelp[1]) |
|
button icons Override the icons for the two buttons OK (butIcon[0]) and Cancel (butIcon[1]) |
|
button keybord accelerators Override the keyboard accelerators for the two buttons OK (butKey[0]) and Cancel (butKey[1]) |
|
button text Override the text for the two buttons OK (butText[0]) and Cancel (butText[1]) |
|
Dialog Title. Override the dialog title |
|
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: