P - the "presentation" type of this PropertyM - the "model" type of the nested Propertypublic class ConvertedProperty<P,M> extends AbstractProperty<P>
Converter to a Property of one type (the "model" type) to produce a
Property of another type (the "presentation" type).AbstractProperty.ReadOnlyStatusChangeEventProperty.Editor, Property.ReadOnlyException, Property.ReadOnlyStatusChangeNotifier, Property.Transactional<T>, Property.ValueChangeNotifier, Property.Viewer| Constructor and Description |
|---|
ConvertedProperty(Property<M> property,
Converter<P,M> converter)
Convenience constructor for when no
Locale is required. |
ConvertedProperty(Property<M> property,
Converter<P,M> converter,
Locale locale)
Primary constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addReadOnlyStatusChangeListener(Property.ReadOnlyStatusChangeListener listener) |
void |
addValueChangeListener(Property.ValueChangeListener listener) |
Class<? extends P> |
getType() |
P |
getValue() |
boolean |
isReadOnly() |
void |
setReadOnly(boolean readOnly) |
void |
setValue(P value) |
addListener, addListener, fireReadOnlyStatusChange, fireValueChange, getListeners, removeListener, removeListener, removeReadOnlyStatusChangeListener, removeValueChangeListener, toStringpublic ConvertedProperty(Property<M> property, Converter<P,M> converter, Locale locale)
property - underlying propertyconverter - converts this property's values from/to the underlying property's valueslocale - the Locale to provide to converter, or null for noneIllegalArgumentException - if type, property, or converter is nullpublic P getValue()
public void setValue(P value)
public boolean isReadOnly()
isReadOnly in interface Property<P>isReadOnly in class AbstractProperty<P>public void setReadOnly(boolean readOnly)
setReadOnly in interface Property<P>setReadOnly in class AbstractProperty<P>public void addReadOnlyStatusChangeListener(Property.ReadOnlyStatusChangeListener listener)
addReadOnlyStatusChangeListener in interface Property.ReadOnlyStatusChangeNotifieraddReadOnlyStatusChangeListener in class AbstractProperty<P>public void addValueChangeListener(Property.ValueChangeListener listener)
addValueChangeListener in interface Property.ValueChangeNotifieraddValueChangeListener in class AbstractProperty<P>Copyright © 2017. All rights reserved.