AROM-2_2_13

helix.util.ui.parameters
Interface Parameter

All Known Implementing Classes:
ObjectParameter

public interface Parameter

A parameter represent all information related to an entry in a parameter dialog.

Version:
$Id: Parameter.java,v 1.4 2003/10/30 16:21:23 ciron Exp $

Field Summary
static int BOOLEAN_TYPE
          Denotes a boolean type (value is a Boolean object).
static int LIST_TYPE
          Denotes a list type (value is a List of string).
static int OBJECT_TYPE
          Denotes a object type (value is an Object).
static int STRING_TYPE
          Denotes a string type (value is a String object).
 
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.
 

Field Detail

STRING_TYPE

public static final int STRING_TYPE
Denotes a string type (value is a String object).

See Also:
Constant Field Values

BOOLEAN_TYPE

public static final int BOOLEAN_TYPE
Denotes a boolean type (value is a Boolean object).

See Also:
Constant Field Values

LIST_TYPE

public static final int LIST_TYPE
Denotes a list type (value is a List of string).

See Also:
Constant Field Values

OBJECT_TYPE

public static final int OBJECT_TYPE
Denotes a object type (value is an Object).

See Also:
Constant Field Values
Method Detail

getKey

public String getKey()
Returns the parameter key.

Returns:
String

getValue

public Object getValue()
Returns the parameter value (the value is setted after user validation).

Returns:
Object

setValue

public void setValue(Object value)
              throws IllegalArgumentException
Set the value of this parameter.
Listeners will be advertise if change has succeed in.

Throws:
IllegalArgumentException - if new value is null or does not respect constraint or domain values

setEnable

public void setEnable(boolean enable)
Renders this parameter enable or not. If disable, the user could not modify his value (nevertheless it is always possible to call setValue).
Listeners of this parameter will be advertise in case of value changed.

Parameters:
enable -

isEnable

public boolean isEnable()
Indicates if this parameter enable or not.

Returns:
boolean

getDefaultValue

public Object getDefaultValue()
Returns the default value for this parameter.

Returns:
Object

getInitialValue

public Object getInitialValue()
Returns the inital value of this parameter (value at the parameter creation).

Returns:
Object

getLabel

public String getLabel()
Returns the label related to this parameter

Returns:
String

getValues

public Object[] getValues()
Returns the domain values (may be null)

Returns:
Object[]

getConstraint

public Constraints getConstraint()
Returns the constraint that value have to respect.

Returns:
Constraints

getType

public int getType()
Returns the parameter type.

Returns:

hasConstraints

public boolean hasConstraints()
Returns true if this parameter has a constraints object.

Returns:
true

hasDomainValues

public boolean hasDomainValues()
Returns true if this parameter has a constraints object.

Returns:
true

isPreferenceSaved

public boolean isPreferenceSaved()
Returns true if value of this parameter could be saved in preferences.

Returns:
boolean

addListener

public void addListener(ParameterListener listener)
Adds a listener to this parameter.

Parameters:
listener -

removeListener

public void removeListener(ParameterListener listener)
Removes a current listener of this parameter.

Parameters:
listener -

AROM-2_2_13