01: /*
02: *
03: * (c) Copyright 2004 - 2007 osbl development team.
04: *
05: * This file is part of the osbl (http://osbl.wilken.de).
06: *
07: * the osbl is free software; you can redistribute it and/or modify
08: * it under the terms of the GNU General Public License
09: * as published by the Free Software Foundation; either version 2.1
10: * of the License, or (at your option) any later version.
11: *
12: * Please see COPYING for the complete licence.
13: */
14: package org.osbl.client.wings.action;
15:
16: import org.osbl.client.wings.XIcons;
17: import org.osbl.client.wings.action.NavigationAction;
18: import org.wings.session.SessionManager;
19:
20: import javax.swing.*;
21: import java.awt.event.ActionEvent;
22: import java.util.Map;
23:
24: /**
25: * @author hengels
26: * @version $Revision: 1020 $
27: */
28: public class LogoutAction extends NavigationAction {
29: public LogoutAction(String command) {
30: putValue(Action.ACTION_COMMAND_KEY, command);
31: putValue(Action.SMALL_ICON, XIcons.EXIT);
32: }
33:
34: public void actionPerformed(ActionEvent e) {
35: SessionManager.getSession().exit();
36: }
37:
38: public void navigate(Object object) {
39: actionPerformed(new ActionEvent(this , -1, toString()));
40: }
41:
42: public void navigate(Map<String, String> query) {
43: actionPerformed(new ActionEvent(this , -1, toString()));
44: }
45:
46: public void setEnabled(boolean newValue) {
47: }
48: }
|