Package com.positive.charts.block

Examples of com.positive.charts.block.BlockResult


   */
  public Object draw(final GC g2, final Rectangle area, final Object params) {
    // draw the block without collecting entities
    super.draw(g2, area, null);
    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


      this.drawHorizontal(g2, area);
    } else if ((position == RectangleEdge.LEFT)
        || (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

TOP

Related Classes of com.positive.charts.block.BlockResult

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.