Package noaa.coastwatch.gui.visual
Class AbstractVisualObject
java.lang.Object
noaa.coastwatch.gui.visual.AbstractVisualObject
- All Implemented Interfaces:
ComponentProducer,VisualObject
- Direct Known Subclasses:
VisualArray,VisualBoolean,VisualChoice,VisualColor,VisualFont,VisualInteger,VisualOverlay,VisualString,VisualStroke,VisualSymbol
The
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)
- Since:
- 3.1.7
- Author:
- Peter Hollemans
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCreates a new abstract visual object and initializes the property change support. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a listener to receive property change events for when this object's value changes.voidFires a property change event for this object's value.voidfirePropertyChange(Object oldValue, Object newValue) Fires a property change event for this object's value using the specified old and new values.booleanGets the chooser flag.voidRefreshes the component display to show the contents of the current object.voidsetRestrictions(Object restrict) Sets restrictions on the allowed object values.voidShows the chooser dialog used to manipulate the object's properties.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface noaa.coastwatch.gui.visual.ComponentProducer
getComponentMethods inherited from interface noaa.coastwatch.gui.visual.VisualObject
getValue
-
Field Details
-
VALUE_PROPERTY
The value property.- See Also:
-
-
Constructor Details
-
AbstractVisualObject
protected AbstractVisualObject()Creates a new abstract visual object and initializes the property change support.
-
-
Method Details
-
addPropertyChangeListener
Description copied from interface:VisualObjectAdds a listener to receive property change events for when this object's value changes.- Specified by:
addPropertyChangeListenerin interfaceVisualObject- Parameters:
listener- the listener to add.
-
firePropertyChange
public void firePropertyChange()Fires a property change event for this object's value. The old property value is set to null, and the new value is set to the value returned byVisualObject.getValue().- Specified by:
firePropertyChangein interfaceVisualObject
-
firePropertyChange
Fires a property change event for this object's value using the specified old and new values.- Parameters:
oldValue- the old value for the property change event.newValue- the new value for the property change event.
-
showChooser
public void showChooser()Description copied from interface:VisualObjectShows the chooser dialog used to manipulate the object's properties. In some cases, a visual object may not have a chooser, in which caseVisualObject.hasChooser()returns false and this method has no effect.- Specified by:
showChooserin interfaceVisualObject
-
hasChooser
public boolean hasChooser()Description copied from interface:VisualObjectGets the chooser flag.- Specified by:
hasChooserin interfaceVisualObject- Returns:
- true if this object has a chooser, or false if not.
-
setRestrictions
Description copied from interface:VisualObjectSets restrictions on the allowed object values.- Specified by:
setRestrictionsin interfaceVisualObject- Parameters:
restrict- the restictions, a custom object that is known to the child class.
-
refreshComponent
public void refreshComponent()Refreshes the component display to show the contents of the current object. This method does nothing unless overridden in the child class.- Specified by:
refreshComponentin interfaceComponentProducer
-