Example usage for org.jfree.chart.entity AxisEntity getAxis

List of usage examples for org.jfree.chart.entity AxisEntity getAxis

Introduction

In this page you can find the example usage for org.jfree.chart.entity AxisEntity getAxis.

Prototype

public Axis getAxis() 

Source Link

Document

Returns the axis that occupies the entity area.

Usage

From source file:org.cds06.speleograph.GraphPanel.java

/**
 * Callback method when click on a graph location.
 *
 * @param event information about the event.
 *///from  w  w  w  .j a  v  a  2s  . c  om
@Override
public void chartMouseClicked(ChartMouseEvent event) {

    if (event.getEntity() instanceof AxisEntity) {
        AxisEntity entity = (AxisEntity) event.getEntity();
        if (event.getTrigger().getButton() == MouseEvent.BUTTON1 && event.getTrigger().getClickCount() == 2) {
            if (entity.getAxis() instanceof NumberAxis)
                editNumberAxis((NumberAxis) entity.getAxis());
            else if (entity.getAxis() instanceof DateAxis)
                editDateAxis();
        }
    }
}