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 occurrence
      EditAction prev
      The previous edit action in order of occurrence
      double 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 list
      static void clear()
      Clear the list of EditActions
      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

      • 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