Example usage for org.jfree.chart.plot Crosshair setLabelGenerator

List of usage examples for org.jfree.chart.plot Crosshair setLabelGenerator

Introduction

In this page you can find the example usage for org.jfree.chart.plot Crosshair setLabelGenerator.

Prototype

public void setLabelGenerator(CrosshairLabelGenerator generator) 

Source Link

Document

Sets the crosshair label generator and sends a property change event (with the name 'labelGenerator') to all registered listeners.

Usage

From source file:org.glotaran.core.datadisplayers.multispec.MultiSpecEditorTopComponent.java

private Crosshair createCroshair(Color crhColor, ImageCrosshairLabelGenerator lebelGenereator) {
    Crosshair crosshair = new Crosshair(0.0);
    crosshair.setPaint(crhColor);/*from   w ww.j a v  a  2  s .  c o m*/
    if (lebelGenereator != null) {
        crosshair.setLabelGenerator(lebelGenereator);
    }
    crosshair.setLabelVisible(true);
    crosshair.setLabelAnchor(RectangleAnchor.BOTTOM_RIGHT);
    crosshair.setLabelBackgroundPaint(new Color(255, 255, 0, 100));
    return crosshair;
}