ca.sqlpower.wabit.swingui.action
Class CloseWorkspaceAction

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by ca.sqlpower.wabit.swingui.action.CloseWorkspaceAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action

public class CloseWorkspaceAction
extends javax.swing.AbstractAction

This method will close the active workspace in the given context. This will also prompt to save the closing workspace if changes exist.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
 
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
 
Constructor Summary
CloseWorkspaceAction(WabitSwingSessionContext context)
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
           
static boolean checkUnsavedChanges(WabitSwingSessionContext context)
          Prompts the user if there are unsaved changes if they really want to close.
static void closeActiveWorkspace(WabitSwingSessionContext context)
           
 
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
 

Constructor Detail

CloseWorkspaceAction

public CloseWorkspaceAction(WabitSwingSessionContext context)
Method Detail

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)

checkUnsavedChanges

public static boolean checkUnsavedChanges(WabitSwingSessionContext context)
Prompts the user if there are unsaved changes if they really want to close. Returns true if we should close the active workspace.


closeActiveWorkspace

public static void closeActiveWorkspace(WabitSwingSessionContext context)


Copyright © 2009. All Rights Reserved.