public class LabeledPropertySelectionModel extends java.lang.Object implements IPropertySelectionModel
IPropertySelectionModeladding an initial property. The label,
option, and value of the initial property are configurable.| Constructor and Description |
|---|
LabeledPropertySelectionModel()
Constructs a new LabeledPropertySelectionModel using an empty model and default label,
option, and value.
|
LabeledPropertySelectionModel(IPropertySelectionModel model)
Constructs a new LabeledPropertySelectionModel using the specified model and default label,
option, and value.
|
LabeledPropertySelectionModel(IPropertySelectionModel model,
java.lang.String label)
Constructs a new LabeledPropertySelectionModel using the specified model and label, and
default option and value.
|
LabeledPropertySelectionModel(IPropertySelectionModel model,
java.lang.String label,
java.lang.Object option)
Constructs a new LabeledPropertySelectionModel using the specified model, label, and option;
and default value.
|
LabeledPropertySelectionModel(IPropertySelectionModel model,
java.lang.String label,
java.lang.Object option,
java.lang.String value)
Constructs a new LabeledPropertySelectionModel using the specified model, label, option, and
value.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getLabel()
Returns the label of the initial IPropertySelectionModel option
|
java.lang.String |
getLabel(int index)
Returns the label for an option.
|
IPropertySelectionModel |
getModel()
Returns the underlying IPropertySelectionModel
|
java.lang.Object |
getOption()
Returns the initial option
|
java.lang.Object |
getOption(int index)
Returns one possible option that will be assigned to the server-side property.
|
int |
getOptionCount()
Returns the number of possible options.
|
java.lang.String |
getValue()
Returns the value of the initial IPropertySelectionModel option
|
java.lang.String |
getValue(int index)
Returns a String used to represent the option in the HTML (as the value of an <option>
or <input type=radio>.
|
void |
setLabel(java.lang.String label)
Sets the label of the initial IPropertySelectionModel option
|
void |
setModel(IPropertySelectionModel model)
Sets the underlying IPropertySelectionModel
|
void |
setOption(java.lang.Object option)
Sets the initial IPropertySelectionModel option
|
void |
setValue(java.lang.String value)
Sets the value of the initial IPropertySelectionModel option
|
java.lang.Object |
translateValue(java.lang.String value)
Returns the option corresponding to a value.
|
public LabeledPropertySelectionModel()
public LabeledPropertySelectionModel(IPropertySelectionModel model)
model - the underlying model to decoratepublic LabeledPropertySelectionModel(IPropertySelectionModel model, java.lang.String label)
model - the underlying model to decoratelabel - the label of the initial propertypublic LabeledPropertySelectionModel(IPropertySelectionModel model, java.lang.String label, java.lang.Object option)
model - the underlying model to decoratelabel - the label of the initial propertyoption - the option value of the initial propertypublic LabeledPropertySelectionModel(IPropertySelectionModel model, java.lang.String label, java.lang.Object option, java.lang.String value)
model - the underlying model to decoratelabel - the label of the initial propertyoption - the option value of the initial propertyvalue - the value of the initial propertypublic IPropertySelectionModel getModel()
public void setModel(IPropertySelectionModel model)
model - the IPropertySelectionModel to setpublic int getOptionCount()
IPropertySelectionModelgetOptionCount in interface IPropertySelectionModelIPropertySelectionModel.getOptionCount()public java.lang.Object getOption(int index)
IPropertySelectionModelgetOption in interface IPropertySelectionModelIPropertySelectionModel.getOption(int)public java.lang.String getLabel(int index)
IPropertySelectionModelgetLabel in interface IPropertySelectionModelIPropertySelectionModel.getLabel(int)public java.lang.String getValue(int index)
IPropertySelectionModelgetValue in interface IPropertySelectionModelIPropertySelectionModel.getValue(int)public java.lang.Object translateValue(java.lang.String value)
IPropertySelectionModeltranslateValue in interface IPropertySelectionModelIPropertySelectionModel.translateValue(java.lang.String)public java.lang.String getLabel()
public void setLabel(java.lang.String label)
label - a IPropertySelectionModel option labelpublic java.lang.String getValue()
public void setValue(java.lang.String value)
value - a IPropertySelectionModel option valuepublic java.lang.Object getOption()
public void setOption(java.lang.Object option)
option - a IPropertySelectionModel option