]> ruin.nu Git - moosique.git/blobdiff - MooTrackView.java
*** empty log message ***
[moosique.git] / MooTrackView.java
index 513792de17c09597de455aa3600e081bfd84cb07..8eba152152198159e9d33ab49d3cb4bc4a5d3f31 100644 (file)
@@ -106,16 +106,20 @@ public class MooTrackView extends JPanel {
                }
        }
 
+       /** 
+        * Returns the track of this view.
+        * @return the track of this view
+        */
        public Track getTrack() {
                return track;
        }
 
-
        /** 
-        * Updates the track view.
+        * Returns the title of this view.
+        * @return the title of this view
         */
-       public void update(long tickPosition) {
-               repaint();
+       public MooTrackTitle getTitle() {
+               return title;
        }
 
        private boolean isOccupied(Rectangle r) {
@@ -126,6 +130,10 @@ public class MooTrackView extends JPanel {
                return false;
        }
        
+       /** 
+        * Adds the given note to the current track, and visualises it.
+        * @param mn    the note to add
+        */
        public void addNote(MooNote mn) {
                mn.addTo(track);
                MooNoteElement elem = new MooNoteElement(this, mn);
@@ -135,8 +143,12 @@ public class MooTrackView extends JPanel {
                repaint();
        }
 
-       public void removeNote(MooNoteElement elem, MooNote mn) {
-               mn.removeFrom(track);
+       /** 
+        * Removes the given note element from the view and its note from the current track.
+        * @param elem  the note element to remove
+        */
+       public void removeNote(MooNoteElement elem) {
+               elem.getNote().removeFrom(track);
                remove(elem);
                elem.getNote().removeFrom(track);
                repaint();