afreechart/src/main/java/org/afree/chart/axis/CategoryAxis3D.java
/**
     * Draws the axis on a graphics device (such as the screen or a
     * printer).
     *
     * @param canvas  the graphics device (<code>null</code> not permitted).
     * @param cursor  the cursor location.
     * @param plotArea  the area within which the axis should be drawn
     *                  (<code>null</code> not permitted).
     * @param dataArea  the area within which the plot is being drawn
     *                  (<code>null</code> not permitted).
     * @param edge  the location of the axis (<code>null</code> not permitted).
     * @param plotState  collects information about the plot (<code>null</code>
     *                   permitted).
     *
     * @return The axis state (never <code>null</code>).
     */
Draws the axis on a graphics device (such as the screen or a
printer).

@param canvas  the graphics device (null not permitted).
@param cursor  the cursor location.
@param plotArea  the area within which the axis should be drawn
(null not permitted).
@param dataArea  the area within which the plot is being drawn
(null not permitted).
@param edge  the location of the axis (null not permitted).
@param plotState  collects information about the plot (null
permitted).

@return The axis state (never null).
Draws the axis on a graphics device ( such as the screen or a printer ) . @param canvas the graphics device ( null not permitted ) . @param cursor the cursor location . @param plotArea the area within which the axis should be drawn ( null not permitted ) . @param dataArea the area within which the plot is being drawn ( null not permitted ) . @param edge the location of the axis ( null not permitted ) . @param plotState collects information about the plot ( null permitted ) . @return The axis state ( never null ) .
public AxisState draw(Canvas canvas,
                          double cursor,
                          RectShape plotArea,
                          RectShape dataArea,
                          RectangleEdge edge,
                          PlotRenderingInfo plotState) {
        if (!isVisible()) {
            return new AxisState(cursor);
        }
        CategoryPlot plot = (CategoryPlot) getPlot();
        RectShape adjustedDataArea = new RectShape();
        if (plot.getRenderer() instanceof Effect3D) {
            Effect3D e3D = (Effect3D) plot.getRenderer();
            double adjustedX = dataArea.getMinX();
            double adjustedY = dataArea.getMinY();
            double adjustedW = dataArea.getWidth() - e3D.getXOffset();
            double adjustedH = dataArea.getHeight() - e3D.getYOffset();
            if (edge == RectangleEdge.LEFT || edge == RectangleEdge.BOTTOM) {
                adjustedY += e3D.getYOffset();
            }
            else if (edge == RectangleEdge.RIGHT || edge == RectangleEdge.TOP) {
                adjustedX += e3D.getXOffset();
            }
            adjustedDataArea.setRect(adjustedX, adjustedY, adjustedW,
                    adjustedH);
        }
        else {
            adjustedDataArea.setRect(dataArea);
        }
        if (isAxisLineVisible()) {
            drawAxisLine(canvas, cursor, adjustedDataArea, edge);
        }
        AxisState state = new AxisState(cursor);
        if (isTickMarksVisible()) {
            drawTickMarks(canvas, cursor, adjustedDataArea, edge, state);
        }
        state = drawCategoryLabels(canvas, plotArea, adjustedDataArea, edge,
                state, plotState);
        state = drawLabel(getLabel(), canvas, plotArea, dataArea, edge, state);
        return state;
    }
public AxisState draw ( Canvas canvas , double cursor , RectShape plotArea , RectShape dataArea , RectangleEdge edge , PlotRenderingInfo plotState ) { if ( ! isVisible ( ) ) { return new AxisState ( cursor ) ; } CategoryPlot plot = ( CategoryPlot ) getPlot ( ) ; RectShape adjustedDataArea = new RectShape ( ) ; if ( plot . getRenderer ( ) instanceof Effect3D ) { Effect3D e3D = ( Effect3D ) plot . getRenderer ( ) ; double adjustedX = dataArea . getMinX ( ) ; double adjustedY = dataArea . getMinY ( ) ; double adjustedW = dataArea . getWidth ( ) - e3D . getXOffset ( ) ; double adjustedH = dataArea . getHeight ( ) - e3D . getYOffset ( ) ; if ( edge == RectangleEdge . LEFT || edge == RectangleEdge . BOTTOM ) { adjustedY += e3D . getYOffset ( ) ; } else if ( edge == RectangleEdge . RIGHT || edge == RectangleEdge . TOP ) { adjustedX += e3D . getXOffset ( ) ; } adjustedDataArea . setRect ( adjustedX , adjustedY , adjustedW , adjustedH ) ; } else { adjustedDataArea . setRect ( dataArea ) ; } if ( isAxisLineVisible ( ) ) { drawAxisLine ( canvas , cursor , adjustedDataArea , edge ) ; } AxisState state = new AxisState ( cursor ) ; if ( isTickMarksVisible ( ) ) { drawTickMarks ( canvas , cursor , adjustedDataArea , edge , state ) ; } state = drawCategoryLabels ( canvas , plotArea , adjustedDataArea , edge , state , plotState ) ; state = drawLabel ( getLabel ( ) , canvas , plotArea , dataArea , edge , state ) ; return state ; }
Draws the axis on a graphics device (such as the screen or a
 printer).
Draws the axis on a graphics device ( such as the screen or a printer ) .
// if the axis is not visible, don't draw it... // calculate the adjusted data area taking into account the 3D effect... // this assumes that there is a 3D renderer, all this 3D effect is a // bit of an ugly hack... // draw the category labels and axis label