ucar.unidata.idv.ui
Class ParamInfo

java.lang.Object
  extended by ucar.unidata.idv.ui.ParamInfo

public class ParamInfo
extends Object

This is used by the ParamDefaultsEditor to hold the default display information for a parameter. Holds a simple min/max range and other metadata about a parameters data, including unit, color table, and contouring values; with get and set methods.


Constructor Summary
ParamInfo()
          ctor
ParamInfo(ParamInfo other)
          Create this ParamInfo.
ParamInfo(String name, String colorTableName, Range range, ContourInfo ci, Unit displayUnit)
          Create this ParamInfo.
 
Method Summary
 void clearColorTableName()
          Set the colorTableName to null
 void clearContourInfo()
          Set the contourInfo to null
 void clearDisplayUnit()
          Set the displayUnit to null
 void clearRange()
          Set the range to null
 boolean equals(Object o)
          Override equals
 String getColorTableName()
          Get the color table name
 ContourInfo getContourInfo()
          Get the ContourInfo
 Unit getDisplayUnit()
          Get the displayUnit
 double getMax()
          Get the maximum range value or 0.0 if range is undefined.
 double getMin()
          Get the minimum range value or 0.0 if range is undefined.
 String getName()
          Get the name
 Range getRange()
          Get the Range
 boolean hasColorTableName()
          Does this have a color table name defined
 boolean hasContourInfo()
          Does this have a ContourInfo defined
 boolean hasDisplayUnit()
          Does this have a display unit defined
 boolean hasRange()
          Does this have a Range defined
 void initWith(ParamInfo that)
          Copy the state
 void setColorTableName(String value)
          Set the color table name
 void setContourInfo(ContourInfo value)
          Set the ContourInfo
 void setDisplayUnit(Unit newUnit)
          Set the displayUnit
 void setMax(double m)
          Set the maximum value for the Range.
 void setMin(double m)
          Set the minimum value for the Range.
 void setName(String value)
          Set the nae
 void setRange(Range value)
          Set the range with the given Range value
 String toString()
          Return the name
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ParamInfo

public ParamInfo()
ctor


ParamInfo

public ParamInfo(ParamInfo other)
Create this ParamInfo. Initialize it with the state held in the given other ParamInfo

Parameters:
other - The ParamInfo to initialize from

ParamInfo

public ParamInfo(String name,
                 String colorTableName,
                 Range range,
                 ContourInfo ci,
                 Unit displayUnit)
Create this ParamInfo.

Parameters:
name - The name
colorTableName - The name of the color table
range - The range
ci - The ContourInfo
displayUnit - The display unit
Method Detail

initWith

public void initWith(ParamInfo that)
Copy the state

Parameters:
that - Other object to init with

hasRange

public boolean hasRange()
Does this have a Range defined

Returns:
Is range non-null

hasContourInfo

public boolean hasContourInfo()
Does this have a ContourInfo defined

Returns:
Is contourInfo non-null

hasDisplayUnit

public boolean hasDisplayUnit()
Does this have a display unit defined

Returns:
Is displayUnit non-null

hasColorTableName

public boolean hasColorTableName()
Does this have a color table name defined

Returns:
Is colorTableName non-null

setMin

public void setMin(double m)
Set the minimum value for the Range. Create it if it is null

Parameters:
m - The minimum range value

setMax

public void setMax(double m)
Set the maximum value for the Range. Create it if it is null

Parameters:
m - The maximum range value

getMin

public double getMin()
Get the minimum range value or 0.0 if range is undefined.

Returns:
Min range value

getMax

public double getMax()
Get the maximum range value or 0.0 if range is undefined.

Returns:
Max range value

setRange

public void setRange(Range value)
Set the range with the given Range value

Parameters:
value - The new range value

getRange

public Range getRange()
Get the Range

Returns:
The range value

setContourInfo

public void setContourInfo(ContourInfo value)
Set the ContourInfo

Parameters:
value - The new contour info

getContourInfo

public ContourInfo getContourInfo()
Get the ContourInfo

Returns:
The contour info

setColorTableName

public void setColorTableName(String value)
Set the color table name

Parameters:
value - The color table name

getColorTableName

public String getColorTableName()
Get the color table name

Returns:
The color table name

clearColorTableName

public void clearColorTableName()
Set the colorTableName to null


clearDisplayUnit

public void clearDisplayUnit()
Set the displayUnit to null


clearRange

public void clearRange()
Set the range to null


clearContourInfo

public void clearContourInfo()
Set the contourInfo to null


setName

public void setName(String value)
Set the nae

Parameters:
value - The new name value

getName

public String getName()
Get the name

Returns:
The name value

getDisplayUnit

public Unit getDisplayUnit()
Get the displayUnit

Returns:
The display unit

setDisplayUnit

public void setDisplayUnit(Unit newUnit)
Set the displayUnit

Parameters:
newUnit - The new display unit

toString

public String toString()
Return the name

Overrides:
toString in class Object
Returns:
The name

equals

public boolean equals(Object o)
Override equals

Overrides:
equals in class Object
Parameters:
o - The object
Returns:
Is equals to the object