01: package net.sourceforge.squirrel_sql.plugins.editextras;
02:
03: import net.sourceforge.squirrel_sql.client.IApplication;
04: import net.sourceforge.squirrel_sql.client.action.SquirrelAction;
05: import net.sourceforge.squirrel_sql.client.session.ISession;
06: import net.sourceforge.squirrel_sql.client.session.ISQLPanelAPI;
07: import net.sourceforge.squirrel_sql.client.session.action.ISessionAction;
08: import net.sourceforge.squirrel_sql.client.session.action.ISQLPanelAction;
09:
10: import java.awt.event.ActionEvent;
11:
12: public class EscapeDateAction extends SquirrelAction implements
13: ISQLPanelAction {
14: private ISession _session;
15:
16: public EscapeDateAction(IApplication app,
17: net.sourceforge.squirrel_sql.fw.util.Resources rsrc) {
18: super (app, rsrc);
19: }
20:
21: public void actionPerformed(ActionEvent e) {
22: new EscapeDateController(_session, getApplication()
23: .getMainFrame());
24: }
25:
26: public void setSQLPanel(ISQLPanelAPI panel) {
27: if (null != panel) {
28: _session = panel.getSession();
29: } else {
30: _session = null;
31: }
32: setEnabled(null != _session);
33: }
34:
35: }
|