|
AROM-2_2_13 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--helix.util.ui.parameters.ObjectParameter
Basic implementation of a parameter object.
| Field Summary |
| Fields inherited from interface helix.util.ui.parameters.Parameter |
BOOLEAN_TYPE, LIST_TYPE, OBJECT_TYPE, STRING_TYPE |
| Constructor Summary | |
ObjectParameter(String key,
String label,
Object value,
Object defaultValue,
Object[] values,
Constraints constraint,
boolean isPrefSaved)
Constructor. |
|
| Method Summary | |
void |
addListener(ParameterListener listener)
Adds a listener to this parameter. |
Constraints |
getConstraint()
Returns the constraint that value have to respect. |
Object |
getDefaultValue()
Returns the default value for this parameter. |
Object |
getInitialValue()
Returns the inital value of this parameter (value at the parameter creation). |
String |
getKey()
Returns the parameter key. |
String |
getLabel()
Returns the label related to this parameter |
int |
getType()
Returns the parameter type. |
Object |
getValue()
Returns the parameter value (the value is setted after user validation). |
Object[] |
getValues()
Returns the domain values (may be null) |
boolean |
hasConstraints()
Returns true if this parameter has a constraints object. |
boolean |
hasDomainValues()
Returns true if this parameter has a constraints object. |
boolean |
isEnable()
Indicates if this parameter enable or not. |
boolean |
isPreferenceSaved()
Returns true if value of this parameter could be saved in preferences. |
void |
removeListener(ParameterListener listener)
Removes a current listener of this parameter. |
void |
setEnable(boolean enable)
Renders this parameter enable or not. |
void |
setValue(Object value)
Set the value of this parameter. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ObjectParameter(String key,
String label,
Object value,
Object defaultValue,
Object[] values,
Constraints constraint,
boolean isPrefSaved)
throws IllegalArgumentException
key - identifier of Parameter (can not be null)label - label which present the parametervalue - initial value (can not be null)defaultValue - default value (can not be null)values - domain values (if not null must contains value)constraint - could be nullisPrefSaved - indicates if value could be store in Preferences| Method Detail |
public void setValue(Object value)
throws IllegalArgumentException
setValue in interface ParameterIllegalArgumentException - if new value is
null or does not respect constraint or domain valuespublic boolean hasDomainValues()
Parameter
hasDomainValues in interface Parameterpublic String getKey()
Parameter
getKey in interface Parameterpublic Object getValue()
Parameter
getValue in interface Parameterpublic void setEnable(boolean enable)
Parameter
setEnable in interface Parameterenable - public boolean isEnable()
Parameter
isEnable in interface Parameterpublic Object getDefaultValue()
Parameter
getDefaultValue in interface Parameterpublic Object getInitialValue()
Parameter
getInitialValue in interface Parameterpublic String getLabel()
Parameter
getLabel in interface Parameterpublic Object[] getValues()
Parameter
getValues in interface Parameterpublic Constraints getConstraint()
Parameter
getConstraint in interface Parameterpublic int getType()
Parameter
getType in interface Parameterpublic boolean hasConstraints()
Parameter
hasConstraints in interface Parameterpublic boolean isPreferenceSaved()
Parameter
isPreferenceSaved in interface Parameterpublic void addListener(ParameterListener listener)
Parameter
addListener in interface Parameterlistener - public void removeListener(ParameterListener listener)
Parameter
removeListener in interface Parameterlistener -
|
AROM-2_2_13 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||