|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.essex.ia.media.OperatorImpl
public class OperatorImpl
Provides a default implmentation of Operator and some variables/fucntions that are useful for operator
Most of the information is obtained from the XML descriptor this class is a castor mapping object
where the class OperatorDescriptor
mapss to an XML element of the same name. These classes are
autogenerated by castor sourceGen.
TODO: Make OperatorDescriptor an interface this removes the reliance on the autogenerated xml code??
Date: May 15, 2002
You should have received a copy of GNU public license with this code.
If not please visit this site
Field Summary | |
---|---|
protected java.net.URL |
iconURL
The url to the icon |
protected java.awt.image.renderable.ParameterBlock |
inputParameters
The input parameters for this operator |
protected java.lang.String |
label
The label of this operator |
protected OperatorDescriptor |
operatorDescriptor
This operators xml representation |
protected OperatorDialog |
operatorDialog
The dialog used to get the any input parameters this operator requires |
protected LanguageManager |
translator
The translator used to localized strings |
Constructor Summary | |
---|---|
OperatorImpl()
Deprecated. This is solely for when this object is serialized / unserialized |
|
OperatorImpl(OperatorDescriptor operatorDescriptor)
|
Method Summary | |
---|---|
boolean |
acceptsInputFrom(Operator o)
Check the operators that are allowed to output data to this operator |
java.lang.Object |
clone()
|
java.awt.image.RenderedImage |
execute(java.awt.image.renderable.ParameterBlock inData)
Execute this operator with the input data passed as a parameter |
int |
getAllowedInputs()
|
int |
getAllowedOutputs()
|
java.lang.String |
getHelpID()
Return a String that is the full path name to the help file for this operator. |
java.net.URL |
getIcon()
Get the URL to the icon for this operator |
java.awt.image.renderable.ParameterBlock |
getInputParameters()
|
java.awt.image.renderable.ParameterBlock |
getInputParametersForWriting()
Any operator that has special requirements for writing there parameters should override this method. |
OperatorDialog |
getOperatorDialog()
|
DataTypeConstant |
getOutputData()
Get the type of the data that is output from this operator. |
int |
getRequiredInputs()
|
protected java.awt.image.RenderedImage |
getSingleSource(java.awt.image.renderable.ParameterBlock parameters)
Checks the parameter block to see if it contains a single source RenderedImage . |
protected java.awt.image.RenderedImage |
initSingleImageParameterBlock(java.awt.image.renderable.ParameterBlock inData)
|
void |
readExternal(java.io.ObjectInput objectInput)
|
void |
setInputParameters(java.awt.image.renderable.ParameterBlock inputParameters)
TODO: Should there be a different method when params have been read?? |
void |
setOperatorDialog(OperatorDialog dialog)
|
void |
showOperatorDialog()
Show a GUI that allows users to modify the parameters for the underlying operation |
java.lang.String |
toString()
|
void |
writeExternal(java.io.ObjectOutput objectOutput)
|
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected OperatorDialog operatorDialog
protected transient OperatorDescriptor operatorDescriptor
protected java.awt.image.renderable.ParameterBlock inputParameters
protected transient LanguageManager translator
protected java.net.URL iconURL
protected java.lang.String label
Constructor Detail |
---|
public OperatorImpl()
OperatorImpl(OperatorDescriptor)
This is solely for when this object is serialized / unserialized
public OperatorImpl(OperatorDescriptor operatorDescriptor)
Method Detail |
---|
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
public void writeExternal(java.io.ObjectOutput objectOutput) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
objectOutput
-
java.io.IOException
public void readExternal(java.io.ObjectInput objectInput) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
objectInput
-
java.io.IOException
java.lang.ClassNotFoundException
public void showOperatorDialog()
showOperatorDialog
in interface Operator
public void setOperatorDialog(OperatorDialog dialog)
setOperatorDialog
in interface Operator
dialog
- - The OperatorDialog that handles getting this operators parameterspublic OperatorDialog getOperatorDialog()
getOperatorDialog
in interface Operator
public java.lang.String getHelpID()
getHelpID
in interface Operator
public int getAllowedInputs()
getAllowedInputs
in interface Operator
public int getAllowedOutputs()
getAllowedOutputs
in interface Operator
public int getRequiredInputs()
getRequiredInputs
in interface Operator
public boolean acceptsInputFrom(Operator o)
acceptsInputFrom
in interface Operator
o
- -The Operator to check
public DataTypeConstant getOutputData()
DataTypeConstant
getOutputData
in interface Operator
public java.awt.image.RenderedImage execute(java.awt.image.renderable.ParameterBlock inData) throws java.lang.Exception
execute
in interface Operator
inData
- - The input data to this operator
java.lang.Exception
public java.net.URL getIcon()
getIcon
in interface Operator
public java.awt.image.renderable.ParameterBlock getInputParameters()
getInputParameters
in interface Operator
public void setInputParameters(java.awt.image.renderable.ParameterBlock inputParameters)
Operator
setInputParameters
in interface Operator
public java.awt.image.renderable.ParameterBlock getInputParametersForWriting()
MatchCDFOperator
, the JAI operator underlying it takes a float[][]
howver it is inefficient to store all these values and it is better to store mathematical equations
that generate these arrays. By default this just returns the inputParameters
ParameterBlock of
the operator.
getInputParametersForWriting
in interface Operator
protected java.awt.image.RenderedImage initSingleImageParameterBlock(java.awt.image.renderable.ParameterBlock inData) throws java.lang.Exception
java.lang.Exception
protected java.awt.image.RenderedImage getSingleSource(java.awt.image.renderable.ParameterBlock parameters) throws java.lang.Exception
RenderedImage
.
If so this is returned otherwise it throws an exception
parameters
-
java.lang.Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |