system
Class WDYSControl

java.lang.Object
  extended bysystem.WDYSControl
All Implemented Interfaces:
ActionListener, EventListener

public class WDYSControl
extends Object
implements ActionListener

This class processes all the user events.

Since:
1.00
Version:
2.10
Author:
Berend "Kirk" Wouda

Field Summary
protected  WDYSFrame gui
          The GUI that this control class processes events for.
 
Constructor Summary
WDYSControl(WDYSFrame gui)
          Constructs a new control class that processes events from the passed GUI.
 
Method Summary
 void actionPerformed(ActionEvent event)
          Processes an event caused by the GUI.
protected  void decrypt(String in, String out)
          Decrypts the encrypted file into the decrypted file.
protected  void encrypt(String in, String out)
          Encrypts the decrypted file into the encrypted file.
 void setDecryptedFilename()
          Asks the user to browse and select the decrypted file.
 void setEncryptedFilename()
          Asks the user to browse and select the encrypted file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

gui

protected WDYSFrame gui
The GUI that this control class processes events for.

Constructor Detail

WDYSControl

public WDYSControl(WDYSFrame gui)
Constructs a new control class that processes events from the passed GUI.

Parameters:
gui - The GUI this control class works for.
Method Detail

actionPerformed

public void actionPerformed(ActionEvent event)
Processes an event caused by the GUI.

Specified by:
actionPerformed in interface ActionListener
See Also:
ActionListener.actionPerformed(java.awt.event.ActionEvent)

decrypt

protected void decrypt(String in,
                       String out)
Decrypts the encrypted file into the decrypted file.

Parameters:
in - The encrypted file.
out - The decrypted file.

encrypt

protected void encrypt(String in,
                       String out)
Encrypts the decrypted file into the encrypted file.

Parameters:
in - The decrypted file.
out - The encrypted file.

setDecryptedFilename

public void setDecryptedFilename()
Asks the user to browse and select the decrypted file. Then, if the encrypted filename field is empty, fill in an equivalent name with a .txt extension, select it and focus it.


setEncryptedFilename

public void setEncryptedFilename()
Asks the user to browse and select the encrypted file. Then, if the decrypted filename field is empty, fill in an equivalent name with a .txt extension, select it and focus it.