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

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

Introduction

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

Prototype

public void setLabelVisible(boolean visible) 

Source Link

Document

Sets the flag that controls whether or not a label is drawn for the crosshair and sends a property change event (with the name 'labelVisible') 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 ww w .  j av a2s. c om*/
    if (lebelGenereator != null) {
        crosshair.setLabelGenerator(lebelGenereator);
    }
    crosshair.setLabelVisible(true);
    crosshair.setLabelAnchor(RectangleAnchor.BOTTOM_RIGHT);
    crosshair.setLabelBackgroundPaint(new Color(255, 255, 0, 100));
    return crosshair;
}