}
}
+ /**
+ * 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) {
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);
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();