|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.swing.AbstractAction de.michab.mack.ConfigurableAction de.michab.mack.actions.ActExitApplication
The application exit action. Linked to an application's main window via the offered window listener interface.
The action reads the key ACT_APP_EXIT.really.leave
from the
resource bundle. If this is set to a non-empty string value, then this is
shown in a confirmation dialog, ensuring that the user really wants to leave
the app. If this is empty or the key doesn't exist the application is
terminated without confirmation.
Field Summary |
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 | |
ActExitApplication()
|
Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent e)
Asks the user if he really wants to leave the application and terminates in case of a positive answer. |
void |
configureFrom(java.util.ResourceBundle r)
Performs local localisation. |
void |
windowActivated(java.awt.event.WindowEvent we)
Empty implementation. |
void |
windowClosed(java.awt.event.WindowEvent we)
Shuts down the application, never returns. |
void |
windowClosing(java.awt.event.WindowEvent we)
First step in application shutdown. |
void |
windowDeactivated(java.awt.event.WindowEvent we)
Empty implementation. |
void |
windowDeiconified(java.awt.event.WindowEvent we)
Empty implementation. |
void |
windowIconified(java.awt.event.WindowEvent we)
Empty implementation. |
void |
windowOpened(java.awt.event.WindowEvent we)
Initialises the internal application frame reference. |
Methods inherited from class de.michab.mack.ConfigurableAction |
getDialogRoot, getKey, getToolbarComponent, localize, localize, localizeIcon |
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 |
public ActExitApplication()
Method Detail |
public void configureFrom(java.util.ResourceBundle r)
configureFrom
in class ConfigurableAction
r
- The resource bundle to use for localisation.public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
e
- The action event.ActionListener.actionPerformed(ActionEvent)
public void windowClosed(java.awt.event.WindowEvent we)
windowClosed
in interface java.awt.event.WindowListener
we
- The window event.windowClosing(WindowEvent)
public void windowClosing(java.awt.event.WindowEvent we)
First step in application shutdown. Somebody tried to close the main frame. Method decides whether the application should be shut down and disposes() the frame, which results in a call to windowClosed().
Note that the action will switch the defaultCloseOperation
property of its frame to DO_NOTHING_ON_CLOSE
.
windowClosing
in interface java.awt.event.WindowListener
we
- The window event.windowClosed(WindowEvent)
public void windowOpened(java.awt.event.WindowEvent we)
windowOpened
in interface java.awt.event.WindowListener
we
- The window event.public void windowActivated(java.awt.event.WindowEvent we)
windowActivated
in interface java.awt.event.WindowListener
we
- The window event.public void windowDeactivated(java.awt.event.WindowEvent we)
windowDeactivated
in interface java.awt.event.WindowListener
we
- The window event.public void windowIconified(java.awt.event.WindowEvent we)
windowIconified
in interface java.awt.event.WindowListener
we
- The window event.public void windowDeiconified(java.awt.event.WindowEvent we)
windowDeiconified
in interface java.awt.event.WindowListener
we
- The window event.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |