/* * License: source-license.txt * If this code is used independently, copy the license here. */ package wombat.gui.actions; import java.awt.event.ActionEvent; import javax.swing.AbstractAction; import javax.swing.Action; import wombat.gui.icons.IconManager; import wombat.util.files.DocumentManager; /** * Save the currently active document. */ public class Save extends AbstractAction { private static final long serialVersionUID = -1947196514315440029L; /** * Create a save action. */ public Save() { super("Save", IconManager.icon("Save.png")); putValue(Action.SHORT_DESCRIPTION, getValue(Action.NAME)); } /** * Save the active document. * @param event Event parameters (ignored). * @see DocumentManager, ActionEvent */ public void actionPerformed(ActionEvent arg0) { DocumentManager.Save(); } }