javapoint.undo
Class UndoableSlideAfterAdd
java.lang.Object
javax.swing.undo.AbstractUndoableEdit
javapoint.undo.UndoableSlideAfterAdd
- All Implemented Interfaces:
- java.io.Serializable, javax.swing.undo.UndoableEdit
public class UndoableSlideAfterAdd
- extends javax.swing.undo.AbstractUndoableEdit
This class defines undo/redo command for the slide object which was created by NEW-operation.
The object of this class will be put into undo/redo stack after performing NEW operation on slide.
- See Also:
- Serialized Form
| Fields inherited from class javax.swing.undo.AbstractUndoableEdit |
RedoName, UndoName |
|
Method Summary |
boolean |
canRedo()
|
boolean |
canUndo()
|
java.lang.String |
getPresentationName()
|
void |
redo()
Performs redo opeation
Opposite to undo operation => adds the removed slide. |
void |
undo()
Performs undo opeation
Since it is done just after the slade was added, undo-operation just removes it. |
| Methods inherited from class javax.swing.undo.AbstractUndoableEdit |
addEdit, die, getRedoPresentationName, getUndoPresentationName, isSignificant, replaceEdit, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
UndoableSlideAfterAdd
public UndoableSlideAfterAdd(MainFrame mainFrame,
Slide element,
int index)
- Parameters:
mainFrame - represents main frame windowelement - represents slide which was just created during NEW operationindex - represents index of slide object in main frame window
undo
public void undo()
throws javax.swing.undo.CannotUndoException
- Performs undo opeation
Since it is done just after the slade was added, undo-operation just removes it.
- Specified by:
undo in interface javax.swing.undo.UndoableEdit- Overrides:
undo in class javax.swing.undo.AbstractUndoableEdit
- Throws:
javax.swing.undo.CannotUndoException
redo
public void redo()
throws javax.swing.undo.CannotRedoException
- Performs redo opeation
Opposite to undo operation => adds the removed slide.
- Specified by:
redo in interface javax.swing.undo.UndoableEdit- Overrides:
redo in class javax.swing.undo.AbstractUndoableEdit
- Throws:
javax.swing.undo.CannotRedoException
canUndo
public boolean canUndo()
- Specified by:
canUndo in interface javax.swing.undo.UndoableEdit- Overrides:
canUndo in class javax.swing.undo.AbstractUndoableEdit
canRedo
public boolean canRedo()
- Specified by:
canRedo in interface javax.swing.undo.UndoableEdit- Overrides:
canRedo in class javax.swing.undo.AbstractUndoableEdit
getPresentationName
public java.lang.String getPresentationName()
- Specified by:
getPresentationName in interface javax.swing.undo.UndoableEdit- Overrides:
getPresentationName in class javax.swing.undo.AbstractUndoableEdit