Class UserDataChoice

java.lang.Object
ucar.unidata.data.DataChoice
ucar.unidata.data.UserDataChoice

public class UserDataChoice extends DataChoice
Represents a DataChoice in a formula that is numeric.
Version:
$Revision: 1.26 $
Author:
IDV development team
  • Field Details

    • persistent

      public boolean persistent
      A hack used by the DerivedDataChoice for when we don't save the user entered choices in a bundle
    • label

      protected String label
      DataChoice label
    • value

      protected Object value
      numeric value
  • Constructor Details

    • UserDataChoice

      public UserDataChoice()
      Default constructor; used for unpersistence
    • UserDataChoice

      public UserDataChoice(UserDataChoice other)
      Copy constructor, set properties from the other.
      Parameters:
      other - other UserDataChoice for properties
    • UserDataChoice

      public UserDataChoice(String label)
      Create a new UserDataChoice
      Parameters:
      label - label for this choice
    • UserDataChoice

      public UserDataChoice(String label, String defaultValue)
      Create a new UserDataChoice
      Parameters:
      label - label for this choice
      defaultValue - The defaultValue
  • Method Details

    • cloneMe

      public DataChoice cloneMe()
      Make a clone of me.
      Specified by:
      cloneMe in class DataChoice
      Returns:
      a new me!
    • getLabel

      public String getLabel()
      Get the label for this.
      Returns:
      the label
    • setLabel

      public void setLabel(String l)
      Set the label for this
      Parameters:
      l - new label
    • toString

      public String toString()
      Return a String representation of this UserDataChoice.
      Overrides:
      toString in class DataChoice
      Returns:
      a String representation of this UserDataChoice
    • getValue

      public Object getValue()
      Get the value for this choice.
      Returns:
      the value
    • setValue

      public void setValue(Object v)
      Set the value for this choice.
      Parameters:
      v - the value
    • equals

      public boolean equals(Object other)
      Check for equality.
      Overrides:
      equals in class DataChoice
      Parameters:
      other - object in question
      Returns:
      true if o equals this
    • getData

      protected Data getData(DataCategory category, DataSelection dataSelection, Hashtable requestProperties) throws VisADException, RemoteException
      A no-op
      Specified by:
      getData in class DataChoice
      Parameters:
      category - The data category of the request.
      dataSelection - Identifies any subsetting of the data.
      requestProperties - Hashtable that holds any detailed request properties.
      Returns:
      null
      Throws:
      RemoteException - Java RMI problem
      VisADException - VisAD problem
    • addDataChangeListener

      public void addDataChangeListener(DataChangeListener listener)
      Add a DataChangeListener. Does nothing
      Specified by:
      addDataChangeListener in class DataChoice
      Parameters:
      listener - listener to add
    • removeDataChangeListener

      public void removeDataChangeListener(DataChangeListener listener)
      Remove a DataChangeListener. Does nothing
      Specified by:
      removeDataChangeListener in class DataChoice
      Parameters:
      listener - listener to remove
    • setDefaultValue

      public void setDefaultValue(String value)
      Set the DefaultValue property.
      Parameters:
      value - The new value for DefaultValue
    • getDefaultValue

      public String getDefaultValue()
      Get the DefaultValue property.
      Returns:
      The DefaultValue