edu.jhu.ece.iacl.jist.pipeline.parameter
Class ParamColor

java.lang.Object
  extended by edu.jhu.ece.iacl.jist.pipeline.PipePort<T>
      extended by edu.jhu.ece.iacl.jist.pipeline.parameter.ParamModel<java.awt.Color>
          extended by edu.jhu.ece.iacl.jist.pipeline.parameter.ParamColor
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Comparable<ParamModel>

public class ParamColor
extends ParamModel<java.awt.Color>

The Class ParamColor.


Nested Class Summary
 
Nested classes/interfaces inherited from class edu.jhu.ece.iacl.jist.pipeline.PipePort
PipePort.PortListener, PipePort.type
 
Field Summary
protected  java.awt.Color color
          The color.
 
Fields inherited from class edu.jhu.ece.iacl.jist.pipeline.parameter.ParamModel
cliTag, description, factory, hidden, label, loadAndSaveOnValidate, mandatory, shortLabel
 
Fields inherited from class edu.jhu.ece.iacl.jist.pipeline.PipePort
connectible, gport, incomingConnectors, listeners, maxIncoming, maxOutgoing, outgoingConnectors, owner, portType, useWire
 
Constructor Summary
ParamColor()
          Default constructor.
ParamColor(java.awt.Color p)
          Instantiates a new param color.
ParamColor(java.lang.String name)
          Constructor.
ParamColor(java.lang.String name, java.awt.Color p)
          Instantiates a new parameter color.
 
Method Summary
 ParamColor clone()
          Clone parameter.
 int compareTo(ParamModel model)
          Compare to.
 java.lang.String getHumanReadableDataType()
           
 java.awt.Color getValue()
          Get the value stored in the parameter.
 java.lang.String getXMLValue()
           
 void init()
          Initialize parameter.
 boolean isCompatible(PipePort model)
          Checks if is compatible.
 java.lang.String probeDefaultValue()
           
 void setValue(java.awt.Color value)
          Set color value.
 void setXMLValue(java.lang.String arg)
           
 java.lang.String toString()
          Get description of color.
 void validate()
          Validate color.
 
Methods inherited from class edu.jhu.ece.iacl.jist.pipeline.parameter.ParamModel
clean, createMipavParameter, createTreeNode, dispose, equals, getCliTag, getDescription, getFactory, getInputView, getLabel, getName, getOutputView, getShortLabel, getView, hide, importMipavParameter, importParameter, isConnectible, isHidden, isMandatory, loadResources, loadResources, read, read, replacePath, saveResources, setCliTag, setDescription, setFactory, setHidden, setInputView, setLabel, setLoadAndSaveOnValidate, setMandatory, setName, setOutputView, setShortLabel, toXML, write, write, writeAndFreeNow
 
Methods inherited from class edu.jhu.ece.iacl.jist.pipeline.PipePort
addListener, disconnect, disconnect, disconnect, disconnect, getGraphPort, getIncomingConnector, getIncomingConnectors, getIncomingPorts, getListeners, getMaxIncoming, getMaxOutgoing, getOutgoingConnector, getOutgoingConnectors, getOutgoingPorts, getOwner, getPortType, isConnected, isConnectedTo, isInputPort, isOutputPort, notifyListenersOfConnection, notifyListenersOfDisconnection, removeAllListeners, removeListener, setConnectable, setGraphPort, setMaxIncoming, setMaxOutgoing, setOwner, setPortType, setUseConnector, usingConnector
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

color

protected java.awt.Color color
The color.

Constructor Detail

ParamColor

public ParamColor()
Default constructor.


ParamColor

public ParamColor(java.awt.Color p)
Instantiates a new param color.

Parameters:
p - the p

ParamColor

public ParamColor(java.lang.String name)
Constructor.

Parameters:
name - parameter name

ParamColor

public ParamColor(java.lang.String name,
                  java.awt.Color p)
Instantiates a new parameter color.

Parameters:
name - the name
p - the p
Method Detail

clone

public ParamColor clone()
Description copied from class: PipePort
Clone parameter.

Specified by:
clone in class ParamModel<java.awt.Color>
Returns:
the pipe port

compareTo

public int compareTo(ParamModel model)
Compare to.

Specified by:
compareTo in interface java.lang.Comparable<ParamModel>
Overrides:
compareTo in class ParamModel<java.awt.Color>
Parameters:
model - the model
Returns:
the int
See Also:
ParamModel.compareTo(edu.jhu.ece.iacl.jist.pipeline.parameter.ParamModel)

getValue

public java.awt.Color getValue()
Description copied from class: ParamModel
Get the value stored in the parameter.

Specified by:
getValue in class ParamModel<java.awt.Color>
Returns:
this the default value stored by the parameter. Although, parameters could potentially store more than one type of value.

init

public void init()
Initialize parameter.

Specified by:
init in class PipePort<java.awt.Color>

isCompatible

public boolean isCompatible(PipePort model)
Checks if is compatible.

Overrides:
isCompatible in class ParamModel<java.awt.Color>
Parameters:
model - the model
Returns:
true, if checks if is compatible
See Also:
ParamModel.isCompatible(edu.jhu.ece.iacl.jist.pipeline.PipePort)

setValue

public void setValue(java.awt.Color value)
              throws InvalidParameterValueException
Set color value.

Specified by:
setValue in class ParamModel<java.awt.Color>
Parameters:
value - the color
Throws:
InvalidParameterValueException - the invalid parameter value exception

toString

public java.lang.String toString()
Get description of color.

Specified by:
toString in class ParamModel<java.awt.Color>
Returns:
the string

validate

public void validate()
              throws InvalidParameterException
Validate color.

Specified by:
validate in class ParamModel<java.awt.Color>
Throws:
InvalidParameterException - the invalid parameter exception

getHumanReadableDataType

public java.lang.String getHumanReadableDataType()
Specified by:
getHumanReadableDataType in class ParamModel<java.awt.Color>

getXMLValue

public java.lang.String getXMLValue()
Specified by:
getXMLValue in class ParamModel<java.awt.Color>

setXMLValue

public void setXMLValue(java.lang.String arg)
Specified by:
setXMLValue in class ParamModel<java.awt.Color>

probeDefaultValue

public java.lang.String probeDefaultValue()
Specified by:
probeDefaultValue in class ParamModel<java.awt.Color>