ds.ov2.gui
Class Config_actions

java.lang.Object
  extended by ds.ov2.gui.Config_actions

public class Config_actions
extends Object

Actions for the config window.

CPP Preprocessing
no cpp preprocessing needed
Execution Environment:
host
Author:
Hendrik Tews
Version:
$Revision: 1.14 $
Last Commit:
$Date: 2009-06-22 21:09:39 $ by $Author: tews $

Constructor Summary
Config_actions()
          Default empty constructor.
 
Method Summary
(package private)  void applet_browse_button(Config_window cw, JTextField applet_name_text_field)
          Method to be called when one of the browse buttons for the applet cap files in the config window is pressed.
 void dismiss_button(Config_window cw)
          Method to be called when the dismiss button is pressed in the config dialog.
 CardTerminal[] get_all_readers()
          Generate an array of all connected card readers.
 CardTerminal get_default_reader(Ov_demo_gui gui)
          Choose a default reader among all connected ones.
 CardTerminal[] get_jcop_readers()
          Generate an array of all accessible jcop emulators.
 CardTerminal[] get_pcsc_readers()
          Generate an array of all connected PCSC card readers.
 void ok_button(Config_window cw)
          Method to be called when the OK button is pressed in the config dialog.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Config_actions

Config_actions()
Default empty constructor.

Method Detail

get_pcsc_readers

public CardTerminal[] get_pcsc_readers()
Generate an array of all connected PCSC card readers.

Returns:
list of all PCSC card terminals

get_jcop_readers

public CardTerminal[] get_jcop_readers()
Generate an array of all accessible jcop emulators. Returns an empty array if the appropriate libraries are not present at runtime.

Returns:
list of all accessible jcop emulators

get_all_readers

public CardTerminal[] get_all_readers()
Generate an array of all connected card readers. Used to initialize the model of the card terminal combo box. Collects all the PC/SC terminals and adds an entry for the jcop emulator at the end if the appropriate libraries are present at runtime.

Returns:
list of all card terminals

get_default_reader

public CardTerminal get_default_reader(Ov_demo_gui gui)
Choose a default reader among all connected ones. Used during initialization in Gui_actions.default_initialization. If no reader can be found (because no real reader is connected and the libraries for the jcop emulator are not present) display an error message and exit the program.

Parameters:
gui - the GUI window
Returns:
default card reader

ok_button

public void ok_button(Config_window cw)
Method to be called when the OK button is pressed in the config dialog.

Parameters:
cw - the config window

dismiss_button

public void dismiss_button(Config_window cw)
Method to be called when the dismiss button is pressed in the config dialog.

Parameters:
cw - the config window

applet_browse_button

void applet_browse_button(Config_window cw,
                          JTextField applet_name_text_field)
Method to be called when one of the browse buttons for the applet cap files in the config window is pressed. Displays an appropriate file chooser and records the result.

Parameters:
cw - the config window
applet_name_text_field - the text field to be modified as result