public class PropertiesAdapter extends AbstractValueModel<Object> implements ValueModel<Object>
| Constructor and Description |
|---|
PropertiesAdapter(Properties pProperties,
String pKey,
String pDefaultValue)
Create a new ValueModel with a properties object as its backing store.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getValue()
Get the current value, during a callback this is the new value.
|
boolean |
isEditable()
Returns always true
|
void |
setValue(Object pValue,
boolean pIsSetForced)
Set a new value, this will fire a ChangeEvent if the new value
is different from the old value.
|
addChangeListener, booleanValue, checkDisposed, dispose, doubleValue, fireStateChanged, floatValue, getDependents, getName, intValue, isDisposed, isInSetValue, isSetForced, longValue, onChangeSend, removeChangeListener, retractInterestsFor, setInSetValue, setName, setObjectValue, setValue, setValue, setValue, setValue, setValue, setValue, setValueForced, signalExternalUpdate, stringValueclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddChangeListener, booleanValue, dispose, doubleValue, floatValue, getDependents, getName, intValue, isDisposed, isSetForced, longValue, onChangeSend, removeChangeListener, retractInterestsFor, setName, setObjectValue, setValue, setValue, setValue, setValue, setValue, setValue, setValueForced, stringValuepublic PropertiesAdapter(Properties pProperties, String pKey, String pDefaultValue)
pProperties - the properties object we read/write our object from/to,
must not be nullpKey - the key in pProperites, must not be nullpDefaultValue - the default value, may be nullIllegalArgumentException - if pProperties or pKey is nullpublic boolean isEditable()
isEditable in interface ValueModel<Object>public void setValue(Object pValue, boolean pIsSetForced)
setValue in interface ValueModel<Object>pValue - the new value (null is o.k.)pIsSetForced - true if a forced setValue should be donepublic String getValue()
getValue in interface ValueModel<Object>Copyright © 2017 Jürgen Zeller (privat). All rights reserved.