- /**
- * Selects the given note
- * @param the note to select
- */
- public void selectNote(MooNoteElement elem) {
- selection.add(elem);
- }
-
- /**
- * Deselects the given note
- * @param the note to deselect
- */
- public void deselectNote(MooNoteElement elem) {
- selection.remove(elem);
- }
-
- /**
- * Deselects all notes.
- */
- public void deselectAllNotes() {
- Iterator it = selection.iterator();
- while(it.hasNext()) {
- ((MooNoteElement)it.next()).deselect();
- }
- selection.clear();
- }
-
- /**
- * Determines if the given MooNoteElement is the only one in the track view that is selected.
- * @return if the given element is the only selected one
- */
- public boolean isTheOnlySelected(MooNoteElement elem) {
- Iterator it = selection.iterator();
- while(it.hasNext()) {
- if (!it.next().equals(elem)) return false;
- }
- return true;
- }
-