Class PlotWrapper.MyChartPanel

java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
org.jfree.chart.ChartPanel
ucar.unidata.idv.control.chart.PlotWrapper.MyChartPanel
All Implemented Interfaces:
ActionListener, MouseListener, MouseMotionListener, ImageObserver, MenuContainer, Printable, Serializable, EventListener, Accessible, org.jfree.chart.event.ChartChangeListener, org.jfree.chart.event.ChartProgressListener, org.jfree.chart.event.OverlayChangeListener
Enclosing class:
PlotWrapper

protected class PlotWrapper.MyChartPanel extends org.jfree.chart.ChartPanel
Class MyChartPanel adds items to a popup menu
Version:
$Revision: 1.15 $
Author:
IDV Development Team
See Also:
  • Field Details

    • lastEventX

      public int lastEventX
      Last x
    • lastEventY

      public int lastEventY
      Last y
  • Constructor Details

    • MyChartPanel

      public MyChartPanel(org.jfree.chart.JFreeChart chart)
      ctor
      Parameters:
      chart - the chart
  • Method Details

    • getToolTipText

      public String getToolTipText(MouseEvent event)
      Hook to pass through to the chartwrapper
      Overrides:
      getToolTipText in class org.jfree.chart.ChartPanel
      Parameters:
      event - The event
      Returns:
      The tooltip text
    • displayPopupMenu

      protected void displayPopupMenu(int x, int y)
      Show the popup menu. Add items if not done so.
      Overrides:
      displayPopupMenu in class org.jfree.chart.ChartPanel
      Parameters:
      x - x
      y - y
    • addChartMenuItem

      protected JMenuItem addChartMenuItem(JMenu result, String label, String cmd)
      utility
      Parameters:
      result - The menu
      label - The label
      cmd - The command
      Returns:
      The item
    • addChartMenuItems

      protected void addChartMenuItems(List items)
      add menu items
      Parameters:
      items - List of menu items
    • mouseDragged

      public void mouseDragged(MouseEvent event)
      Handle the event. Check with the ChartWrapper
      Specified by:
      mouseDragged in interface MouseMotionListener
      Overrides:
      mouseDragged in class org.jfree.chart.ChartPanel
      Parameters:
      event - The event
    • mouseReleased

      public void mouseReleased(MouseEvent event)
      Handle the event. Check with the ChartWrapper
      Specified by:
      mouseReleased in interface MouseListener
      Overrides:
      mouseReleased in class org.jfree.chart.ChartPanel
      Parameters:
      event - The event
    • mouseClicked

      public void mouseClicked(MouseEvent event)
      Handle the event. Check with the ChartWrapper
      Specified by:
      mouseClicked in interface MouseListener
      Overrides:
      mouseClicked in class org.jfree.chart.ChartPanel
      Parameters:
      event - The event
    • mousePressed

      public void mousePressed(MouseEvent event)
      Handle the event. Check with the ChartWrapper
      Specified by:
      mousePressed in interface MouseListener
      Overrides:
      mousePressed in class org.jfree.chart.ChartPanel
      Parameters:
      event - The event
    • actionPerformed

      public void actionPerformed(ActionEvent event)
      Handle the event. Check with the ChartWrapper
      Specified by:
      actionPerformed in interface ActionListener
      Overrides:
      actionPerformed in class org.jfree.chart.ChartPanel
      Parameters:
      event - the action