org.rubato.rubettes.score
Class ScorePlayRubette

java.lang.Object
  extended by org.rubato.base.AbstractRubette
      extended by org.rubato.rubettes.score.ScorePlayRubette
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener, javax.swing.event.ChangeListener, Rubette

public final class ScorePlayRubette
extends AbstractRubette
implements java.awt.event.ActionListener, javax.swing.event.ChangeListener


Constructor Summary
ScorePlayRubette()
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent event)
           
 Rubette duplicate()
          Creates a duplicate from this rubette instance.
 Rubette fromXML(XMLReader reader, org.w3c.dom.Element element)
          Creates a rubette from an XML description starting with element.
 java.lang.String getGroup()
          Returns the group this Rubette belongs to.
 javax.swing.ImageIcon getIcon()
          Returns an icon for this Rubette.
 java.lang.String getInTip(int i)
          Returns the tooltip for the input connector number i.
 java.lang.String getLongDescription()
          Returns a long description.
 java.lang.String getName()
          Returns the name of the rubette.
 java.lang.String getShortDescription()
          Returns a short description.
 javax.swing.JComponent getView()
          Returns the Swing component for the view.
 boolean hasView()
          Returns true iff this Rubette has a view.
 void run(RunInfo runInfo)
          Runs the Rubette.
 void stateChanged(javax.swing.event.ChangeEvent e)
           
 void toXML(XMLWriter writer)
          Writes an XML description of this rubette.
 
Methods inherited from class org.rubato.base.AbstractRubette
addError, addError, applyProperties, clearErrors, getErrors, getInCount, getInfo, getInput, getModel, getOutCount, getOutput, getOutTip, getProperties, hasErrors, hasInfo, hasProperties, init, newInstance, revertProperties, setInCount, setModel, setOutCount, setOutput, updateView
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScorePlayRubette

public ScorePlayRubette()
Method Detail

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

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

duplicate

public Rubette duplicate()
Description copied from class: AbstractRubette
Creates a duplicate from this rubette instance. All properties are copied if possible. This must be correctly implemented in order that many functions work as expected.

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

hasView

public boolean hasView()
Description copied from class: AbstractRubette
Returns true iff this Rubette has a view. A view should provide a visual (or aural) representation of the configuration (resp. values) of the Rubette, but must never affect the computation.

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

getView

public javax.swing.JComponent getView()
Description copied from class: AbstractRubette
Returns the Swing component for the view. If this Rubette has no view, this simply returns null.

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

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent event)
Specified by:
actionPerformed in interface java.awt.event.ActionListener

stateChanged

public void stateChanged(javax.swing.event.ChangeEvent e)
Specified by:
stateChanged in interface javax.swing.event.ChangeListener

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

getInTip

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

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

toXML

public void toXML(XMLWriter writer)
Description copied from class: AbstractRubette
Writes an XML description of this rubette. This method should write XML for the configuration of this Rubette.

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

fromXML

public Rubette fromXML(XMLReader reader,
                       org.w3c.dom.Element element)
Description copied from class: AbstractRubette
Creates a rubette from an XML description starting with element.

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