1 | public class NewObjectTreeAction extends SquirrelAction implements ISessionAction↵ | | 1 | public class NewSQLWorksheetAction extends SquirrelAction implements ISessionAction↵
|
2 | {↵ | | 2 | {↵
|
3 | private ISession _session;↵ | | 3 | private ISession _session;↵
|
|
4 | /**↵ | | 4 | /**↵
|
5 | * Ctor.↵ | | 5 | * Ctor.↵
|
6 | *↵ | | 6 | *↵
|
7 | * @param app Application API.↵ | | 7 | * @param app Application API.↵
|
8 | *↵ | | 8 | *↵
|
9 | * @throws IllegalArgumentException↵ | | 9 | * @throws IllegalArgumentException↵
|
10 | * Thrown if a <TT>null</TT> <TT>IApplication</TT> passed.↵ | | 10 | * Thrown if a <TT>null</TT> <TT>IApplication</TT> passed.↵
|
11 | */↵ | | 11 | */↵
|
12 | public NewObjectTreeAction(IApplication app)↵ | | 12 | public NewSQLWorksheetAction(IApplication app)↵
|
13 | {↵ | | 13 | {↵
|
14 | super(app);↵ | | 14 | super(app);↵
|
15 | if (app == null)↵ | | 15 | if (app == null)↵
|
16 | {↵ | | 16 | {↵
|
17 | throw new IllegalArgumentException("Null IApplication passed");↵ | | 17 | throw new IllegalArgumentException("Null IApplication passed");↵
|
18 | }↵ | | 18 | }↵
|
19 | ↵ | | |
|
20 | setEnabled(false);↵ | | 19 | setEnabled(false);↵
|
21 | }↵ | | 20 | }↵
|
|
22 | /**↵ | | 21 | /**↵
|
23 | * Display the tree.↵ | | 22 | * Display a new worksheet.↵
|
24 | *↵ | | 23 | *↵
|
25 | * @param evt The event being processed.↵ | | 24 | * @param evt The event being processed.↵
|
26 | */↵ | | 25 | */↵
|
27 | public void actionPerformed(ActionEvent evt)↵ | | 26 | public void actionPerformed(ActionEvent evt)↵
|
28 | {↵ | | 27 | {↵
|
29 | getApplication().getWindowManager().createObjectTreeInternalFrame(_session);↵ | | 28 | getApplication().getWindowManager().createSQLInternalFrame(_session);↵
|
30 | }↵ | | 29 | }↵
|
|
31 | public void setSession(ISession session)↵ | | 30 | public void setSession(ISession session)↵
|
32 | {↵ | | 31 | {↵
|
33 | _session = session;↵ | | 32 | _session = session;↵
|
34 | GUIUtils.processOnSwingEventThread(new Runnable() {↵ | | 33 | GUIUtils.processOnSwingEventThread(new Runnable() {↵
|
35 | public void run() {↵ | | 34 | public void run() {↵
|
36 | setEnabled(null != _session) | | 35 | setEnabled(null != _session)
|