de.java_chess.javaChess.action
Class SaveGameAction

java.lang.Object
  |
  +--javax.swing.AbstractAction
        |
        +--de.java_chess.javaChess.action.JavaChessAction
              |
              +--de.java_chess.javaChess.action.SaveGameAction
Direct Known Subclasses:
SaveGameAsAction

public class SaveGameAction
extends JavaChessAction

This class implements the action to save a game.

See Also:
Serialized Form

Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
 
Constructor Summary
SaveGameAction(GameNotation gameNotation)
          Create a new action instance.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent event)
          The actual action. event The event, that caused this action.
 void trySave(java.io.File file)
          Try to save the game into the given file.
 
Methods inherited from class de.java_chess.javaChess.action.JavaChessAction
getName, getShortDescription
 
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SaveGameAction

public SaveGameAction(GameNotation gameNotation)
Create a new action instance.
Parameters:
gameNotation - The game notation.
Method Detail

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent event)
The actual action. event The event, that caused this action.
Overrides:
actionPerformed in class javax.swing.AbstractAction

trySave

public void trySave(java.io.File file)
Try to save the game into the given file.
Parameters:
file - The file to write into.