com.softsynth.jmsl.util
Class RemoveMusicShapeEditorOperator
java.lang.Object
com.softsynth.jmsl.util.RemoveMusicShapeEditorOperator
- All Implemented Interfaces:
- Namable, MusicShapeEditorOperator
public class RemoveMusicShapeEditorOperator
- extends java.lang.Object
- implements MusicShapeEditorOperator
Remove selected range from a MusicShape in MusicShapeEditor
- Author:
- Nick Didkovsky, didkovn@mail.rockefeller.edu
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RemoveMusicShapeEditorOperator
public RemoveMusicShapeEditorOperator()
operate
public void operate(MusicShapeEditor se,
MusicShape s)
- Remove selected range of elements from musicshape.
if (se.getRangeStartIndex() != -1 && se.getRangeEndIndex() != -1
&& Limits.within(se.getDimension(), 0, s.dimension() - 1)) {
s.remove(se.getRangeStartIndex(), se.getRangeEndIndex());
se.update(); // force update because num elements changed
}
- Specified by:
operate
in interface MusicShapeEditorOperator
getName
public java.lang.String getName()
- Specified by:
getName
in interface Namable
setName
public void setName(java.lang.String n)
- Specified by:
setName
in interface Namable