List of usage examples for org.jfree.chart.plot CategoryPlot getDomainGridlineStroke
public Stroke getDomainGridlineStroke()
From source file:edu.jhuapl.graphs.jfreechart.utils.SparselyLabeledCategoryAxis.java
private void drawDomainGridline(Graphics2D g2, CategoryPlot plot, Rectangle2D dataArea, double value) { Line2D line = null;// w w w. j a v a2 s .co m PlotOrientation orientation = plot.getOrientation(); if (orientation == PlotOrientation.HORIZONTAL) { line = new Line2D.Double(dataArea.getMinX(), value, dataArea.getMaxX(), value); } else if (orientation == PlotOrientation.VERTICAL) { line = new Line2D.Double(value, dataArea.getMinY(), value, dataArea.getMaxY()); } g2.setPaint(domainGridlinePaint); Stroke stroke = plot.getDomainGridlineStroke(); if (stroke == null) { stroke = CategoryPlot.DEFAULT_GRIDLINE_STROKE; } g2.setStroke(stroke); g2.draw(line); }