01: package net.sourceforge.squirrel_sql.client.session.action;
02:
03: /*
04: * TODO: Delete me
05: * Copyright (C) 2002-2003 Johan Compagner
06: * jcompagner@j-com.nl
07: *
08: * This library is free software; you can redistribute it and/or
09: * modify it under the terms of the GNU Lesser General Public
10: * License as published by the Free Software Foundation; either
11: * version 2.1 of the License, or (at your option) any later version.
12: *
13: * This library is distributed in the hope that it will be useful,
14: * but WITHOUT ANY WARRANTY; without even the implied warranty of
15: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16: * Lesser General Public License for more details.
17: *
18: * You should have received a copy of the GNU Lesser General Public
19: * License along with this library; if not, write to the Free Software
20: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21: */
22: import java.awt.event.ActionEvent;
23:
24: import net.sourceforge.squirrel_sql.fw.gui.Dialogs;
25:
26: import net.sourceforge.squirrel_sql.client.IApplication;
27: import net.sourceforge.squirrel_sql.client.action.SquirrelAction;
28: import net.sourceforge.squirrel_sql.client.session.ISession;
29:
30: /**
31: * @version $Id: RefreshTreeItemAction.java,v 1.5 2003/12/01 12:03:32 colbell Exp $
32: * @author Johan Compagner
33: */
34: public class RefreshTreeItemAction extends SquirrelAction implements
35: ISessionAction {
36: /** Current session. */
37: private ISession _session;
38:
39: /**
40: * Constructor for DropTableAction.
41: *
42: * @param app Application API.
43: *
44: * @throws IllegalArgumentException
45: * Thrown if <tt>null</tt> <tt>IApplication</tt> passed.
46: */
47: public RefreshTreeItemAction(IApplication app)
48: throws IllegalArgumentException {
49: super (app);
50: }
51:
52: /*
53: * @see ActionListener#actionPerformed(ActionEvent)
54: */
55: public void actionPerformed(ActionEvent e) {
56: // if (_session != null)
57: // {
58: // CursorChanger cursorChg = new CursorChanger(_session.getApplication().getMainFrame());
59: // cursorChg.show();
60: // try
61: // {
62: // _session.getSessionSheet().refreshSelectedDatabaseObjects();
63: // }
64: // catch (BaseSQLException ex)
65: // {
66: // final String msg = "Error occured refreshing the objects tree";
67: // s_log.error(msg, ex);
68: // _session.getMessageHandler().showMessage(msg);
69: // _session.getMessageHandler().showMessage(ex);
70: // }
71: // finally
72: // {
73: // cursorChg.restore();
74: // }
75: // }
76: Dialogs.showNotYetImplemented(_session.getSessionSheet());
77: }
78:
79: /*
80: * @see IClientSessionAction#setSession(ISession)
81: */
82: public void setSession(ISession session) {
83: _session = session;
84: }
85:
86: }
|