com.frinika.sequencer.model
Class EditHistoryRecordableAction
java.lang.Object
com.frinika.sequencer.model.EditHistoryRecordableAction
- All Implemented Interfaces:
- EditHistoryAction
public class EditHistoryRecordableAction
- extends java.lang.Object
- implements EditHistoryAction
EditHistoryRecordableActions handles add/remove operations on editHistoryRecordables
It will automatically handle everything involving cloning, undo and redo etc.
- Author:
- Peter Johan Salomonsen
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
EDIT_HISTORY_TYPE_ADD
public static final int EDIT_HISTORY_TYPE_ADD
- See Also:
- Constant Field Values
EDIT_HISTORY_TYPE_REMOVE
public static final int EDIT_HISTORY_TYPE_REMOVE
- See Also:
- Constant Field Values
EditHistoryRecordableAction
public EditHistoryRecordableAction(EditHistoryContainer editHistoryContainer,
EditHistoryRecorder recorder,
int editHistoryType,
EditHistoryRecordable recordable)
- Parameters:
editHistoryContainer
- recorder
- editHistoryType
- recordable
- - Either a MultiEvent or MidiEvent
getEditHistoryType
public int getEditHistoryType()
- Returns:
- Returns the editHistoryType.
getRecordable
public EditHistoryRecordable getRecordable()
- Returns:
- Returns the event (Either a MultiEvent or a MidiEvent) affected by this entry
undo
public void undo()
- This method should be called by the EditHistory container
- Specified by:
undo
in interface EditHistoryAction
redo
public void redo()
- This method should be called by the EditHistory container
- Specified by:
redo
in interface EditHistoryAction
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
getInvertedClone
public EditHistoryRecordableAction getInvertedClone()
- Return a cloned EditHistoryEntry with the opposite editHistoryType. Used to notify listeners when undoing in order to indicate that
the previous action was reversed
- Returns: