| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| IUndoRedoManager |
|
| 1.0;1 |
| 1 | package org.jtheque.core.managers.undo; | |
| 2 | ||
| 3 | /* | |
| 4 | * This file is part of JTheque. | |
| 5 | * | |
| 6 | * JTheque is free software: you can redistribute it and/or modify | |
| 7 | * it under the terms of the GNU General Public License as published by | |
| 8 | * the Free Software Foundation, either version 3 of the License. | |
| 9 | * | |
| 10 | * JTheque is distributed in the hope that it will be useful, | |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 13 | * GNU General Public License for more details. | |
| 14 | * | |
| 15 | * You should have received a copy of the GNU General Public License | |
| 16 | * along with JTheque. If not, see <http://www.gnu.org/licenses/>. | |
| 17 | */ | |
| 18 | ||
| 19 | import org.jtheque.core.managers.ActivableManager; | |
| 20 | ||
| 21 | import javax.swing.Action; | |
| 22 | import javax.swing.undo.UndoableEdit; | |
| 23 | ||
| 24 | /** | |
| 25 | * An undo-redo manager specification. | |
| 26 | * | |
| 27 | * @author Baptiste Wicht | |
| 28 | */ | |
| 29 | public interface IUndoRedoManager extends ActivableManager { | |
| 30 | /** | |
| 31 | * Undo the last action. | |
| 32 | */ | |
| 33 | void undo(); | |
| 34 | ||
| 35 | /** | |
| 36 | * Redo the last action that has been undo. | |
| 37 | */ | |
| 38 | void redo(); | |
| 39 | ||
| 40 | /** | |
| 41 | * Add an <code>UndoableEdit</code>. | |
| 42 | * | |
| 43 | * @param edit The edit to add. | |
| 44 | * @return true if the action has been added else false. | |
| 45 | */ | |
| 46 | boolean addEdit(UndoableEdit edit); | |
| 47 | ||
| 48 | /** | |
| 49 | * Set the undo action. | |
| 50 | * | |
| 51 | * @param undoAction The undo action. | |
| 52 | */ | |
| 53 | void setUndoAction(Action undoAction); | |
| 54 | ||
| 55 | /** | |
| 56 | * Set the redo action. | |
| 57 | * | |
| 58 | * @param redoAction The redo action. | |
| 59 | */ | |
| 60 | void setRedoAction(Action redoAction); | |
| 61 | } |