public abstract class OldUnit extends Unit
CLONE_ALL_OUTPUT, CLONE_MULTIPLE_OUTPUT, COPY_OUTPUT, ESSENTIAL, ESSENTIAL_IF_CONNECTED, IMMEDIATE_UPDATE, INTERNAL, LATE_INITIALIZE, NO_UPDATE, ON_TASK_INSTANTATION, ON_USER_ACCESS, OPTIONAL, PROCESS_UPDATE, TRANSIENT, TRANSIENT_ACCESSIBLE, USER_ACCESSIBLE
Constructor and Description |
---|
OldUnit() |
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
Deprecated.
|
void |
addDescription(java.lang.String text)
Deprecated.
??
|
void |
addGUILine(java.lang.String line)
Deprecated.
|
void |
allowZeroInputNodes()
Deprecated.
|
void |
allowZeroOutputNodes()
Deprecated.
|
void |
cleanUp()
Deprecated.
|
void |
dispose()
This function is called when the unit is deleted.
|
void |
doubleClick()
Deprecated.
|
boolean |
getCanProcessDoubleArrays() |
java.lang.String |
getHelpFile()
Deprecated.
now set as a parameter in Tool
|
TrianaType |
getInputNode(int nodeNumber)
Deprecated.
|
int |
getInputNodes()
Deprecated.
|
java.lang.String[] |
getInputTypes()
This method should be overridden to return an array of the data input types accepted by this unit (returns
triana.types.TrianaType by default).
|
java.lang.String |
getName() |
static java.lang.String |
getName(java.lang.String nameAndNumber)
Deprecated.
|
static int |
getNumber(java.lang.String nameAndNumber)
Deprecated.
|
int |
getOutputNodes()
Deprecated.
|
java.lang.String[] |
getOutputTypes()
This method should be overridden to return an array of the data output types accepted by this unit (returns
triana.types.TrianaType by default).
|
java.lang.String |
getPopUpDescription()
This returns a brief! description of what the unit does.
|
boolean |
getRequireDoubleInputs() |
void |
init()
This function is called when the unit is first created.
|
int |
inputNodes()
Deprecated.
|
java.lang.String |
inputTypes()
Deprecated.
|
boolean |
isEssential(int index)
A convienience method that returns whether the data input node at the specified index is essential.
|
boolean |
isOptional(int index)
A convienience method that returns whether the data input node at the specified index is optional.
|
void |
outputAtNode(int outputNode,
TrianaType data)
Deprecated.
|
void |
outputAtNodeNonBlocking(int outputNode,
TrianaType data)
Deprecated.
|
int |
outputNodes()
Deprecated.
|
java.lang.String |
outputTypes()
Deprecated.
|
void |
parameterUpdate(java.lang.String paramname,
java.lang.Object value)
Called to update internal unit variables when the value of a parameter changes.
|
void |
print(java.lang.String text)
Prints the specific text to the debug window for the MainTriana which this unit is running within.
|
void |
println(java.lang.String text)
Prints the specific text to the debug window for the MainTriana which this unit is running within and adds a
carriage return to the end of the given string.
|
abstract void |
process()
************************************************************* *********** Programmers implement their code here
*********** *************************************************************
If a user wants to include an algorithm into Triana then this method must be implemented and the appropriate
algorithm invoked here.
|
void |
reset()
This function is called when the reset is pressed on the gui.
|
void |
saveParameter(java.lang.String name,
boolean param)
Deprecated.
|
void |
saveParameter(java.lang.String name,
byte param)
Deprecated.
|
void |
saveParameter(java.lang.String name,
double param)
Deprecated.
|
void |
saveParameter(java.lang.String name,
float param)
Deprecated.
|
void |
saveParameter(java.lang.String name,
int param)
Deprecated.
|
void |
saveParameter(java.lang.String name,
long param)
Deprecated.
|
void |
saveParameter(java.lang.String name,
java.lang.String param)
Deprecated.
|
void |
saveParameters()
Deprecated.
|
void |
setCanProcessDoubleArrays(boolean state)
Unit Programmers should set this to true if this unit can process input data sets in double precision format
|
void |
setEssential(int index)
A convienience method that sets the data input node at the specified index to essential.
|
void |
setGUIInformation()
Deprecated.
|
void |
setOptional(int index)
A convienience method that sets the data input node at the specified index to optional.
|
void |
setOutputType(java.lang.Class trianaType)
Deprecated.
|
void |
setOutputType(java.lang.String name)
Deprecated.
|
void |
setParameter(java.lang.String name,
java.lang.String value)
Deprecated.
|
void |
setRequireDoubleInputs(boolean state)
Unit Programmers should set this to true if this unit requires its inputs to be in double precision format
|
void |
setResizableInputs(boolean b)
Deprecated.
|
void |
setResizableOutputs(boolean b)
Deprecated.
|
void |
setText(java.lang.String information)
Sets the text in the main triana window to the following
|
void |
setUseGUIBuilder(boolean state)
Deprecated.
|
void |
starting()
Deprecated.
|
void |
stop()
Stops the network running
|
void |
stopping()
Deprecated.
|
static boolean |
strToBoolean(java.lang.String value)
Converts the given String to a boolean.
|
static boolean[] |
strToBooleans(java.lang.String value)
Converts the given String to an array of shortcut.
|
static byte |
strToByte(java.lang.String value)
Converts the given String to a byte.
|
static byte[] |
strToBytes(java.lang.String value)
Converts the given String to an array of byte.
|
static double |
strToDouble(java.lang.String value)
Converts the given String to a double.
|
static double[] |
strToDoubles(java.lang.String value)
Converts the given String to an array of double.
|
static float |
strToFloat(java.lang.String value)
Converts the given String to a float .
|
static float[] |
strToFloats(java.lang.String value)
Converts the given String to an array of floats.
|
static int |
strToInt(java.lang.String value)
Converts the given String to a int.
|
static int[] |
strToInts(java.lang.String value)
Converts the given String to an array of int.
|
static long |
strToLong(java.lang.String value)
Converts the given String to a Long.
|
static long[] |
strToLongs(java.lang.String value)
Converts the given String to an array of Long.
|
static short |
strToShort(java.lang.String value)
Converts the given String to a short.
|
static short[] |
strToShorts(java.lang.String value)
Converts the given String to an array of short.
|
static java.lang.String[] |
strToStrings(java.lang.String value)
Converts the given String to an array of String containing each string separately.
|
static java.lang.String |
toString(boolean param)
Converts an boolean into a String
|
static java.lang.String |
toString(byte param)
Converts an byte into a String
|
static java.lang.String |
toString(double param)
Converts an double into a String
|
static java.lang.String |
toString(float param)
Converts an float into a String
|
static java.lang.String |
toString(int param)
Converts an integer into a String
|
static java.lang.String |
toString(long param)
Converts an long into a String
|
static java.lang.String |
toString(short param)
Converts an short into a String
|
void |
updateGUIParameter(java.lang.String name,
java.lang.String value)
Deprecated.
|
void |
updateParameter(java.lang.String name,
boolean value)
Deprecated.
|
void |
updateParameter(java.lang.String name,
char value)
Deprecated.
|
void |
updateParameter(java.lang.String name,
double value)
Deprecated.
|
void |
updateParameter(java.lang.String name,
float value)
Deprecated.
|
void |
updateParameter(java.lang.String name,
int value)
Deprecated.
|
void |
updateParameter(java.lang.String name,
long value)
Deprecated.
|
void |
updateParameter(java.lang.String name,
short value)
Deprecated.
|
void |
updateParameter(java.lang.String name,
java.lang.String value)
Deprecated.
|
void |
updateWidgetFor(java.lang.String name)
Deprecated.
|
debug, debug, defineParameter, extractClipInState, getClipIn, getClipIn, getControlInterface, getDefaultInputNodes, getDefaultNodeRequirement, getDefaultOutputNodes, getDisplayName, getDisplayPackage, getGUIBuilderV2Info, getHelpFileLocation, getInputAtNode, getInputNodeCount, getMaximumInputNodes, getMaximumOutputNodes, getMinimumInputNodes, getMinimumOutputNodes, getNodeInputTypes, getNodeOutputTypes, getOutputNodeCount, getOutputPolicy, getPackageName, getParameter, getParameterPanelClass, getParameterPanelInstantiate, getParameterType, getParameterUpdatePolicy, getRunnableInterface, getTask, getTaskGraphContext, getToolName, getToolPackage, getToolTable, getVersion, hideParameterPanel, isClipInName, isInputAtNode, isOutputSent, isParameter, log, log, notifyError, notifyError, output, outputAtNode, outputAtNode, parameterUpdated, putClipIn, removeClipIn, removeParameter, restoreClipInState, setDefaultInputNodes, setDefaultNodeRequirement, setDefaultOutputNodes, setDisplayName, setDisplayPackage, setGUIBuilderV2Info, setHelpFileLocation, setMaximumInputNodes, setMaximumOutputNodes, setMinimumInputNodes, setMinimumOutputNodes, setOutputPolicy, setParameter, setParameterPanelClass, setParameterPanelInstantiate, setParameterUpdatePolicy, setPopUpDescription, setRunnableInterface, setToolName, setToolPackage, setVersion, showParameterPanel
public java.lang.String getName()
public void init()
public void reset()
public void dispose()
public abstract void process() throws java.lang.Exception
public boolean getRequireDoubleInputs()
public boolean getCanProcessDoubleArrays()
public void setRequireDoubleInputs(boolean state)
public void setCanProcessDoubleArrays(boolean state)
public final void stop()
public TrianaType getInputNode(int nodeNumber)
nodeNumber
- the node you want to get the data from.public void outputAtNode(int outputNode, TrianaType data)
outputNode
- the output node you wish to setdata
- the data to be sentpublic void outputAtNodeNonBlocking(int outputNode, TrianaType data)
outputNode
- the output node you wish to setdata
- the data to be sentboolean isOutputSent(int outputNode)
public void setOutputType(java.lang.Class trianaType)
public void setOutputType(java.lang.String name)
public java.lang.String[] getInputTypes()
getInputTypes
in class Unit
public java.lang.String[] getOutputTypes()
getOutputTypes
in class Unit
public void setOptional(int index)
public boolean isOptional(int index)
public void setEssential(int index)
public boolean isEssential(int index)
public void setText(java.lang.String information)
public void print(java.lang.String text)
public void println(java.lang.String text)
public java.lang.String getPopUpDescription()
getPopUpDescription
in class Unit
public java.lang.String getHelpFile()
If you don't wan't to provide help (!!!) the this function should return the String "none" or null.
public void parameterUpdate(java.lang.String paramname, java.lang.Object value)
parameterUpdate
in class Unit
public static final java.lang.String toString(int param)
public static final java.lang.String toString(long param)
public static final java.lang.String toString(float param)
public static final java.lang.String toString(short param)
public static final java.lang.String toString(double param)
public static final java.lang.String toString(byte param)
public static final java.lang.String toString(boolean param)
public static final float strToFloat(java.lang.String value)
public static final double strToDouble(java.lang.String value)
public static final int strToInt(java.lang.String value)
public static final short strToShort(java.lang.String value)
public static final long strToLong(java.lang.String value)
public static final byte strToByte(java.lang.String value)
public static final boolean strToBoolean(java.lang.String value)
public static final float[] strToFloats(java.lang.String value)
public static final double[] strToDoubles(java.lang.String value)
public static final int[] strToInts(java.lang.String value)
public static final short[] strToShorts(java.lang.String value)
public static final long[] strToLongs(java.lang.String value)
public static final byte[] strToBytes(java.lang.String value)
public static final boolean[] strToBooleans(java.lang.String value)
public static final java.lang.String[] strToStrings(java.lang.String value)
public void saveParameters()
public void setParameter(java.lang.String name, java.lang.String value)
public void updateWidgetFor(java.lang.String name)
public java.lang.String inputTypes()
public java.lang.String outputTypes()
public void addDescription(java.lang.String text)
public int inputNodes()
public int outputNodes()
public int getInputNodes()
public int getOutputNodes()
public void setResizableInputs(boolean b)
public void setResizableOutputs(boolean b)
public void stopping()
Unit
public void starting()
public void setUseGUIBuilder(boolean state)
public void setGUIInformation()
public void addGUILine(java.lang.String line)
public void doubleClick()
public void cleanUp()
public void allowZeroInputNodes()
public void allowZeroOutputNodes()
public void saveParameter(java.lang.String name, int param)
public void saveParameter(java.lang.String name, java.lang.String param)
public void saveParameter(java.lang.String name, long param)
public void saveParameter(java.lang.String name, float param)
public void saveParameter(java.lang.String name, double param)
public void saveParameter(java.lang.String name, byte param)
public void saveParameter(java.lang.String name, boolean param)
public void updateParameter(java.lang.String name, java.lang.String value)
public void updateGUIParameter(java.lang.String name, java.lang.String value)
public void updateParameter(java.lang.String name, int value)
public void updateParameter(java.lang.String name, long value)
public void updateParameter(java.lang.String name, short value)
public void updateParameter(java.lang.String name, boolean value)
public void updateParameter(java.lang.String name, float value)
public void updateParameter(java.lang.String name, double value)
public void updateParameter(java.lang.String name, char value)
public void actionPerformed(java.awt.event.ActionEvent e)
public static final java.lang.String getName(java.lang.String nameAndNumber)
nameAndNumber
- the name and the number in one string e.g. node1public static final int getNumber(java.lang.String nameAndNumber)
nameAndNumber
- the name and the number in one string e.g. node1