Package com.positive.charts.util

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


    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

    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

   *
   * @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

        }
        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

      }
      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

TOP

Related Classes of com.positive.charts.util.TextBlock

Copyright © 2018 www.massapicom. 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.