Class RangeFilter

All Implemented Interfaces:
PropertyChangeListener, EventListener, org.jfree.chart.annotations.Annotation, org.jfree.chart.annotations.XYAnnotation, Sharable

public class RangeFilter extends ChartAnnotation
Class RangeFilter is a greater than or less than value filter
Version:
$Revision: 1.18 $
Author:
IDV Development Team
  • Field Details

    • TYPE_LESSTHAN

      public static int TYPE_LESSTHAN
      Type
    • TYPE_GREATERTHAN

      public static int TYPE_GREATERTHAN
      Type
    • ANNOTATION_WIDTH

      public static final int ANNOTATION_WIDTH
      Arrow width
      See Also:
  • Constructor Details

    • RangeFilter

      public RangeFilter()
      Default ctor
    • RangeFilter

      public RangeFilter(double rangeValue, TimeSeriesChartWrapper timeseries)
      ctor
      Parameters:
      rangeValue - the value
      timeseries - the chart I'm in
  • Method Details

    • getToolTipText

      public String getToolTipText()
      Get the tool tip text
      Overrides:
      getToolTipText in class ChartAnnotation
      Returns:
      Tool tip text
    • doRemove

      public void doRemove()
      removed from the chart. Clear out the attached reference to me.
      Overrides:
      doRemove in class ChartAnnotation
    • getTypeName

      public String getTypeName()
      Type of annotation
      Specified by:
      getTypeName in class ChartAnnotation
      Returns:
      Type of annotation
    • valueOk

      public boolean valueOk(double value)
      Does the value pass the filter
      Parameters:
      value - The value
      Returns:
      Passes the filter
    • applyProperties

      protected boolean applyProperties()
      Apply the properties
      Overrides:
      applyProperties in class ChartAnnotation
      Returns:
      Success
    • getPropertiesComponents

      protected void getPropertiesComponents(List comps, int tabIdx)
      Create property left/right components
      Overrides:
      getPropertiesComponents in class ChartAnnotation
      Parameters:
      comps - List of components for properties dialog
      tabIdx - Which tab in the gui
    • setPosition

      public void setPosition(int x, int y)
      Set the position to the given x/y screen coordinate
      Overrides:
      setPosition in class ChartAnnotation
      Parameters:
      x - x
      y - y
    • setPosition

      public void setPosition(MouseEvent event)
      Set the position from the mouse
      Overrides:
      setPosition in class ChartAnnotation
      Parameters:
      event - mouse event
    • draw

      public void draw(Graphics2D g2, org.jfree.chart.plot.XYPlot plot, Rectangle2D dataArea, org.jfree.chart.axis.ValueAxis domainAxis, org.jfree.chart.axis.ValueAxis rangeAxis, int rendererIndex, org.jfree.chart.plot.PlotRenderingInfo info)
      Draws the annotation.
      Parameters:
      g2 - the graphics device.
      plot - the plot.
      dataArea - the data area.
      domainAxis - the domain axis.
      rangeAxis - the range axis.
      rendererIndex - the renderer index.
      info - an optional info object that will be populated with entity information.
    • setRangeValue

      public void setRangeValue(double value)
      Set the DomainValue property.
      Parameters:
      value - The new value for RangeValue
    • getRangeValue

      public double getRangeValue()
      Get the RangeValue property.
      Returns:
      The RangeValue
    • setType

      public void setType(int value)
      Set the Type property.
      Parameters:
      value - The new value for Type
    • getType

      public int getType()
      Get the Type property.
      Returns:
      The Type
    • doMakeAttached

      public RangeFilter doMakeAttached(MouseEvent event)
      Make the attached, but opposite, range filter
      Parameters:
      event - The event
      Returns:
      The attached range filter positioned near me.
    • setAttached

      public void setAttached(RangeFilter value)
      Set the Attached property.
      Parameters:
      value - The new value for Attached
    • getAttached

      public RangeFilter getAttached()
      Get the Attached property.
      Returns:
      The Attached
    • addChangeListener

      public void addChangeListener(org.jfree.chart.event.AnnotationChangeListener arg0)
    • removeChangeListener

      public void removeChangeListener(org.jfree.chart.event.AnnotationChangeListener arg0)