Package info.monitorenter.gui.chart
Interface IRangePolicy
-
- All Superinterfaces:
java.io.Serializable
- All Known Implementing Classes:
ARangePolicy,RangePolicyFixedViewport,RangePolicyForcedPoint,RangePolicyHighestValues,RangePolicyHighestValuesForcedMin,RangePolicyMinimumViewport,RangePolicyUnbounded
public interface IRangePolicy extends java.io.SerializableAn interface that allows an axis to be plugged with a range policy.Implementations may limit the range of the underlying Chart2D's data (clipping / zooming), increase it (void space offset), guarantee a minimum viewport... .
Property Change events
propertyoldValuenewValueoccurrence PROPERTY_RANGEthat changedRange, the new valueRangeFired if any bound of the range changed (min or max). PROPERTY_RANGE_MAX, the old max value of the range.Double, the new max value of the range.RangePROPERTY_RANGE_MIN, the old min value of the range.Double, the new min value of the range.Range- Version:
- $Revision: 1.9 $
- Author:
- Achim Westermann
- See Also:
AAxis
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringPROPERTY_RANGEThe property key defining a change of theminor themaxproperty.static java.lang.StringPROPERTY_RANGE_MAXThe property key defining themaxproperty.static java.lang.StringPROPERTY_RANGE_MINThe property key defining theminproperty.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)Registers a property change listener that will be informed about changes of the property identified by the givenpropertyName.doublegetMax(double chartMin, double chartMax)Define the upper bound of the Chart2D's value range.doublegetMin(double chartMin, double chartMax)Define the lower bound of the Chart2D's value range.java.beans.PropertyChangeListener[]getPropertyChangeListeners(java.lang.String property)Returns all property change listeners for the given property.RangegetRange()Get the range of this range policy.voidremovePropertyChangeListener(java.beans.PropertyChangeListener listener, java.lang.String property)Deregisters a property change listener that has been registerd for listening on the given property.voidremovePropertyChangeListener(java.lang.String property, java.beans.PropertyChangeListener listener)Removes a property change listener for listening on the given property.voidsetRange(Range range)Set the range of this RangePolicy.
-
-
-
Field Detail
-
PROPERTY_RANGE
static final java.lang.String PROPERTY_RANGE
The property key defining a change of theminor themaxproperty.Use in combination with
addPropertyChangeListener(String, PropertyChangeListener).- See Also:
- Constant Field Values
-
PROPERTY_RANGE_MAX
static final java.lang.String PROPERTY_RANGE_MAX
The property key defining themaxproperty.Use in combination with
addPropertyChangeListener(String, PropertyChangeListener).- See Also:
- Constant Field Values
-
PROPERTY_RANGE_MIN
static final java.lang.String PROPERTY_RANGE_MIN
The property key defining theminproperty.Use in combination with
addPropertyChangeListener(String, PropertyChangeListener).- See Also:
- Constant Field Values
-
-
Method Detail
-
addPropertyChangeListener
void addPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)Registers a property change listener that will be informed about changes of the property identified by the givenpropertyName.- Parameters:
propertyName- the name of the property the listener is interested inlistener- a listener that will only be informed if the property identified by the argumentpropertyNamechanges
-
getMax
double getMax(double chartMin, double chartMax)Define the upper bound of the Chart2D's value range. Depends on theAAxisthis instance is bound to.- Parameters:
chartMin- the minimum value of the connected Chart2D that may / should be taken into account.chartMax- the maximum value of the connected Chart2D that may / should be taken into account.- Returns:
- the maximum value (upper bound) for the Chart2D to display.
-
getMin
double getMin(double chartMin, double chartMax)Define the lower bound of the Chart2D's value range. Depends on theAAxisthis instance is bound to.- Parameters:
chartMin- the minimum value of the connected Chart2D that may / should be taken into account.chartMax- the maximum value of the connected Chart2D that may / should be taken into account.- Returns:
- the minimum value (lower bound) for the Chart2D to display.
-
getPropertyChangeListeners
java.beans.PropertyChangeListener[] getPropertyChangeListeners(java.lang.String property)
Returns all property change listeners for the given property.
- Parameters:
property- one of the constants with tehPROPERTY_prefix defined in this class or subclasses.- Returns:
- the property change listeners for the given property.
-
getRange
Range getRange()
Get the range of this range policy.- Returns:
- he range of this range policy
-
removePropertyChangeListener
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.- Parameters:
listener- a listener that will only be informed if the property identified by the argumentpropertyNamechangesproperty- the property the listener was registered to.
-
removePropertyChangeListener
void removePropertyChangeListener(java.lang.String property, java.beans.PropertyChangeListener listener)Removes a property change listener for listening on the given property.
- Parameters:
property- one of the constants with tehPROPERTY_prefix defined in this class or subclasses.listener- the listener for this property change.
-
setRange
void setRange(Range range)
Set the range of this RangePolicy.- Parameters:
range- the Range for the range policy.
-
-