com.e1.mxdublin.evlist.process
Class AbstractProcess

java.lang.Object
  extended by com.e1.mxdublin.evlist.process.AbstractProcess
Direct Known Subclasses:
Duration, Quantize, Stretch, Transpose, Velocity

public abstract class AbstractProcess
extends Object

Base class for any event list processes. The GUI will initialize the working list and filter.


Field Summary
 QueryItem filter
          The filter that has been applied to the list (can be null).
protected  int flags
           
static int MIDI
          Indicate that this process modifies midi (notes) data.
static int NONE
          Indicate that this process has no flags.
static int TIMING
          Indicate that this process modifies timestamps of events.
 EvList workingList
          The list to modify.
 
Constructor Summary
AbstractProcess()
           
 
Method Summary
abstract  void apply()
          Applies the logic to specified list.
protected  ProcessPanel factoryPanel()
          Returns a panel that can edit the current process.
 String getDescription()
          Returns the description of the process.
 int getFlags()
          Returns the flags of the current process.
 String getName()
          Returns the name of the process.
 ProcessPanel getPanel()
          Returns the associated panel (gui) for this process.
protected  List<EvAbstractItem> getSelection()
          Returns the current selection of the list based on the filter and list used.
 String getStringFlags()
          Returns the flags (in string format) of the current process.
 String toString()
           
 String validate()
          Validates process current settings.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

workingList

public EvList workingList
The list to modify.


filter

public QueryItem filter
The filter that has been applied to the list (can be null).


flags

protected int flags

NONE

public static final int NONE
Indicate that this process has no flags.

See Also:
Constant Field Values

MIDI

public static final int MIDI
Indicate that this process modifies midi (notes) data.

See Also:
Constant Field Values

TIMING

public static final int TIMING
Indicate that this process modifies timestamps of events.

See Also:
Constant Field Values
Constructor Detail

AbstractProcess

public AbstractProcess()
Method Detail

apply

public abstract void apply()
Applies the logic to specified list. The caller must have set any parameter and the workingList and filter attribute.


getSelection

protected List<EvAbstractItem> getSelection()
Returns the current selection of the list based on the filter and list used. This method can be used by sub-classes to get user selection.

Returns:
list of item that match user selection.

getName

public String getName()
Returns the name of the process.

Returns:

getFlags

public int getFlags()
Returns the flags of the current process.

Returns:
flags for this process (in integer switches)

getStringFlags

public String getStringFlags()
Returns the flags (in string format) of the current process.

Returns:
falgs for this process (in string format)

getPanel

public ProcessPanel getPanel()
Returns the associated panel (gui) for this process.

Returns:
the associated panel (gui) for this process.

factoryPanel

protected ProcessPanel factoryPanel()
Returns a panel that can edit the current process.

Returns:
a panel to edit the current process

getDescription

public String getDescription()
Returns the description of the process.

Returns:
the description of the process

toString

public String toString()
Overrides:
toString in class Object

validate

public String validate()
                throws DublinException
Validates process current settings. If everything is okay, it should return null. If there is a warning about the current selection, it should return a string about the warning. If the process cannot be executed, it must throw a DublinException.

Returns:
the validation of the current process
Throws:
DublinException