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

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

Introduction

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

Prototype

public void setLabelAnchor(RectangleAnchor anchor) 

Source Link

Document

Sets the label anchor point and sends a property change event (with the name 'labelAnchor') 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);/*w w w . j  a va  2s. 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;
}