Logo Search packages:      
Sourcecode: libjfreechart-java version File versions  Download package

Point2D org::jfree::chart::renderer::xy::AbstractXYItemRenderer::calculateDomainMarkerTextAnchorPoint ( Graphics2D  g2,
PlotOrientation  orientation,
Rectangle2D  dataArea,
Rectangle2D  markerArea,
RectangleInsets  markerOffset,
LengthAdjustmentType  labelOffsetType,
RectangleAnchor  anchor 
) [inline, protected, inherited]

Calculates the (x, y) coordinates for drawing a marker label.

Parameters:
g2 the graphics device.
orientation the plot orientation.
dataArea the data area.
markerArea the rectangle surrounding the marker area.
markerOffset the marker label offset.
labelOffsetType the label offset type.
anchor the label anchor.
Returns:
The coordinates for drawing the marker label.

Definition at line 1186 of file AbstractXYItemRenderer.java.

References org::jfree::chart::plot::PlotOrientation::HORIZONTAL, and org::jfree::chart::plot::PlotOrientation::VERTICAL.

Referenced by org::jfree::chart::renderer::xy::AbstractXYItemRenderer::drawDomainMarker().

                                    {

        Rectangle2D anchorRect = null;
        if (orientation == PlotOrientation.HORIZONTAL) {
            anchorRect = markerOffset.createAdjustedRectangle(markerArea,
                    LengthAdjustmentType.CONTRACT, labelOffsetType);
        }
        else if (orientation == PlotOrientation.VERTICAL) {
            anchorRect = markerOffset.createAdjustedRectangle(markerArea,
                    labelOffsetType, LengthAdjustmentType.CONTRACT);
        }
        return RectangleAnchor.coordinates(anchorRect, anchor);

    }


Generated by  Doxygen 1.6.0   Back to index