List of usage examples for org.jfree.chart ContextAwareChartPanel setPopupMenuActionProvider
public void setPopupMenuActionProvider(IActionProvider actionProvider)
From source file:net.sf.maltcms.chromaui.chromatogram1Dviewer.ui.panel.Chromatogram1DViewPanel.java
/** * Creates new form Chromatogram1DViewPanel *///from ww w . ja v a 2s .com public Chromatogram1DViewPanel(InstanceContent topComponentInstanceContent, Lookup tcLookup, ADataset1D<IChromatogram1D, IScan> ds) { initComponents(); this.content = topComponentInstanceContent; this.lookup = tcLookup; chart = new JFreeChart(new XYPlot()); ContextAwareChartPanel chartPanel = new ContextAwareChartPanel(chart, true, true, true, true, true); Cursor crosshairCursor = new Cursor(Cursor.CROSSHAIR_CURSOR); chartPanel.setCursor(crosshairCursor); chartPanel.setInitialDelay(100); chartPanel.setDismissDelay(30000); chartPanel.setReshowDelay(0); chartPanel.setFocusable(true); chartPanel.setMouseWheelEnabled(true); chartPanel.setPopupMenuActionProvider(new ActionProvider()); addKeyListener(this); this.chartPanel = chartPanel; add(chartPanel, BorderLayout.CENTER); content.add(chartPanel); }