Examples of TextAnchor


Examples of com.hlcl.rql.as.TextAnchor

   */
  public Page getLinkRowByUrl(String url) throws RQLException {
    PageArrayList linkRows = getRows();
    for (int i = 0; i < linkRows.size(); i++) {
      Page rowPg = linkRows.getPage(i);
      TextAnchor anchor = rowPg.getTextAnchor(getParameter("linkTmpltElemName"));
      if (anchor.isUrlEquals(url)) {
        return rowPg;
      }
    }
    // signal not found
    return null;
View Full Code Here

Examples of com.positive.charts.util.TextAnchor

        if (tickLabel.equals(previousTickLabel)) {
          tickLabel = "";
        } else {
          previousTickLabel = tickLabel;
        }
        TextAnchor anchor = null;
        TextAnchor rotationAnchor = null;
        double angle = 0.0;
        if (this.isVerticalTickLabels()) {
          anchor = TextAnchor.CENTER_RIGHT;
          rotationAnchor = TextAnchor.CENTER_RIGHT;
          if (edge == RectangleEdge.TOP) {
View Full Code Here

Examples of com.positive.charts.util.TextAnchor

        if (formatter != null) {
          tickLabel = formatter.format(tickDate);
        } else {
          tickLabel = this.tickUnit.dateToString(tickDate);
        }
        TextAnchor anchor = null;
        TextAnchor rotationAnchor = null;
        double angle = 0.0;
        if (this.isVerticalTickLabels()) {
          anchor = TextAnchor.BOTTOM_CENTER;
          rotationAnchor = TextAnchor.BOTTOM_CENTER;
          if (edge == RectangleEdge.LEFT) {
View Full Code Here

Examples of com.positive.charts.util.TextAnchor

          tickLabel = formatter.format(currentTickValue);
        } else {
          tickLabel = this.getTickUnit().valueToString(
              currentTickValue);
        }
        TextAnchor anchor = null;
        TextAnchor rotationAnchor = null;
        double angle = 0.0;
        if (this.isVerticalTickLabels()) {
          anchor = TextAnchor.CENTER_RIGHT;
          rotationAnchor = TextAnchor.CENTER_RIGHT;
          if (edge == RectangleEdge.TOP) {
View Full Code Here

Examples of com.positive.charts.util.TextAnchor

        } else {
          tickLabel = this.getTickUnit().valueToString(
              currentTickValue);
        }

        TextAnchor anchor = null;
        TextAnchor rotationAnchor = null;
        double angle = 0.0;
        if (this.isVerticalTickLabels()) {
          if (edge == RectangleEdge.LEFT) {
            anchor = TextAnchor.BOTTOM_CENTER;
            rotationAnchor = TextAnchor.BOTTOM_CENTER;
View Full Code Here

Examples of org.jfree.chart.ui.TextAnchor

            Shape rotatedLabelBounds = t.createTransformedShape(labelBounds);
            labelBounds = rotatedLabelBounds.getBounds2D();
            double labelx = this.labelLocation.labelLocationX(dataArea);
            double labely = state.getCursor() - insets.getBottom()
                            - labelBounds.getHeight() / 2.0;
            TextAnchor anchor = this.labelLocation.labelAnchorH();
            TextUtilities.drawRotatedString(label, g2, (float) labelx,
                    (float) labely, anchor, getLabelAngle(), TextAnchor.CENTER);
            state.cursorUp(insets.getTop() + labelBounds.getHeight()
                    + insets.getBottom());
        }
        else if (edge == RectangleEdge.BOTTOM) {
            AffineTransform t = AffineTransform.getRotateInstance(
                    getLabelAngle(), labelBounds.getCenterX(),
                    labelBounds.getCenterY());
            Shape rotatedLabelBounds = t.createTransformedShape(labelBounds);
            labelBounds = rotatedLabelBounds.getBounds2D();
            double labelx = this.labelLocation.labelLocationX(dataArea);
            double labely = state.getCursor()
                            + insets.getTop() + labelBounds.getHeight() / 2.0;
            TextAnchor anchor = this.labelLocation.labelAnchorH();
            TextUtilities.drawRotatedString(label, g2, (float) labelx,
                    (float) labely, anchor, getLabelAngle(), TextAnchor.CENTER);
            state.cursorDown(insets.getTop() + labelBounds.getHeight()
                    + insets.getBottom());
        }
        else if (edge == RectangleEdge.LEFT) {
            AffineTransform t = AffineTransform.getRotateInstance(
                    getLabelAngle() - Math.PI / 2.0, labelBounds.getCenterX(),
                    labelBounds.getCenterY());
            Shape rotatedLabelBounds = t.createTransformedShape(labelBounds);
            labelBounds = rotatedLabelBounds.getBounds2D();
            double labelx = state.getCursor()
                            - insets.getRight() - labelBounds.getWidth() / 2.0;
            double labely = this.labelLocation.labelLocationY(dataArea);
            TextAnchor anchor = this.labelLocation.labelAnchorV();
            TextUtilities.drawRotatedString(label, g2, (float) labelx,
                    (float) labely, anchor, getLabelAngle() - Math.PI / 2.0,
                    anchor);
            state.cursorLeft(insets.getLeft() + labelBounds.getWidth()
                    + insets.getRight());
        }
        else if (edge == RectangleEdge.RIGHT) {
            AffineTransform t = AffineTransform.getRotateInstance(
                    getLabelAngle() + Math.PI / 2.0,
                    labelBounds.getCenterX(), labelBounds.getCenterY());
            Shape rotatedLabelBounds = t.createTransformedShape(labelBounds);
            labelBounds = rotatedLabelBounds.getBounds2D();
            double labelx = state.getCursor()
                            + insets.getLeft() + labelBounds.getWidth() / 2.0;
            double labely = this.labelLocation.labelLocationY(dataArea);
            TextAnchor anchor = this.labelLocation.labelAnchorV();
            TextUtilities.drawRotatedString(label, g2, (float) labelx,
                    (float) labely, anchor, getLabelAngle() + Math.PI / 2.0,
                    anchor);
            state.cursorRight(insets.getLeft() + labelBounds.getWidth()
                    + insets.getRight());
View Full Code Here

Examples of org.jfree.ui.TextAnchor

        }

        if (tickVal >= lowerBoundVal - SMALL_LOG_VALUE)
        {
          // tick value not below lowest data value
          final TextAnchor anchor;
          final TextAnchor rotationAnchor;
          double angle = 0.0;
          if (isVerticalTickLabels())
          {
            if (edge == RectangleEdge.LEFT)
            {
View Full Code Here

Examples of org.jfree.ui.TextAnchor

        }

        if (tickVal >= lowerBoundVal - SMALL_LOG_VALUE)
        {
          // tick value not below lowest data value
          final TextAnchor anchor;
          final TextAnchor rotationAnchor;
          double angle = 0.0;
          if (isVerticalTickLabels())
          {
            if (edge == RectangleEdge.LEFT)
            {
View Full Code Here

Examples of org.jfree.ui.TextAnchor

                        crosshair);
                RectangleAnchor anchor = crosshair.getLabelAnchor();
                Point2D pt = calculateLabelPoint(line, anchor, 5, 5);
                float xx = (float) pt.getX();
                float yy = (float) pt.getY();
                TextAnchor alignPt = textAlignPtForLabelAnchorH(anchor);
                Shape hotspot = TextUtilities.calculateRotatedStringBounds(
                        label, g2, xx, yy, alignPt, 0.0, TextAnchor.CENTER);
                if (!dataArea.contains(hotspot.getBounds2D())) {
                    anchor = flipAnchorV(anchor);
                    pt = calculateLabelPoint(line, anchor, 5, 5);
View Full Code Here

Examples of org.jfree.ui.TextAnchor

                        crosshair);
                RectangleAnchor anchor = crosshair.getLabelAnchor();
                Point2D pt = calculateLabelPoint(line, anchor, 5, 5);
                float xx = (float) pt.getX();
                float yy = (float) pt.getY();
                TextAnchor alignPt = textAlignPtForLabelAnchorV(anchor);
                Shape hotspot = TextUtilities.calculateRotatedStringBounds(
                        label, g2, xx, yy, alignPt, 0.0, TextAnchor.CENTER);
                if (!dataArea.contains(hotspot.getBounds2D())) {
                    anchor = flipAnchorH(anchor);
                    pt = calculateLabelPoint(line, anchor, 5, 5);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.