info.monitorenter.gui.chart.rangepolicies
Class RangePolicyHighestValues

java.lang.Object
  extended by info.monitorenter.gui.chart.rangepolicies.ARangePolicy
      extended by info.monitorenter.gui.chart.rangepolicies.RangePolicyHighestValues
All Implemented Interfaces:
IRangePolicy, java.io.Serializable

public final class RangePolicyHighestValues
extends ARangePolicy

Range policy implementation that will force a viewport that only shows the highest values that are in the range of maximum - x.

Version:
$Revision: 1.8 $
Author:
zoola, Achim Westermann
See Also:
Serialized Form

Field Summary
 
Fields inherited from class info.monitorenter.gui.chart.rangepolicies.ARangePolicy
m_propertyChangeSupport
 
Fields inherited from interface info.monitorenter.gui.chart.IRangePolicy
PROPERTY_RANGE, PROPERTY_RANGE_MAX, PROPERTY_RANGE_MIN
 
Constructor Summary
RangePolicyHighestValues()
          Creates a range policy with an unconfigured range ( Range.RANGE_UNBOUNDED) that will show the 50 hightest values.
RangePolicyHighestValues(int amountHighestValues)
          Creates a range policy with an unconfigured range ( Range.RANGE_UNBOUNDED) that will show the given amount of highest values.
RangePolicyHighestValues(Range range, double highestValueRangeToShow)
          Constructor with a range and the value range for the highest values to show only.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 double getMax(double chartMin, double chartMax)
          Returns the maximum of the chart always.
 double getMin(double chartMin, double chartMax)
          Returns the maximum of the chart - interal highestValueRangeToShow or chartMin if greater.
 int hashCode()
           
 
Methods inherited from class info.monitorenter.gui.chart.rangepolicies.ARangePolicy
addPropertyChangeListener, firePropertyChange, getPropertyChangeListeners, getRange, removePropertyChangeListener, removePropertyChangeListener, setRange
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RangePolicyHighestValues

public RangePolicyHighestValues()
Creates a range policy with an unconfigured range ( Range.RANGE_UNBOUNDED) that will show the 50 hightest values.


RangePolicyHighestValues

public RangePolicyHighestValues(int amountHighestValues)
Creates a range policy with an unconfigured range ( Range.RANGE_UNBOUNDED) that will show the given amount of highest values.

Parameters:
amountHighestValues - the amount of highest values to show.

RangePolicyHighestValues

public RangePolicyHighestValues(Range range,
                                double highestValueRangeToShow)
Constructor with a range and the value range for the highest values to show only.

Parameters:
range - unused, maximum bound is always returned.
highestValueRangeToShow - the value range for the highest values to show.
Method Detail

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class ARangePolicy
See Also:
Object.equals(java.lang.Object)

getMax

public double getMax(double chartMin,
                     double chartMax)
Returns the maximum of the chart always.

Parameters:
chartMin - ignored.
chartMax - returned always.
Returns:
Returns the maximum of the chart always.
See Also:
IRangePolicy.getMax(double, double)

getMin

public double getMin(double chartMin,
                     double chartMax)
Returns the maximum of the chart - interal highestValueRangeToShow or chartMin if greater.

Parameters:
chartMin - used for return value if chartMax - highestValuesToShow is smaller than this minimum of the chart.
chartMax - upper bound to compute down to the start of the latest highest values.
Returns:
the maximum of the chart - interal highestValueRangeToShow or chartMin if greater.
See Also:
IRangePolicy.getMin(double, double)

hashCode

public int hashCode()
Overrides:
hashCode in class ARangePolicy
See Also:
Object.hashCode()


Copyright © 2001 - 2010 LGPL, All Rights Footloose.