|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object info.monitorenter.gui.chart.rangepolicies.ARangePolicy
public abstract class ARangePolicy
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()
.
Field Summary | |
---|---|
protected java.beans.PropertyChangeSupport |
m_propertyChangeSupport
The instance that add support for firing PropertyChangeEvents
and maintaining PropertyChangeListeners . |
Fields inherited from interface info.monitorenter.gui.chart.IRangePolicy |
---|
PROPERTY_RANGE, PROPERTY_RANGE_MAX, PROPERTY_RANGE_MIN |
Constructor Summary | |
---|---|
ARangePolicy()
Creates a range policy with an unconfigured range ( Range.RANGE_UNBOUNDED ). |
|
ARangePolicy(Range range)
Creates a range policy backed by the given range. |
Method Summary | |
---|---|
void |
addPropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
Adds a property change listener. |
boolean |
equals(java.lang.Object obj)
|
protected void |
firePropertyChange(java.lang.String property,
java.lang.Object oldvalue,
java.lang.Object newvalue)
Fires a property change event to the registered listeners. |
java.beans.PropertyChangeListener[] |
getPropertyChangeListeners(java.lang.String property)
Returns all property change listeners for the given property. |
Range |
getRange()
Returns the internal range that is used to decide about the policy of displaying the chart. |
int |
hashCode()
|
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener,
java.lang.String property)
Deregisters a property change listener that has been registerd for listening on the given property. |
void |
removePropertyChangeListener(java.lang.String property,
java.beans.PropertyChangeListener listener)
Removes a property change listener for listening on the given property. |
void |
setRange(Range range)
Sets 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, wait |
Methods inherited from interface info.monitorenter.gui.chart.IRangePolicy |
---|
getMax, getMin |
Field Detail |
---|
protected java.beans.PropertyChangeSupport m_propertyChangeSupport
PropertyChangeEvents
and maintaining PropertyChangeListeners
.
PropertyChangeListener
instances.
Constructor Detail |
---|
public ARangePolicy()
Range.RANGE_UNBOUNDED
).
public ARangePolicy(Range range)
range
- the range that may be used to decide about the policy of
displaying the range.Method Detail |
---|
public final void addPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
addPropertyChangeListener
in interface IRangePolicy
propertyName
- The name of the property to listen on.listener
- The PropertyChangeListener to be added.ITrace2D.addPropertyChangeListener(java.lang.String,
java.beans.PropertyChangeListener)
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Object.equals(java.lang.Object)
protected final void firePropertyChange(java.lang.String property, java.lang.Object oldvalue, java.lang.Object newvalue)
property
- one of the PROPERTY_XXX
constants defined in
ITrace2D
.oldvalue
- the old value of the property.newvalue
- the new value of the property.public java.beans.PropertyChangeListener[] getPropertyChangeListeners(java.lang.String property)
IRangePolicy
Returns all property change listeners for the given property.
getPropertyChangeListeners
in interface IRangePolicy
property
- one of the constants with teh PROPERTY_
prefix
defined in this class or subclasses.
IRangePolicy.getPropertyChangeListeners(java.lang.String)
public final Range getRange()
getRange
in interface IRangePolicy
IRangePolicy.getMax(double, double)
and
IRangePolicy.getMax(double, double)
.public int hashCode()
hashCode
in class java.lang.Object
Object.hashCode()
public void removePropertyChangeListener(java.beans.PropertyChangeListener listener, java.lang.String property)
IRangePolicy
removePropertyChangeListener
in interface IRangePolicy
listener
- a listener that will only be informed if the property identified
by the argument propertyName
changesproperty
- the property the listener was registered to.IRangePolicy.removePropertyChangeListener(java.beans.PropertyChangeListener,
java.lang.String)
public void removePropertyChangeListener(java.lang.String property, java.beans.PropertyChangeListener listener)
IRangePolicy
Removes a property change listener for listening on the given property.
removePropertyChangeListener
in interface IRangePolicy
property
- one of the constants with teh PROPERTY_
prefix
defined in this class or subclasses.listener
- the listener for this property change.IRangePolicy.removePropertyChangeListener(java.lang.String,
java.beans.PropertyChangeListener)
public void setRange(Range range)
setRange
in interface IRangePolicy
range
- the internal range that may be taken into account for returning
bounds from IRangePolicy.getMax(double, double)
and
IRangePolicy.getMax(double, double)
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |