Package at.ofai.music.beatroot
Class EditAction
- java.lang.Object
-
- at.ofai.music.beatroot.EditAction
-
public class EditAction extends java.lang.Object
Implements undo and redo for most beat editing actions. EditActions make up a doubly linked list containing the sequence of changes made to the beat list in their order of occurrence.
-
-
Field Summary
Fields Modifier and Type Field and Description static boolean
debug
A flag indicating whether debugging information should be printed.double
from
The original position of a beat, before editing took place.EditAction
next
The next edit action in order of occurrenceEditAction
prev
The previous edit action in order of occurrencedouble
to
The new position of a beat, after editing took place.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static void
add(double from, double to)
Add a new EditAction to the liststatic void
clear()
Clear the list of EditActionsstatic void
redo()
Redo the last EditAction which was just undonestatic void
setDisplay(BeatTrackDisplay btd)
Set up a hook to the GUI's data panel for performing undo/redostatic void
undo()
Undo the last EditAction
-
-
-
Field Detail
-
debug
public static boolean debug
A flag indicating whether debugging information should be printed.
-
from
public double from
The original position of a beat, before editing took place. A negative value indicates the addition of a new beat.
-
next
public EditAction next
The next edit action in order of occurrence
-
prev
public EditAction prev
The previous edit action in order of occurrence
-
to
public double to
The new position of a beat, after editing took place. A negative value indicates the deletion of a beat.
-
-
Method Detail
-
setDisplay
public static void setDisplay(BeatTrackDisplay btd)
Set up a hook to the GUI's data panel for performing undo/redo
-
add
public static void add(double from, double to)
Add a new EditAction to the list
-
clear
public static void clear()
Clear the list of EditActions
-
undo
public static void undo()
Undo the last EditAction
-
redo
public static void redo()
Redo the last EditAction which was just undone
-
-