org.rubato.base
Class SimpleAbstractRubette

java.lang.Object
  extended by org.rubato.base.AbstractRubette
      extended by org.rubato.base.SimpleAbstractRubette
All Implemented Interfaces:
Rubette
Direct Known Subclasses:
ImageDisplayRubette, ImageFileInRubette, ImageFileOutRubette, LilyPondOutRubette, MelodyRubette, MorphingRubette, QuantizeRubette, RhythmizeRubette, TexturalizeRubette

public abstract class SimpleAbstractRubette
extends AbstractRubette


Constructor Summary
SimpleAbstractRubette()
           
 
Method Summary
 boolean applyProperties()
          Makes changes in the properties dialog permanent.
 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.
 javax.swing.JComponent getProperties()
          Returns the Swing component for the properties dialog.
 RubetteProperty getProperty(java.lang.String key)
          Returns the property of the given key.
 RubetteProperties getRubetteProperties()
          Returns the rubette properties of this rubette.
 boolean hasProperties()
          Returns true iff this rubette has a properties dialog.
 void putProperty(RubetteProperty prop)
          Sets a new property.
 void revertProperties()
          Reverts values in the properties dialog to the values in the Rubette.
 void toXML(XMLWriter writer)
          Writes an XML description of this rubette.
 
Methods inherited from class org.rubato.base.AbstractRubette
addError, addError, clearErrors, getErrors, getGroup, getIcon, getInCount, getInfo, getInput, getInTip, getLongDescription, getModel, getName, getOutCount, getOutput, getOutTip, getShortDescription, getView, hasErrors, hasInfo, hasView, init, newInstance, run, setInCount, setModel, setOutCount, setOutput, updateView
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleAbstractRubette

public SimpleAbstractRubette()
Method Detail

getRubetteProperties

public final RubetteProperties getRubetteProperties()
Returns the rubette properties of this rubette.


putProperty

public void putProperty(RubetteProperty prop)
Sets a new property.


getProperty

public RubetteProperty getProperty(java.lang.String key)
Returns the property of the given key. Returns null, iff no property with this key exists.


hasProperties

public boolean hasProperties()
Description copied from class: AbstractRubette
Returns true iff this rubette has a properties dialog. Properties reflect the configuration of this Rubette, any changes in the properties dialog may affect the computation.

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

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 AbstractRubette

applyProperties

public boolean applyProperties()
Description copied from class: AbstractRubette
Makes changes in the properties dialog permanent.

Specified by:
applyProperties in interface Rubette
Overrides:
applyProperties in class AbstractRubette
Returns:
true iff the values in the properties dialog are correct

revertProperties

public void revertProperties()
Description copied from class: AbstractRubette
Reverts values in the properties dialog to the values in the Rubette.

Specified by:
revertProperties in interface Rubette
Overrides:
revertProperties 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

fromXML

public final 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

toXML

public final 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