1 | public class RedoAction extends SquirrelAction
↵ | | 1 | public class ReturnResultTabAction extends SquirrelAction↵
|
2 | {↵ | | 2 | {↵
|
3 | private UndoManager _undo;↵ | | |
|
|
4 | public RedoAction(IApplication app, UndoManager undo)
↵ | | |
|
| | | 3 | /** Frame to be returned. */↵
|
| | | 4 | private ResultFrame _resultFrame;↵
|
|
| | | 5 | /**↵
|
| | | 6 | * Ctor.↵
|
| | | 7 | *↵
|
| | | 8 | * @param app Application API.↵
|
| | | 9 | * @param resultFrame Results frame to be returned.↵
|
| | | 10 | */↵
|
| | | 11 | public ReturnResultTabAction(IApplication app, ResultFrame resultFrame)↵
|
| | | 12 | throws IllegalArgumentException↵
|
5 | {
↵ | | 13 | {↵
|
6 | super(app);
↵ | | 14 | super(app);↵
|
7 | if(undo == null) ↵ | | 15 | if (resultFrame == null)↵
|
| | | 16 | {↵
|
8 | throw new IllegalArgumentException("UndoManager == null");
↵ | | 17 | throw new IllegalArgumentException("Null ResultFrame passed");↵
|
9 | _undo = undo;↵ | | 18 | ↵
|
10 | }↵ | | |
|
11 | /*↵ | | |
|
12 | * @see ActionListener#actionPerformed(ActionEvent)↵ | | |
|
13 | */
↵ | | 19 | }↵
|
|
| | | 20 | _resultFrame = resultFrame;↵
|
| | | 21 | }↵
|
|
14 | public void actionPerformed(ActionEvent e)
↵ | | 22 | public void actionPerformed(ActionEvent evt)↵
|
15 | {
↵ | | 23 | {↵
|
16 | if(_undo.canRedo()) _undo.redo() | | 24 | new ReturnResultTabCommand(_resultFrame).execute()
|