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 voidaddEditListener(EditListener listener)booleanclose()voidedit(java.awt.Frame f)Bring up a Dialog for editing, for examplebooleangetEditEnabled()static NullMusicDeviceinstance()booleanopen()voidremoveEditListener(EditListener listener)voidsetEditEnabled(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:
openin interfaceMusicDevice
-
close
public boolean close()- Specified by:
closein interfaceMusicDevice
-
edit
public void edit(java.awt.Frame f)Description copied from interface:EditableBring up a Dialog for editing, for example -
addEditListener
- Specified by:
addEditListenerin interfaceEditable
-
removeEditListener
- Specified by:
removeEditListenerin interfaceEditable
-
setEditEnabled
public void setEditEnabled(boolean flag)Description copied from interface:EditableSet 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:
setEditEnabledin interfaceEditable
-
getEditEnabled
public boolean getEditEnabled()- Specified by:
getEditEnabledin interfaceEditable- Returns:
- flag
-