|
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 PreferencesMethod Detail |
public void setValue(Object value) throws IllegalArgumentException
setValue
in interface Parameter
IllegalArgumentException
- if new value is
null or does not respect constraint or domain valuespublic boolean hasDomainValues()
Parameter
hasDomainValues
in interface Parameter
public String getKey()
Parameter
getKey
in interface Parameter
public Object getValue()
Parameter
getValue
in interface Parameter
public void setEnable(boolean enable)
Parameter
setEnable
in interface Parameter
enable
- public boolean isEnable()
Parameter
isEnable
in interface Parameter
public Object getDefaultValue()
Parameter
getDefaultValue
in interface Parameter
public Object getInitialValue()
Parameter
getInitialValue
in interface Parameter
public String getLabel()
Parameter
getLabel
in interface Parameter
public Object[] getValues()
Parameter
getValues
in interface Parameter
public Constraints getConstraint()
Parameter
getConstraint
in interface Parameter
public int getType()
Parameter
getType
in interface Parameter
public boolean hasConstraints()
Parameter
hasConstraints
in interface Parameter
public boolean isPreferenceSaved()
Parameter
isPreferenceSaved
in interface Parameter
public void addListener(ParameterListener listener)
Parameter
addListener
in interface Parameter
listener
- public void removeListener(ParameterListener listener)
Parameter
removeListener
in interface Parameter
listener
-
|
AROM-2_2_13 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |