From: Einar Pehrson Date: Wed, 7 May 2003 14:29:05 +0000 (+0000) Subject: no message X-Git-Url: https://ruin.nu/git/?p=moosique.git;a=commitdiff_plain;h=74c2bdb1ef88c7fee1e1288ef63f639ec3a8821c no message --- diff --git a/MooNoteElement.java b/MooNoteElement.java index 969433f..1225fe9 100644 --- a/MooNoteElement.java +++ b/MooNoteElement.java @@ -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