Class ARangePolicy
java.lang.Object
info.monitorenter.gui.chart.rangepolicies.ARangePolicy
- All Implemented Interfaces:
IRangePolicy,Serializable
- Direct Known Subclasses:
RangePolicyFixedViewport,RangePolicyHighestValues,RangePolicyHighestValuesForcedMin,RangePolicyMinimumViewport,RangePolicyUnbounded
A default superclass for IRangePolicy implementations that adds support for
setting and getting ranges.
Should be used by any implementation that really works on the data of ranges
(not unbounded ranges). Subclasses should access the internal member range or
use getRange().
- Version:
- $Revision: 1.8 $
- Author:
- Achim Westermann
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected PropertyChangeSupportThe instance that add support for firingPropertyChangeEventsand maintainingPropertyChangeListeners.Fields inherited from interface info.monitorenter.gui.chart.IRangePolicy
PROPERTY_RANGE, PROPERTY_RANGE_MAX, PROPERTY_RANGE_MIN -
Constructor Summary
ConstructorsConstructorDescriptionCreates a range policy with an unconfigured range (Range.RANGE_UNBOUNDED).ARangePolicy(Range range) Creates a range policy backed by the given range. -
Method Summary
Modifier and TypeMethodDescriptionfinal voidaddPropertyChangeListener(String propertyName, PropertyChangeListener listener) Adds a property change listener.booleanprotected final voidfirePropertyChange(String property, Object oldvalue, Object newvalue) Fires a property change event to the registered listeners.getPropertyChangeListeners(String property) Returns all property change listeners for the given property.final RangegetRange()Returns the internal range that is used to decide about the policy of displaying the chart.inthashCode()voidremovePropertyChangeListener(PropertyChangeListener listener, String property) Deregisters a property change listener that has been registerd for listening on the given property.voidremovePropertyChangeListener(String property, PropertyChangeListener listener) Removes a property change listener for listening on the given property.voidSets the internal range that is used to decide about the policy of displaying the chart.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface info.monitorenter.gui.chart.IRangePolicy
getMax, getMin
-
Field Details
-
m_propertyChangeSupport
The instance that add support for firingPropertyChangeEventsand maintainingPropertyChangeListeners.PropertyChangeListenerinstances.
-
-
Constructor Details
-
ARangePolicy
public ARangePolicy()Creates a range policy with an unconfigured range (Range.RANGE_UNBOUNDED). -
ARangePolicy
Creates a range policy backed by the given range.- Parameters:
range- the range that may be used to decide about the policy of displaying the range.
-
-
Method Details
-
addPropertyChangeListener
Adds a property change listener.- Specified by:
addPropertyChangeListenerin interfaceIRangePolicy- Parameters:
propertyName- The name of the property to listen on.listener- The PropertyChangeListener to be added.- See Also:
-
equals
-
firePropertyChange
Fires a property change event to the registered listeners.- Parameters:
property- one of thePROPERTY_XXXconstants defined in.ITrace2Doldvalue- the old value of the property.newvalue- the new value of the property.
-
getPropertyChangeListeners
Description copied from interface:IRangePolicyReturns all property change listeners for the given property.
- Specified by:
getPropertyChangeListenersin interfaceIRangePolicy- Parameters:
property- one of the constants with tehPROPERTY_prefix defined in this class or subclasses.- Returns:
- the property change listeners for the given property.
- See Also:
-
getRange
Returns the internal range that is used to decide about the policy of displaying the chart.- Specified by:
getRangein interfaceIRangePolicy- Returns:
- the internal range that may be taken into account for returning
bounds from
IRangePolicy.getMax(double, double)andIRangePolicy.getMax(double, double).
-
hashCode
public int hashCode() -
removePropertyChangeListener
Description copied from interface:IRangePolicyDeregisters a property change listener that has been registerd for listening on the given property.- Specified by:
removePropertyChangeListenerin interfaceIRangePolicy- Parameters:
listener- a listener that will only be informed if the property identified by the argumentpropertyNamechangesproperty- the property the listener was registered to.- See Also:
-
removePropertyChangeListener
Description copied from interface:IRangePolicyRemoves a property change listener for listening on the given property.
- Specified by:
removePropertyChangeListenerin interfaceIRangePolicy- Parameters:
property- one of the constants with tehPROPERTY_prefix defined in this class or subclasses.listener- the listener for this property change.- See Also:
-
setRange
Sets the internal range that is used to decide about the policy of displaying the chart.- Specified by:
setRangein interfaceIRangePolicy- Parameters:
range- the internal range that may be taken into account for returning bounds fromIRangePolicy.getMax(double, double)andIRangePolicy.getMax(double, double).
-