/** * Draws the axis on a Java 2D graphics device (such as the screen or a * printer). * * @param g2 the graphics device ({@code null} not permitted). * @param cursor the cursor location. * @param plotArea the area within which the plot and axes should be drawn * ({@code null} not permitted). * @param dataArea the area within which the data should be drawn * ({@code null} not permitted). * @param edge the axis location ({@code null} not permitted). * @param plotState collects information about the plot * ({@code null} permitted). * * @return The axis state (never {@code null}). */ @Override public AxisState draw(Graphics2D g2, double cursor, Rectangle2D plotArea, Rectangle2D dataArea, RectangleEdge edge, PlotRenderingInfo plotState) { AxisState info = new AxisState(cursor); if (isVisible()) { info = super.draw(g2, cursor, plotArea, dataArea, edge, plotState); } if (this.gridBandsVisible) { drawGridBands(g2, plotArea, dataArea, edge, info.getTicks()); } return info; }
if (isVisible()) { info = super.draw(g2, cursor, plotArea, dataArea, edge, plotState);