|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object at.ofai.music.beatroot.EditAction
public class EditAction
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 | |
---|---|
private static EditAction |
current
The EditAction which would be undone by clicking on "Undo". |
static boolean |
debug
A flag indicating whether debugging information should be printed. |
private static BeatTrackDisplay |
display
The main panel of BeatRoot's GUI, which is called to perform undo/redo |
double |
from
The original position of a beat, before editing took place. |
private static EditAction |
HEAD
The head of the list of edit actions, marked by a dummy EditAction object |
EditAction |
next
The next edit action in order of occurrence |
EditAction |
prev
The previous edit action in order of occurrence |
double |
to
The new position of a beat, after editing took place. |
Constructor Summary | |
---|---|
private |
EditAction(double f,
double t,
EditAction n,
EditAction p)
Constructor: |
Method Summary | |
---|---|
static void |
add(double from,
double to)
Add a new EditAction to the list |
static void |
clear()
Clear the list of EditActions |
private void |
print()
Prints a single EditAction (for debugging) |
private static void |
printAll()
Prints the queue of EditActions (for debugging) |
static void |
redo()
Redo the last EditAction which was just undone |
static void |
setDisplay(BeatTrackDisplay btd)
Set up a hook to the GUI's data panel for performing undo/redo |
static void |
undo()
Undo the last EditAction |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public double from
public double to
public EditAction next
public EditAction prev
private static final EditAction HEAD
private static EditAction current
private static BeatTrackDisplay display
public static boolean debug
Constructor Detail |
---|
private EditAction(double f, double t, EditAction n, EditAction p)
f
- The original beat timet
- The new beat timen
- The next EditActionp
- The previous EditActionMethod Detail |
---|
private static void printAll()
private void print()
public static void setDisplay(BeatTrackDisplay btd)
public static void add(double from, double to)
public static void clear()
public static void undo()
public static void redo()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |