From 74c2bdb1ef88c7fee1e1288ef63f639ec3a8821c Mon Sep 17 00:00:00 2001 From: Einar Pehrson Date: Wed, 7 May 2003 14:29:05 +0000 Subject: [PATCH] no message --- MooNoteElement.java | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) 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 -- 2.39.2