com.bluemarsh.jswat.action
Class CaptureAction

java.lang.Object
  |
  +--javax.swing.AbstractAction
        |
        +--com.bluemarsh.jswat.action.JSwatAction
              |
              +--com.bluemarsh.jswat.action.CaptureAction
All Implemented Interfaces:
javax.swing.Action, java.awt.event.ActionListener, java.lang.Cloneable, java.util.EventListener, java.io.Serializable

public class CaptureAction
extends JSwatAction

Class CaptureAction allows the user to capture the output sent to the message window.

Author:
Nathan Fiedler
See Also:
Serialized Form

Field Summary
protected static java.lang.String FILENAME_KEY
          Key for storing filename in properties.
protected static java.lang.String FILEWRITER_KEY
          Key for storing file writer in properties.
protected static java.lang.String OUTPUTSTREAM_KEY
          Key for storing output stream in properties.
 
Fields inherited from class com.bluemarsh.jswat.action.JSwatAction
swat
 
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
 
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
 
Constructor Summary
CaptureAction()
          Creates a new CaptureAction object with the default action command string of "capture".
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent event)
          Performs the capture action.
 void closeFileWriter(Log log, java.io.Writer writer)
          Removes the writer from the given Log object and closes it.
 
Methods inherited from class com.bluemarsh.jswat.action.JSwatAction
displayError, getFrame, getSession
 
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FILEWRITER_KEY

protected static final java.lang.String FILEWRITER_KEY
Key for storing file writer in properties.

OUTPUTSTREAM_KEY

protected static final java.lang.String OUTPUTSTREAM_KEY
Key for storing output stream in properties.

FILENAME_KEY

protected static final java.lang.String FILENAME_KEY
Key for storing filename in properties.
Constructor Detail

CaptureAction

public CaptureAction()
Creates a new CaptureAction object with the default action command string of "capture".
Method Detail

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent event)
Performs the capture action.
Overrides:
actionPerformed in class javax.swing.AbstractAction
Parameters:
event - action event

closeFileWriter

public void closeFileWriter(Log log,
                            java.io.Writer writer)
Removes the writer from the given Log object and closes it.
Parameters:
log - Log object to detach from.
writer - writer to detach from log.