Package ucar.unidata.data
Class UserDataChoice
java.lang.Object
ucar.unidata.data.DataChoice
ucar.unidata.data.UserDataChoice
Represents a DataChoice in a formula that is numeric.
- Version:
- $Revision: 1.26 $
- Author:
- IDV development team
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected String
DataChoice labelboolean
A hack used by the DerivedDataChoice for when we don't save the user entered choices in a bundleprotected Object
numeric valueFields inherited from class ucar.unidata.data.DataChoice
description, id, name, NULL_DATASELECTION, NULL_PROPERTIES, NULL_REQUESTPROPERTIES, parent, PROP_ICON, PROP_REQUESTER, properties
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor; used for unpersistenceUserDataChoice
(String label) Create a new UserDataChoiceUserDataChoice
(String label, String defaultValue) Create a new UserDataChoiceUserDataChoice
(UserDataChoice other) Copy constructor, set properties from the other. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addDataChangeListener
(DataChangeListener listener) Add aDataChangeListener
.cloneMe()
Make a clone of me.boolean
Check for equality.protected Data
getData
(DataCategory category, DataSelection dataSelection, Hashtable requestProperties) A no-opGet the DefaultValue property.getLabel()
Get the label for this.getValue()
Get the value for this choice.void
removeDataChangeListener
(DataChangeListener listener) Remove aDataChangeListener
.void
setDefaultValue
(String value) Set the DefaultValue property.void
Set the label for thisvoid
Set the value for this choice.toString()
Return a String representation of this UserDataChoice.Methods inherited from class ucar.unidata.data.DataChoice
addCategory, addCurrentName, addParamNameToCategories, basicallyEquals, cloneDataChoices, createClone, getAllDateTimes, getAllLevels, getAllLevels, getCategories, getCurrentNames, getData, getData, getDataCategories, getDataCategories, getDataSelection, getDataSources, getDescription, getDisplayCategory, getFinalDataChoices, getFixedRequestProperties, getForUser, getFullDescription, getId, getIndexedName, getName, getParent, getProperties, getProperty, getProperty, getProperty, getSelectedDateTimes, getStringId, hashCode, initAfterUnPersistence, isEndUserFormula, mergeRequestProperties, setCategories, setDataCategories, setDataSelection, setDescription, setFixedRequestProperties, setId, setLevelSelection, setName, setObjectProperty, setParent, setProperties, setProperty, setProperty, setTimeSelection
-
Field Details
-
persistent
public boolean persistentA hack used by the DerivedDataChoice for when we don't save the user entered choices in a bundle -
label
DataChoice label -
value
numeric value
-
-
Constructor Details
-
UserDataChoice
public UserDataChoice()Default constructor; used for unpersistence -
UserDataChoice
Copy constructor, set properties from the other.- Parameters:
other
- other UserDataChoice for properties
-
UserDataChoice
Create a new UserDataChoice- Parameters:
label
- label for this choice
-
UserDataChoice
Create a new UserDataChoice- Parameters:
label
- label for this choicedefaultValue
- The defaultValue
-
-
Method Details
-
cloneMe
Make a clone of me.- Specified by:
cloneMe
in classDataChoice
- Returns:
- a new me!
-
getLabel
Get the label for this.- Returns:
- the label
-
setLabel
Set the label for this- Parameters:
l
- new label
-
toString
Return a String representation of this UserDataChoice.- Overrides:
toString
in classDataChoice
- Returns:
- a String representation of this UserDataChoice
-
getValue
Get the value for this choice.- Returns:
- the value
-
setValue
Set the value for this choice.- Parameters:
v
- the value
-
equals
Check for equality.- Overrides:
equals
in classDataChoice
- 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 classDataChoice
- 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 problemVisADException
- VisAD problem
-
addDataChangeListener
Add aDataChangeListener
. Does nothing- Specified by:
addDataChangeListener
in classDataChoice
- Parameters:
listener
- listener to add
-
removeDataChangeListener
Remove aDataChangeListener
. Does nothing- Specified by:
removeDataChangeListener
in classDataChoice
- Parameters:
listener
- listener to remove
-
setDefaultValue
Set the DefaultValue property.- Parameters:
value
- The new value for DefaultValue
-
getDefaultValue
Get the DefaultValue property.- Returns:
- The DefaultValue
-