Package com.positive.charts.entity

Examples of com.positive.charts.entity.StandardEntityCollection


    EntityBlockParams ebp = null;
    final BlockResult r = new BlockResult();
    if (params instanceof EntityBlockParams) {
      ebp = (EntityBlockParams) params;
      if (ebp.getGenerateEntities()) {
        final EntityCollection ec = new StandardEntityCollection();
        final LegendItemEntity entity = new LegendItemEntity(
            new Rectangle(area.x, area.y, area.width, area.height));
        entity.setSeriesIndex(this.series);
        entity.setSeriesKey(this.seriesKey);
        entity.setDataset(this.dataset);
        entity.setToolTipText(this.getToolTipText());
        entity.setURLText(this.getURLText());
        ec.add(entity);
        r.setEntityCollection(ec);
      }
    }
    return r;
  }
View Full Code Here


   * @return An instance of {@link EntityBlockResult}, or <code>null</code>.
   */
  public Object draw(final GC g2, final Rectangle area, final Object params) {
    // check if we need to collect chart entities from the container
    EntityBlockParams ebp = null;
    StandardEntityCollection sec = null;
    if (params instanceof EntityBlockParams) {
      ebp = (EntityBlockParams) params;
      if (ebp.getGenerateEntities()) {
        sec = new StandardEntityCollection();
      }
    }
    Rectangle contentArea = new Rectangle(area.x, area.y, area.width,
        area.height);
    contentArea = this.trimMargin(contentArea);
    this.drawBorder(g2, contentArea);
    contentArea = this.trimBorder(contentArea);
    contentArea = this.trimPadding(contentArea);
    final Iterator iterator = this.blocks.iterator();
    while (iterator.hasNext()) {
      final Block block = (Block) iterator.next();
      final Rectangle bounds = block.getBounds();
      final Rectangle drawArea = RectUtils.doubleRect(bounds.x + area.x,
          bounds.y + area.y, bounds.width, bounds.height);
      final Object r = block.draw(g2, drawArea, params);
      if (sec != null) {
        if (r instanceof EntityBlockResult) {
          final EntityBlockResult ebr = (EntityBlockResult) r;
          final EntityCollection ec = ebr.getEntityCollection();
          sec.addAll(ec);
        }
      }
    }
    BlockResult result = null;
    if (sec != null) {
View Full Code Here

  /**
   * Constructs a new ChartRenderingInfo structure that can be used to collect
   * information about the dimensions of a rendered chart.
   */
  public ChartRenderingInfo() {
    this(new StandardEntityCollection());
  }
View Full Code Here

        || (position == RectangleEdge.RIGHT)) {
      this.drawVertical(g2, area);
    }
    final BlockResult result = new BlockResult();
    if (entity != null) {
      final StandardEntityCollection sec = new StandardEntityCollection();
      sec.add(entity);
      result.setEntityCollection(sec);
    }
    return result;
  }
View Full Code Here

    area = this.trimBorder(area);
    area = this.trimPadding(area);

    // check if we need to collect chart entities from the container
    EntityBlockParams ebp = null;
    StandardEntityCollection sec = null;
    Rectangle entityArea = null;
    if (params instanceof EntityBlockParams) {
      ebp = (EntityBlockParams) params;
      if (ebp.getGenerateEntities()) {
        sec = new StandardEntityCollection();
        entityArea = new Rectangle(area.x, area.y, area.width,
            area.height);
      }
    }
    g2.setForeground(this.paint);
    g2.setFont(this.font);
    this.label.draw(g2, (float) area.x + 1, (float) area.y + 1,
        TextBlockAnchor.TOP_LEFT);
    BlockResult result = null;
    if ((ebp != null) && (sec != null)) {
      if ((this.toolTipText != null) || (this.urlText != null)) {
        final ChartEntity entity = new ChartEntity(entityArea,
            this.toolTipText, this.urlText);
        sec.add(entity);
        result = new BlockResult();
        result.setEntityCollection(sec);
      }
    }
    return result;
View Full Code Here

TOP

Related Classes of com.positive.charts.entity.StandardEntityCollection

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.