1 | public class CopyDriverCommand implements ICommand↵ | | 1 | public class ModifyDriverCommand implements ICommand↵
|
2 | {↵ | | 2 | {↵
|
3 | /** Application API. */↵ | | 3 | /** Application API. */↵
|
4 | private final IApplication _app;↵ | | 4 | private final IApplication _app;↵
|
|
5 | /** <TT>ISQLDriver</TT> to be copied. */↵ | | 5 | /** <TT>ISQLDriver</TT> to be modified. */↵
|
6 | private final ISQLDriver _sqlDriver;↵ | | 6 | private ISQLDriver _driver;↵
|
|
7 | /**↵ | | 7 | /**↵
|
8 | * Ctor.↵ | | 8 | * Ctor.↵
|
9 | *↵ | | 9 | *↵
|
10 | * @param app Application API.↵ | | 10 | * @param app Application API.↵
|
11 | * @param sqlDriver <TT>ISQLDriver</TT> to be copied.↵ | | 11 | * @param sqlDriver <TT>ISQLDriver</TT> to be modified.↵
|
12 | *↵ | | 12 | *↵
|
13 | * @throws IllegalArgumentException↵ | | 13 | * @throws IllegalArgumentException↵
|
14 | * Thrown if a <TT>null</TT> ↵ | | 14 | * Thrown if a <TT>null</TT> <IApplication</tt> or↵
|
15 | <TT>ISQLDriver</TT> passed.↵ | | 15 | * <TT>ISQLDriver</TT> passed.↵
|
16 | */↵ | | 16 | */↵
|
17 | public CopyDriverCommand(IApplication app, ISQLDriver sqlDriver)↵ | | 17 | public ModifyDriverCommand(IApplication app, ISQLDriver driver)↵
|
18 | throws IllegalArgumentException↵ | | 18 | ↵
|
19 | {↵ | | 19 | {↵
|
20 | super();↵ | | 20 | super();↵
|
21 | if (app == null)↵ | | 21 | if (app == null)↵
|
22 | {↵ | | 22 | {↵
|
23 | throw new IllegalArgumentException("IApplication == null");↵ | | 23 | throw new IllegalArgumentException("IApplication == null");↵
|
24 | }↵ | | 24 | }↵
|
25 | if (sqlDriver == null)↵ | | 25 | if (driver == null)↵
|
26 | {↵ | | 26 | {↵
|
27 | throw new IllegalArgumentException("ISQLDriver == null");↵ | | 27 | throw new IllegalArgumentException("ISQLDriver == null");↵
|
28 | }↵ | | 28 | }↵
|
|
29 | _app = app;↵ | | 29 | _app = app;↵
|
30 | _sqlDriver = sqlDriver;↵ | | 30 | _driver = ↵
|
31 | }↵ | | |
|
| | | 31 | driver;↵
|
| | | 32 | }↵
|
|
| | | 33 | /**↵
|
| | | 34 | * Display a dialog allowing user to maintain the <TT>ISQLDriver</TT>.↵
|
| | | 35 | */↵
|
32 | public void execute()↵ | | 36 | public void execute()↵
|
33 | {↵ | | 37 | {↵
|
34 | _app.getWindowManager().showCopyDriverInternalFrame(_sqlDriver) | | 38 | _app.getWindowManager().showModifyDriverInternalFrame(_driver)
|