Package com.softsynth.jmsl
Class NullMusicDevice
java.lang.Object
com.softsynth.jmsl.NullMusicDevice
- All Implemented Interfaces:
Editable
,MusicDevice
public class NullMusicDevice extends java.lang.Object implements MusicDevice
A do-nothing MusicDevice
- Author:
- Nick Didkovsky, email: nick@didkovsky.com, (c) 2003 Nick Didkovsky, all rights reserved.
-
Method Summary
Modifier and Type Method Description void
addEditListener(EditListener listener)
boolean
close()
void
edit(java.awt.Frame f)
Bring up a Dialog for editing, for exampleboolean
getEditEnabled()
static NullMusicDevice
instance()
boolean
open()
void
removeEditListener(EditListener listener)
void
setEditEnabled(boolean flag)
Set a flag.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Method Details
-
instance
- Returns:
- singleton instance of this class
-
open
public boolean open()- Specified by:
open
in interfaceMusicDevice
-
close
public boolean close()- Specified by:
close
in interfaceMusicDevice
-
edit
public void edit(java.awt.Frame f)Description copied from interface:Editable
Bring up a Dialog for editing, for example -
addEditListener
- Specified by:
addEditListener
in interfaceEditable
-
removeEditListener
- Specified by:
removeEditListener
in interfaceEditable
-
setEditEnabled
public void setEditEnabled(boolean flag)Description copied from interface:Editable
Set a flag. For example you might setEditEnabled(false) after first edit(), or you might hard code values for some Editable class and so want to disable editing.- Specified by:
setEditEnabled
in interfaceEditable
-
getEditEnabled
public boolean getEditEnabled()- Specified by:
getEditEnabled
in interfaceEditable
- Returns:
- flag
-