fi.hut.tml.xsmiles.mlfc.encryption
Class KeyDialog

java.lang.Object
  extended byfi.hut.tml.xsmiles.mlfc.encryption.KeyDialog
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener

public class KeyDialog
extends java.lang.Object
implements java.awt.event.ActionListener

Dialogue for choosing an encryption key.

Author:
honkkis, nps

Field Summary
protected  java.awt.event.ActionListener actionListener
          the dialogue's action listener
protected static java.lang.String CANCEL_COMMAND
          the name of the cancel button's command
protected  ComponentFactory cfactory
          the component factory
protected  EncryptionKey encryptionKey
          the encryption key
protected  XButton fileButton
          the file section button
protected static java.lang.String FILEBUTTON_COMMAND
          the name of the file selection command
protected  javax.swing.JFrame frame
          the frame of the dialogue
protected  XInput keyAliasInput
          the key alias field
protected  XInput keyPassInput
          the key password field
protected  java.net.URL keystoreURL
          the keystore URL
protected static java.io.File lastFile
          the last file opened
protected  java.awt.Container mainPanel
          the main panel of the dialogue
protected static java.lang.String OK_COMMAND
          the name of the OK button's command
protected  XInput storePassInput
          the keystore password field
protected  XInput URLInput
          the keystore URL field
 
Constructor Summary
KeyDialog()
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          Button handler.
 void disposeDialog()
          Destroy the dialogue.
 XCaption getCaption(java.lang.String s)
          Create a caption component.
protected  ComponentFactory getComponentFactory()
          Get the component factory being used by this dialogue.
 EncryptionKey getEncryptionKey()
          Get the key to be used for encryption.
 void setActionListener(java.awt.event.ActionListener l)
          Set the action listener for the dialogue.
protected  void setComponentFactory(ComponentFactory f)
          Set the component factory to be used by this dialogue.
 void setKey(EncryptionKey key)
          Set the encryption key.
 EncryptionKey showDialog()
          Display the dialogue.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

frame

protected javax.swing.JFrame frame
the frame of the dialogue


mainPanel

protected java.awt.Container mainPanel
the main panel of the dialogue


fileButton

protected XButton fileButton
the file section button


keyPassInput

protected XInput keyPassInput
the key password field


keyAliasInput

protected XInput keyAliasInput
the key alias field


storePassInput

protected XInput storePassInput
the keystore password field


URLInput

protected XInput URLInput
the keystore URL field


keystoreURL

protected java.net.URL keystoreURL
the keystore URL


cfactory

protected ComponentFactory cfactory
the component factory


encryptionKey

protected EncryptionKey encryptionKey
the encryption key


actionListener

protected java.awt.event.ActionListener actionListener
the dialogue's action listener


FILEBUTTON_COMMAND

protected static final java.lang.String FILEBUTTON_COMMAND
the name of the file selection command

See Also:
Constant Field Values

OK_COMMAND

protected static final java.lang.String OK_COMMAND
the name of the OK button's command

See Also:
Constant Field Values

CANCEL_COMMAND

protected static final java.lang.String CANCEL_COMMAND
the name of the cancel button's command

See Also:
Constant Field Values

lastFile

protected static java.io.File lastFile
the last file opened

Constructor Detail

KeyDialog

public KeyDialog()
Method Detail

showDialog

public EncryptionKey showDialog()
Display the dialogue.

Returns:
null

setKey

public void setKey(EncryptionKey key)
Set the encryption key.

Parameters:
key - the key to be used

setActionListener

public void setActionListener(java.awt.event.ActionListener l)
Set the action listener for the dialogue. This listener will be notified when the dialogue is closed.

Parameters:
l - the action listener that will handle this dialogue's events

disposeDialog

public void disposeDialog()
Destroy the dialogue.


getComponentFactory

protected ComponentFactory getComponentFactory()
Get the component factory being used by this dialogue.

Returns:
the component factory being used

setComponentFactory

protected void setComponentFactory(ComponentFactory f)
Set the component factory to be used by this dialogue.

Parameters:
f - the component factory to use

getCaption

public XCaption getCaption(java.lang.String s)
Create a caption component.

Parameters:
s - the caption text

getEncryptionKey

public EncryptionKey getEncryptionKey()
Get the key to be used for encryption.

Returns:
the key identified by the dialogue

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Button handler.

Specified by:
actionPerformed in interface java.awt.event.ActionListener
Parameters:
e - the event to be processed


X-Smiles 1.2