1 | public class CloseAllSQLResultTabsButCurrentAction extends SquirrelAction↵ | | 1 | public class CloseCurrentSQLResultTabAction extends SquirrelAction↵
|
2 | implements ISQLPanelAction↵ | | 2 | implements ISQLPanelAction↵
|
3 | {↵ | | 3 | {↵
|
|
4 | /** Current panel. */↵ | | 4 | /** Current panel. */↵
|
5 | private ISQLPanelAPI _panel;↵ | | 5 | private ISQLPanelAPI _panel;↵
|
|
|
6 | /**↵ | | 6 | /**↵
|
7 | * Ctor specifying Application API.↵ | | 7 | * Ctor specifying Application API.↵
|
8 | *↵ | | 8 | *↵
|
9 | * @param app Application API.↵ | | 9 | * @param app Application API.↵
|
10 | */↵ | | 10 | */↵
|
11 | public CloseAllSQLResultTabsButCurrentAction(IApplication app)↵ | | 11 | public CloseCurrentSQLResultTabAction(IApplication app)↵
|
12 | {↵ | | 12 | {↵
|
13 | super(app);↵ | | 13 | super(app);↵
|
14 | }↵ | | 14 | }↵
|
|
15 | public void setSQLPanel(ISQLPanelAPI panel)↵ | | 15 | public void setSQLPanel(ISQLPanelAPI panel)↵
|
16 | {↵ | | 16 | {↵
|
17 | _panel = panel;↵ | | 17 | _panel = panel;↵
|
18 | setEnabled(null != _panel);↵ | | 18 | setEnabled(null != _panel);↵
|
19 | }↵ | | 19 | }↵
|
|
20 | /**↵ | | 20 | /**↵
|
21 | * Display the previous results tab.↵ | | 21 | * Close the current result tab↵
|
22 | *↵ | | 22 | *↵
|
23 | * @param evt Event being executed.↵ | | 23 | * @param evt Event being executed.↵
|
24 | */↵ | | 24 | */↵
|
25 | public synchronized void actionPerformed(ActionEvent evt)↵ | | 25 | public synchronized void actionPerformed(ActionEvent evt)↵
|
26 | {↵ | | 26 | {↵
|
27 | if (_panel != null)↵ | | 27 | if (_panel != null)↵
|
28 | {↵ | | 28 | {↵
|
29 | _panel.closeAllButCurrentResultTabs() | | 29 | _panel.closeCurrentResultTab()
|