public abstract class AbstractVisualObject extends java.lang.Object implements VisualObject
AbstractVisualObject
class implements default versions
of the following interface methods:
ComponentProducer.refreshComponent()
(no operation)VisualObject.addPropertyChangeListener(java.beans.PropertyChangeListener)
VisualObject.firePropertyChange()
VisualObject.showChooser()
(no operation)VisualObject.hasChooser()
(returns false)VisualObject.setRestrictions(java.lang.Object)
(no operation)Modifier and Type | Field and Description |
---|---|
static java.lang.String |
VALUE_PROPERTY
The value property.
|
Modifier | Constructor and Description |
---|---|
protected |
AbstractVisualObject()
Creates a new abstract visual object and initializes the property
change support.
|
Modifier and Type | Method and Description |
---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds a listener to receive property change events for when this
object's value changes.
|
void |
firePropertyChange()
Fires a property change event for this object's value.
|
void |
firePropertyChange(java.lang.Object oldValue,
java.lang.Object newValue)
Fires a property change event for this object's value using the
specified old and new values.
|
boolean |
hasChooser()
Gets the chooser flag.
|
void |
refreshComponent()
Refreshes the component display to show the contents of the
current object.
|
void |
setRestrictions(java.lang.Object restrict)
Sets restrictions on the allowed object values.
|
void |
showChooser()
Shows the chooser dialog used to manipulate the object's
properties.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getValue
getComponent
public static final java.lang.String VALUE_PROPERTY
protected AbstractVisualObject()
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
VisualObject
addPropertyChangeListener
in interface VisualObject
listener
- the listener to add.public void firePropertyChange()
VisualObject.getValue()
.firePropertyChange
in interface VisualObject
public void firePropertyChange(java.lang.Object oldValue, java.lang.Object newValue)
oldValue
- the old value for the property change event.newValue
- the new value for the property change event.public void showChooser()
VisualObject
VisualObject.hasChooser()
returns
false and this method has no effect.showChooser
in interface VisualObject
public boolean hasChooser()
VisualObject
hasChooser
in interface VisualObject
public void setRestrictions(java.lang.Object restrict)
VisualObject
setRestrictions
in interface VisualObject
restrict
- the restictions, a custom object that is known to
the child class.public void refreshComponent()
refreshComponent
in interface ComponentProducer