1 | public class CloseAllSessionsCommand implements ICommand↵ | | 1 | public class GotoPreviousResultsTabCommand implements ICommand
↵
|
2 | {↵ | | 2 | {
↵
|
3 | /** Application API. */↵ | | 3 | /** Current panel. */
↵
|
4 | private final IApplication _app;↵ | | 4 | private final I↵
|
| | | 5 | SQLPanelAPI _panel;↵
|
| | | 6 |
↵
|
5 | /**↵ | | 7 | /**
↵
|
6 | * Ctor.↵ | | 8 | * Ctor.
↵
|
7 | *↵ | | 9 | *
↵
|
8 | * @param app Application API.↵ | | 10 | * @param panel The SQL Panel we want to display the previous results↵
|
| | | 11 | * tab for.
↵
|
9 | *↵ | | 12 | *
↵
|
10 | * @throws IllegalArgumentException↵ | | 13 | * @throws IllegalArgumentException
↵
|
11 | * Thrown if a <TT>null</TT> <TT>IApplication</TT> passed.↵ | | 14 | * Thrown if a <TT>null</TT> <TT>ISQLPanelAPI</TT> passed.
↵
|
12 | */↵ | | 15 | */
↵
|
13 | public CloseAllSessionsCommand(IApplication app)↵ | | 16 | public ↵
|
14 | throws IllegalArgumentException↵ | | 17 | GotoPreviousResultsTabCommand(ISQLPanelAPI panel)
↵
|
15 | {↵ | | 18 | {
↵
|
16 | super();↵ | | 19 | super();
↵
|
17 | if (app == null)↵ | | 20 | if (panel == null)
↵
|
18 | {↵ | | 21 | {
↵
|
19 | throw new IllegalArgumentException("IApplication == null");↵ | | 22 | throw new IllegalArgumentException("ISession == null");
↵
|
20 | }↵ | | 23 | }↵
|
| | | 24 |
↵
|
21 | _app = app;↵ | | 25 | _↵
|
22 | }↵ | | |
|
| | | 26 | panel = panel;↵
|
| | | 27 | }↵
|
| | | 28 |
↵
|
23 | /**↵ | | 29 | /**
↵
|
24 | * Close all sessions.↵ | | 30 | * Display the previous results tab.
↵
|
25 | */↵ | | 31 | */
↵
|
26 | public void execute()↵ | | 32 | public void execute()
↵
|
27 | {↵ | | 33 | {
↵
|
28 | _app.getSessionManager().closeAllSessions() | | 34 | _panel.gotoPreviousResultsTab()
|