|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.rubato.base.AbstractRubette
public abstract class AbstractRubette
Abstract base class for Rubettes. Any implementation of a Rubette must derive from this class. The methods are divided into four class:
Constructor Summary | |
---|---|
AbstractRubette()
The default constructor must/should perform initializations specfic to each rubette instance, for example set the number of inputs and outputs, or initializing the rubette state. |
Method Summary | |
---|---|
void |
addError(java.lang.Exception e)
Adds an exception message to the current error state. |
void |
addError(java.lang.String msg,
java.lang.Object... objects)
Adds an error string to the current error state. |
boolean |
applyProperties()
Makes changes in the properties dialog permanent. |
void |
clearErrors()
Removes all errors from the error list. |
abstract Rubette |
duplicate()
Creates a duplicate from this rubette instance. |
abstract Rubette |
fromXML(XMLReader reader,
org.w3c.dom.Element element)
Creates a rubette from an XML description starting with element . |
java.util.List<java.lang.String> |
getErrors()
Returns a list of the current errors. |
java.lang.String |
getGroup()
Returns the group this Rubette belongs to. |
javax.swing.ImageIcon |
getIcon()
Returns an icon for this Rubette. |
int |
getInCount()
Returns the current number of input connectors. |
java.lang.String |
getInfo()
Returns the info string for the info label. |
Denotator |
getInput(int i)
Returns the input denotator at input connector number i . |
java.lang.String |
getInTip(int i)
Returns the tooltip for the input connector number i . |
java.lang.String |
getLongDescription()
Returns a long description. |
RubetteModel |
getModel()
Returns the RubetteModel, that this Rubette is attached to. |
abstract java.lang.String |
getName()
Returns the name of the rubette. |
int |
getOutCount()
Returns the current number of output connectors. |
Denotator |
getOutput(int i)
Returns the output denotator of connectir number i . |
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. |
javax.swing.JComponent |
getView()
Returns the Swing component for the view. |
boolean |
hasErrors()
Returns true iff any error has occurred. |
boolean |
hasInfo()
Returns true iff this Rubette has an info label. |
boolean |
hasProperties()
Returns true iff this rubette has a properties dialog. |
boolean |
hasView()
Returns true iff this Rubette has a view. |
void |
init()
Initializes Rubette. |
Rubette |
newInstance()
Creates a new instance from a protoype. |
void |
revertProperties()
Reverts values in the properties dialog to the values in the Rubette. |
abstract void |
run(RunInfo runInfo)
Runs the Rubette. |
void |
setInCount(int n)
Sets the number of input connectors. |
void |
setModel(RubetteModel model)
Sets the model this Rubette is attached to. |
void |
setOutCount(int n)
Sets the number of output connectors. |
void |
setOutput(int i,
Denotator d)
Stores the output denotator d for output connector number i . |
abstract void |
toXML(XMLWriter writer)
Writes an XML description of this rubette. |
void |
updateView()
Updates the view reflecting the changes of the values in the Rubette. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractRubette()
Method Detail |
---|
public abstract void run(RunInfo runInfo)
run
in interface Rubette
runInfo
- contains information about the Runner that executes
the networkpublic abstract java.lang.String getName()
getName
in interface Rubette
public abstract Rubette fromXML(XMLReader reader, org.w3c.dom.Element element)
element
.
fromXML
in interface Rubette
public abstract void toXML(XMLWriter writer)
toXML
in interface Rubette
public void init()
init
in interface Rubette
public abstract Rubette duplicate()
duplicate
in interface Rubette
public java.lang.String getGroup()
getGroup
in interface Rubette
public javax.swing.ImageIcon getIcon()
getIcon
in interface Rubette
public boolean hasProperties()
hasProperties
in interface Rubette
public javax.swing.JComponent getProperties()
getProperties
in interface Rubette
public boolean applyProperties()
applyProperties
in interface Rubette
public void revertProperties()
revertProperties
in interface Rubette
public boolean hasView()
hasView
in interface Rubette
public javax.swing.JComponent getView()
getView
in interface Rubette
public void updateView()
updateView
in interface Rubette
public boolean hasInfo()
hasInfo
in interface Rubette
public java.lang.String getInfo()
getInfo
in interface Rubette
public java.lang.String getShortDescription()
getShortDescription
in interface Rubette
public java.lang.String getLongDescription()
getLongDescription
in interface Rubette
public java.lang.String getInTip(int i)
i
.
getInTip
in interface Rubette
public java.lang.String getOutTip(int i)
i
.
getOutTip
in interface Rubette
public Rubette newInstance()
newInstance
in interface Rubette
public final void setInCount(int n)
setInCount
in interface Rubette
public final int getInCount()
getInCount
in interface Rubette
public final Denotator getInput(int i)
i
.
This is usually called at the beginning of the run() method
to get the input values. The run() method must check the
return value which may be null.
getInput
in interface Rubette
public final void setOutCount(int n)
setOutCount
in interface Rubette
public final int getOutCount()
getOutCount
in interface Rubette
public final void setOutput(int i, Denotator d)
d
for output connector number i
.
This is usually called at the end of the run() method to store
the result of the computation.
setOutput
in interface Rubette
public final Denotator getOutput(int i)
i
.
This is usually called by the Runner.
getOutput
in interface Rubette
public final RubetteModel getModel()
getModel
in interface Rubette
public final void addError(java.lang.String msg, java.lang.Object... objects)
addError
in interface Rubette
public final void addError(java.lang.Exception e)
public final java.util.List<java.lang.String> getErrors()
getErrors
in interface Rubette
public final void clearErrors()
clearErrors
in interface Rubette
public final boolean hasErrors()
hasErrors
in interface Rubette
public final void setModel(RubetteModel model)
setModel
in interface Rubette
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |