]> ruin.nu Git - moosique.git/commitdiff
no message
authorEinar Pehrson <einarp@itstud.chalmers.se>
Wed, 7 May 2003 14:29:05 +0000 (14:29 +0000)
committerEinar Pehrson <einarp@itstud.chalmers.se>
Wed, 7 May 2003 14:29:05 +0000 (14:29 +0000)
MooNoteElement.java

index 969433fb928eec864372b0a68f23950f4b65d5ad..1225fe9833ad905f5c98a65136c86cd058357831 100644 (file)
@@ -12,6 +12,8 @@ import java.awt.event.*;
 public class MooNoteElement extends JPanel{
 
        private MooNote note;
+       private boolean selected;
+
        /** 
         * Creates a new note element.
         * @param mn The note that will be graphically represented
@@ -39,7 +41,22 @@ public class MooNoteElement extends JPanel{
                };
                MouseListener listener = new MouseList();
                addMouseListener(listener);
-                       
+       }
+
+       /** 
+        * Returns true if the current NoteElement is selected, otherwise false.
+        * @return if the element is selected
+        */
+       public boolean isSelected() {
+               return selected;
+       }
+
+       /** 
+        * Selects the current NoteElement.
+        * @param state if the element should be selected
+        */
+       public void setSelected(boolean state) {
+               selected = state;
        }
 
        /**
@@ -75,4 +92,4 @@ public class MooNoteElement extends JPanel{
 
        }
                        
-}
+}
\ No newline at end of file