org.rubato.rubettes.score
Class MelodyRubette

java.lang.Object
  extended by org.rubato.base.AbstractRubette
      extended by org.rubato.base.SimpleAbstractRubette
          extended by org.rubato.rubettes.score.MelodyRubette
All Implemented Interfaces:
Rubette

public class MelodyRubette
extends SimpleAbstractRubette

A rubette for generating random melodies according to specified criteria. The output denotators are of the form Score.

Author:
Florian Thalmann

Constructor Summary
MelodyRubette()
          Creates a basic MelodyRubette.
 
Method Summary
 java.lang.String getGroup()
          Returns the group this Rubette belongs to.
 javax.swing.ImageIcon getIcon()
          Returns an icon for this Rubette.
 java.lang.String getLongDescription()
          Returns a long description.
 java.lang.String getName()
          Returns the name of the rubette.
 java.lang.String getOutTip(int i)
          Returns the tooltip for the output connector number i.
 javax.swing.JComponent getProperties()
          Returns the Swing component for the properties dialog.
 java.lang.String getShortDescription()
          Returns a short description.
 void init()
          Initializes Rubette.
 void run(RunInfo runInfo)
          Runs the Rubette.
 
Methods inherited from class org.rubato.base.SimpleAbstractRubette
applyProperties, duplicate, fromXML, getProperty, getRubetteProperties, hasProperties, putProperty, revertProperties, toXML
 
Methods inherited from class org.rubato.base.AbstractRubette
addError, addError, clearErrors, getErrors, getInCount, getInfo, getInput, getInTip, getModel, getOutCount, getOutput, getView, hasErrors, hasInfo, hasView, newInstance, setInCount, setModel, setOutCount, setOutput, updateView
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MelodyRubette

public MelodyRubette()
Creates a basic MelodyRubette.

Method Detail

init

public void init()
Description copied from class: AbstractRubette
Initializes Rubette. This method is called when a Rubette is instantiated as a prototype. It does nothing by default.

Specified by:
init in interface Rubette
Overrides:
init in class AbstractRubette

run

public void run(RunInfo runInfo)
Description copied from class: AbstractRubette
Runs the Rubette. This is the heart of the Rubette and implements the actual computation. Input values are retrieved with the getInput method and output values are stored using the setOutput method. The runInfo parameter object has a method stopped() which should be called regularly, and, in the case it returns false, the run() method should exit gracefully.

Specified by:
run in interface Rubette
Specified by:
run in class AbstractRubette
Parameters:
runInfo - contains information about the Runner that executes the network

getProperties

public javax.swing.JComponent getProperties()
Description copied from class: AbstractRubette
Returns the Swing component for the properties dialog. If this rubette has no properties dialog, simply return null.

Specified by:
getProperties in interface Rubette
Overrides:
getProperties in class SimpleAbstractRubette

getGroup

public java.lang.String getGroup()
Description copied from class: AbstractRubette
Returns the group this Rubette belongs to. The default group is "Other".

Specified by:
getGroup in interface Rubette
Overrides:
getGroup in class AbstractRubette

getName

public java.lang.String getName()
Description copied from class: AbstractRubette
Returns the name of the rubette.

Specified by:
getName in interface Rubette
Specified by:
getName in class AbstractRubette

getShortDescription

public java.lang.String getShortDescription()
Description copied from class: AbstractRubette
Returns a short description. The short description is shown as a tooltip over the JRubette. The default text is the name of the rubette.

Specified by:
getShortDescription in interface Rubette
Overrides:
getShortDescription in class AbstractRubette

getIcon

public javax.swing.ImageIcon getIcon()
Description copied from class: AbstractRubette
Returns an icon for this Rubette.

Specified by:
getIcon in interface Rubette
Overrides:
getIcon in class AbstractRubette

getLongDescription

public java.lang.String getLongDescription()
Description copied from class: AbstractRubette
Returns a long description. The long description is shown in the text area below the Rubette list, if this Rubette is selected in the list.

Specified by:
getLongDescription in interface Rubette
Overrides:
getLongDescription in class AbstractRubette

getOutTip

public java.lang.String getOutTip(int i)
Description copied from class: AbstractRubette
Returns the tooltip for the output connector number i.

Specified by:
getOutTip in interface Rubette
Overrides:
getOutTip in class AbstractRubette