com.softsynth.jmsl.util
Class SortMusicShapeEditorOperator

java.lang.Object
  extended by com.softsynth.jmsl.util.SortMusicShapeEditorOperator
All Implemented Interfaces:
Namable, MusicShapeEditorOperator

public class SortMusicShapeEditorOperator
extends java.lang.Object
implements MusicShapeEditorOperator

Sort in ascending order a selected range of a MusicShape. (follow by retrograde for descending order)

Author:
Nick Didkovsky, didkovn@mail.rockefeller.edu

Constructor Summary
SortMusicShapeEditorOperator()
           
 
Method Summary
 java.lang.String getName()
           
 void operate(MusicShapeEditor se, MusicShape s)
          sort selected range of MusicShape
 void setName(java.lang.String n)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SortMusicShapeEditorOperator

public SortMusicShapeEditorOperator()
Method Detail

operate

public void operate(MusicShapeEditor se,
                    MusicShape s)
sort selected range of MusicShape
           if (se.getRangeStartIndex() != -1 && se.getRangeEndIndex() != -1
                && Limits.within(se.getDimension(), 0, s.dimension() - 1)) {
            sort(se.getRangeStartIndex(), se.getRangeEndIndex(), se.getDimension());
        } 
 

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