Examples of TextBlock


Examples of com.positive.charts.util.TextBlock

   *            the text.
   */
  public TextBox(final String text) {
    this((TextBlock) null);
    if (text != null) {
      this.textBlock = new TextBlock();

      this.textBlock.addLine(text, PiePlot.DEFAULT_LABEL_FONT,
          PiePlot.DEFAULT_LABEL_PAINT);
    }
  }
View Full Code Here

Examples of com.positive.charts.util.TextBlock

    final double verticalLinkRadius = state.getLinkArea().height / 2.0;
    for (int i = 0; i < leftKeys.getItemCount(); i++) {
      final String label = this.labelGenerator.generateSectionLabel(
          this.dataset, leftKeys.getKey(i));
      if (label != null) {
        final TextBlock block = TextUtilities.createTextBlock(label,
            this.labelFont, this.labelPaint);
        final TextBox labelBox = new TextBox(block);
        labelBox.setBackgroundPaint(this.labelBackgroundPaint);
        labelBox.setOutlinePaint(this.labelOutlinePaint);
        labelBox.setOutlineStroke(this.labelOutlineStroke);
View Full Code Here

Examples of com.positive.charts.util.TextBlock

    for (int i = 0; i < keys.getItemCount(); i++) {
      final String label = this.labelGenerator.generateSectionLabel(
          this.dataset, keys.getKey(i));

      if (label != null) {
        final TextBlock block = TextUtilities.createTextBlock(label,
            this.labelFont, this.labelPaint);
        final TextBox labelBox = new TextBox(block);
        labelBox.setBackgroundPaint(this.labelBackgroundPaint);
        labelBox.setOutlinePaint(this.labelOutlinePaint);
        labelBox.setOutlineStroke(this.labelOutlineStroke);
View Full Code Here

Examples of com.positive.charts.util.TextBlock

   *
   * @return A label.
   */
  protected TextBlock createLabel(final Comparable category,
      final float width, final RectangleEdge edge, final GC g2) {
    final TextBlock label = TextUtilities.createTextBlock(category
        .toString(), this.getTickLabelFont(category), this
        .getTickLabelPaint(category), width,
        this.maximumCategoryLabelLines, new G2TextMeasurer(g2));
    return label;
  }
View Full Code Here

Examples of com.positive.charts.util.TextBlock

        }
        final Rectangle area = RectangleUtil.Double(x0, y0, (x1 - x0),
            (y1 - y0));
        final Point anchorPoint = RectangleAnchor.coordinates(area,
            position.getCategoryAnchor());
        final TextBlock block = tick.getLabel();
        block.draw(g2, anchorPoint.x, anchorPoint.y, position
            .getLabelAnchor(), 0, 0, position.getAngle());
        final Rectangle bounds = block.calculateBounds(g2,
            anchorPoint.x, anchorPoint.y,
            position.getLabelAnchor(), anchorPoint.x,
            anchorPoint.y, position.getAngle());

        if ((plotState != null) && (plotState.getOwner() != null)) {
View Full Code Here

Examples of com.positive.charts.util.TextBlock

      }
      int categoryIndex = 0;
      final Iterator iterator = categories.iterator();
      while (iterator.hasNext()) {
        final Comparable category = (Comparable) iterator.next();
        final TextBlock label = this.createLabel(category, l * r, edge,
            g2);
        if ((edge == RectangleEdge.TOP)
            || (edge == RectangleEdge.BOTTOM)) {
          max = Math.max(max, this.calculateTextBlockHeight(label,
              position, g2));
View Full Code Here

Examples of com.puppycrawl.tools.checkstyle.api.TextBlock

  }

  private String getSince(DetailAST ast) {
    String since = classSince;
    final FileContents contents = getFileContents();
    final TextBlock javadoc = contents.getJavadocBefore(ast.getLineNo());
    if (null != javadoc) {
      for (String line : javadoc.getText()) {
        int index = line.indexOf("@since");
        if (index >= 0) {
          since = line.substring(index + 6).trim();
        }
      }
View Full Code Here

Examples of com.puppycrawl.tools.checkstyle.api.TextBlock

    @Override
    public void visitToken(DetailAST aAST)
    {
        final FileContents contents = getFileContents();
        final int lineNo = aAST.getLineNo();
        final TextBlock cmt =
            contents.getJavadocBefore(lineNo);
        if (cmt == null) {
            log(lineNo, "type.missingTag", mTag);
        }
        else {
            checkTag(lineNo, cmt.getText(), mTag, mTagRE, mTagFormatRE,
                mTagFormat);
        }
    }
View Full Code Here

Examples of com.puppycrawl.tools.checkstyle.api.TextBlock

    public void visitToken(DetailAST aAST)
    {
        if (shouldCheck(aAST)) {
            final FileContents contents = getFileContents();
            final int lineNo = aAST.getLineNo();
            final TextBlock cmt = contents.getJavadocBefore(lineNo);
            if (cmt == null) {
                log(lineNo, "javadoc.missing");
            }
            else if (ScopeUtils.isOuterMostType(aAST)) {
                // don't check author/version for inner classes
View Full Code Here

Examples of com.puppycrawl.tools.checkstyle.api.TextBlock

    @Override
    public void visitToken(DetailAST aAST)
    {
        if (shouldCheck(aAST)) {
            final FileContents contents = getFileContents();
            final TextBlock cmt =
                contents.getJavadocBefore(aAST.getLineNo());

            if (cmt == null) {
                log(aAST, "javadoc.missing");
            }
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.