Example usage for org.jfree.chart.plot XYPlot getRangeMarkers

List of usage examples for org.jfree.chart.plot XYPlot getRangeMarkers

Introduction

In this page you can find the example usage for org.jfree.chart.plot XYPlot getRangeMarkers.

Prototype

public Collection getRangeMarkers(Layer layer) 

Source Link

Document

Returns the list of range markers (read only) for the specified layer.

Usage

From source file:ec.ui.view.ARPView.java

@Override
protected void onColorSchemeChange() {
    XYPlot plot = getPlot();
    plot.setBackgroundPaint(themeSupport.getPlotColor());
    plot.setDomainGridlinePaint(themeSupport.getGridColor());
    plot.setRangeGridlinePaint(themeSupport.getGridColor());
    chartPanel.getChart().setBackgroundPaint(themeSupport.getBackColor());

    plot.getRenderer().setBasePaint(themeSupport.getLineColor(KnownColor.BROWN));

    List<Marker> markers = new ArrayList<>();
    Collection rm = plot.getRangeMarkers(Layer.FOREGROUND);
    if (rm != null) {
        markers.addAll(rm);/*from   ww  w  .  j a v a2s . co  m*/
    }
    Collection dm = plot.getDomainMarkers(Layer.FOREGROUND);
    if (dm != null) {
        markers.addAll(dm);
    }
    for (Marker o : markers) {
        if (o instanceof ExtValueMarker) {
            ((ExtValueMarker) o).applyColorScheme(themeSupport);
        }
    }
}