Example usage for org.jfree.chart.renderer.xy XYItemRenderer drawDomainMarker

List of usage examples for org.jfree.chart.renderer.xy XYItemRenderer drawDomainMarker

Introduction

In this page you can find the example usage for org.jfree.chart.renderer.xy XYItemRenderer drawDomainMarker.

Prototype

public void drawDomainMarker(Graphics2D g2, XYPlot plot, ValueAxis axis, Marker marker, Rectangle2D dataArea);

Source Link

Document

Draws the specified marker against the domain axis.

Usage

From source file:ucar.unidata.idv.control.chart.MyXYPlot.java

/**
 * Draws the domain markers (if any) for an axis and layer.  This method is
 * typically called from within the draw() method.
 *
 * @param g2  the graphics device./*w w w  . j  a v a 2  s .co m*/
 * @param dataArea  the data area.
 * @param index  the renderer index.
 * @param layer  the layer (foreground or background).
 */
protected void drawDomainMarkers(Graphics2D g2, Rectangle2D dataArea, int index, Layer layer) {

    XYItemRenderer r = getRenderer(index);
    if (r == null) {
        return;
    }

    Collection markers = getDomainMarkers(index, layer);
    ValueAxis axis = getDomainAxisForDataset(index);
    if ((markers != null) && (axis != null)) {
        Iterator iterator = markers.iterator();
        while (iterator.hasNext()) {
            Marker marker = (Marker) iterator.next();
            r.drawDomainMarker(g2, this, axis, marker, dataArea);
        }
    }

}