jcreek.cke.command
Class SaveModelAction
java.lang.Object
javax.swing.AbstractAction
jcreek.cke.command.CreekAction
jcreek.cke.command.SaveModelAction
- All Implemented Interfaces:
- javax.swing.Action, java.awt.event.ActionListener, java.lang.Cloneable, java.util.EventListener, java.beans.PropertyChangeListener, java.io.Serializable
- Direct Known Subclasses:
- CloseModelAction, SaveModelAsAction
- public class SaveModelAction
- extends CreekAction
- implements java.beans.PropertyChangeListener
Title: JavaCreek
Description: A Case based Reasoning Approach in java
Copyright: Copyright (c) 2002
Company: Phil
- Version:
- 1.0
- Author:
- Victor
- See Also:
- Serialized Form
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 |
Method Summary |
void |
actionPerformed(java.awt.event.ActionEvent event)
Performs the save action. |
protected boolean |
askToSave(java.awt.Frame win)
Ask the user if we should save the current dirty document. |
protected void |
centerComponent(java.awt.Component c,
java.awt.Frame mainFrame)
|
void |
noCurrentKM(java.awt.Frame win)
Displays a dialog indicating that there's no current
KnowledgeModel to perform the desired operation. |
void |
propertyChange(java.beans.PropertyChangeEvent e)
|
protected boolean |
saveFile(Visualizer win,
boolean askUser,
boolean forceSaveAs)
|
Methods inherited from class javax.swing.AbstractAction |
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
sd
protected SaveDialog sd
SaveModelAction
public SaveModelAction()
SaveModelAction
public SaveModelAction(java.lang.String actionString)
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent event)
- Performs the save action.
- Specified by:
actionPerformed
in interface java.awt.event.ActionListener
- Parameters:
event
- action event
saveFile
protected boolean saveFile(Visualizer win,
boolean askUser,
boolean forceSaveAs)
propertyChange
public void propertyChange(java.beans.PropertyChangeEvent e)
- Specified by:
propertyChange
in interface java.beans.PropertyChangeListener
noCurrentKM
public void noCurrentKM(java.awt.Frame win)
- Displays a dialog indicating that there's no current
KnowledgeModel to perform the desired operation.
- Parameters:
win
- frame to attach dialog to
askToSave
protected boolean askToSave(java.awt.Frame win)
- Ask the user if we should save the current dirty document.
- Parameters:
win
- parent window to attach dialog to
- Returns:
- true if we should save
centerComponent
protected void centerComponent(java.awt.Component c,
java.awt.Frame mainFrame)
Created at IDI, NTNU by the Artificial Intelligence and Learning group