Class WayPoint

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

public class WayPoint extends ChartAnnotation
Class WayPoint is used in the time series chart to show a way point along the time domain
Version:
$Revision: 1.22 $
Author:
IDV Development Team
  • Field Details

    • PROP_WAYPOINTVALUE

      public static final String PROP_WAYPOINTVALUE
      Used for property changed when waypoint is moved
      See Also:
    • ANNOTATION_WIDTH

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

    • WayPoint

      public WayPoint()
      Default ctor
    • WayPoint

      public WayPoint(double domainValue, TimeSeriesChartWrapper timeseries)
      Ctor
      Parameters:
      domainValue - The domain value
      timeseries - The chart I'm in
  • Method Details

    • getMidiManager

      public MidiManager getMidiManager()
      Create, if needed, and return the midimanager that plays sounds
      Returns:
      The midi manager
    • getToolTipText

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

      public String getTypeName()
      Type of annotation
      Specified by:
      getTypeName in class ChartAnnotation
      Returns:
      Type of annotation
    • 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
    • getColorToUse

      public Color getColorToUse()
      What color should we use. If selected use the selected color
      Returns:
      The color
    • showColorInProperties

      protected boolean showColorInProperties()
      Should the color swatch be shown in the properties dialog
      Overrides:
      showColorInProperties in class ChartAnnotation
      Returns:
      Show color in properties
    • getPropertyTabs

      public String[] getPropertyTabs()
      return the array of tab names for the proeprties dialog
      Overrides:
      getPropertyTabs in class PropertiedThing
      Returns:
      array of tab names
    • getPropertiesComponents

      protected void getPropertiesComponents(List comps, int tabIdx)
      Add to properties gui
      Overrides:
      getPropertiesComponents in class ChartAnnotation
      Parameters:
      comps - List of comps
      tabIdx - Which tab in the properties dialog
    • canPlaySound

      public boolean canPlaySound()
      Can the waypoint play sound
      Returns:
      Can this waypoint play sound
    • applyProperties

      protected boolean applyProperties()
      Apply properties
      Overrides:
      applyProperties in class ChartAnnotation
      Returns:
      success
    • 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.
    • getXFromValue

      protected int getXFromValue(Rectangle2D dataArea, org.jfree.chart.axis.ValueAxis domainAxis)
      Get the x position from the domain value
      Parameters:
      dataArea - data area
      domainAxis - domain axis
      Returns:
      The x value
    • setDomainValue

      public void setDomainValue(double value)
      Set the DomainValue property.
      Parameters:
      value - The new value for DomainValue
    • getDomainValue

      public double getDomainValue()
      Get the DomainValue property.
      Returns:
      The DomainValue
    • setIsForAnimation

      public void setIsForAnimation(boolean value)
      Set the IsForAnimation property.
      Parameters:
      value - The new value for IsForAnimation
    • getIsForAnimation

      public boolean getIsForAnimation()
      Get the IsForAnimation property.
      Returns:
      The IsForAnimation
    • setMinutesSpan

      public void setMinutesSpan(double value)
      Set the MinutesSpan property.
      Parameters:
      value - The new value for MinutesSpan
    • getMinutesSpan

      public double getMinutesSpan()
      Get the MinutesSpan property.
      Returns:
      The MinutesSpan
    • setMidiProperties

      public void setMidiProperties(MidiProperties value)
      Set the MidiProperties property.
      Parameters:
      value - The new value for MidiProperties
    • getMidiProperties

      public MidiProperties getMidiProperties()
      Get the MidiProperties property.
      Returns:
      The MidiProperties
    • addChangeListener

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

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