Example usage for org.jfree.chart ContextAwareChartPanel setCursor

List of usage examples for org.jfree.chart ContextAwareChartPanel setCursor

Introduction

In this page you can find the example usage for org.jfree.chart ContextAwareChartPanel setCursor.

Prototype

public void setCursor(Cursor cursor) 

Source Link

Document

Sets the cursor image to the specified cursor.

Usage

From source file:net.sf.maltcms.chromaui.chromatogram1Dviewer.ui.panel.Chromatogram1DViewPanel.java

/**
 * Creates new form Chromatogram1DViewPanel
 *//*from   w w  w.  j  av a2s.  c o  m*/
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);
}