public class ValueHolder
extends Object
implements ValueModel
A mutable ValueModel implementation that stores a local value and optionally emits change events.
| Constructor and description |
|---|
ValueHolder()Creates a holder with Object as its declared type. |
ValueHolder(Class type)Creates a holder with the supplied declared type. |
ValueHolder(Object value)Creates a holder initialized with the supplied value. |
| Type Params | Return Type | Name and description |
|---|---|---|
|
public void |
addPropertyChangeListener(PropertyChangeListener listener)Add a PropertyChangeListener to the listener list. |
|
public Class |
getType()Returns the declared value type for this holder. |
|
public Object |
getValue()Returns the current stored value. |
|
public boolean |
isEditable()Indicates whether callers should treat this holder as writable. |
|
public void |
removePropertyChangeListener(PropertyChangeListener listener)Removes a PropertyChangeListener from the listener list. |
|
public void |
setEditable(boolean editable)Controls whether callers should treat this holder as writable. |
|
public void |
setValue(Object value)Updates the current value and notifies registered listeners of the change. |
Creates a holder with Object as its declared type.
Creates a holder with the supplied declared type.
type - the declared value typeCreates a holder initialized with the supplied value.
value - the initial valueAdd a PropertyChangeListener to the listener list.
listener - The listener to add.Returns the declared value type for this holder.
Returns the current stored value.
Indicates whether callers should treat this holder as writable.
true when the holder is editableRemoves a PropertyChangeListener from the listener list.
listener - The listener to remove.Controls whether callers should treat this holder as writable.
editable - true to mark the holder as editableUpdates the current value and notifies registered listeners of the change.
value - the new valueCopyright © 2003-2026 The Apache Software Foundation. All rights reserved.