de.jsystems.framework.common.actions
Class CloseFrameAction
java.lang.Object
de.jsystems.framework.common.action.AbstractAction
de.jsystems.framework.common.action.awt.WindowAction
de.jsystems.framework.common.actions.CloseFrameAction
- All Implemented Interfaces:
- EventListener, WindowListener
- public class CloseFrameAction
- extends WindowAction
Allgemeine Action zum schliessen eines Frames. Da ein Frame meistens die
komplette Anwendung darstellt wird hier im Controller die Methode
Controller.canExit()
aufgerufen. Wenn diese
Methode TRUE zurueckgibt wird die VM mit System.exit(0)
beendet.
Damit hat diese Action das gleiche Verhalten wie die ExitAction
.
Allerdings mit dem Unterschied, das diese Action hier an einem Frame registriert
werden kann.
Die Action setzt voraus, das der Controller vom Typ
BusinessFrameController
ist.
- Version:
- 1.0
Copyright by Jens Homm 2000 - 2004
- Author:
- Jens Homm JSYSTEMS
Methods inherited from class de.jsystems.framework.common.action.awt.WindowAction |
doWindowActivated, doWindowClosed, doWindowDeactivated, doWindowDeiconified, doWindowIconified, doWindowOpened, windowActivated, windowClosed, windowClosing, windowDeactivated, windowDeiconified, windowIconified, windowOpened |
Methods inherited from class de.jsystems.framework.common.action.AbstractAction |
addControl, disable, enable, exceptionInAction, getController, getControls, getException, getView, hasException, initialize, isEnabled, removeAll, removeControl, setException |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CloseFrameAction
public CloseFrameAction()
doWindowClosing
public void doWindowClosing(WindowEvent we)
throws Exception
- Ruft im Controller die Methode
Controller.canExit()
auf. Wenn diese
TRUE zurueck gibt wird die VM mit System.exit(0);
beendet.
Dabei wird vorausgesetzt, das der Controller vom Typ
BusinessDialogController
ist. Falls
der Controller nicht vom gewuenschten Typ ist wird eine
IllegalArgumentException
ausgeloest.
- Overrides:
doWindowClosing
in class WindowAction
- Parameters:
we
- Das ausgeloeste WindowEvent.
- Throws:
Exception
- wenn ein Fehler in der Action auftritt.