Package com.positive.charts.entity

Examples of com.positive.charts.entity.EntityCollection


    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


          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;
View Full Code Here

        chartArea.width, chartArea.height);
    if (this.padding != null) {
      this.padding.trim(nonTitleArea);
    }

    EntityCollection entities = null;
    if (info != null) {
      entities = info.getEntityCollection();
    }
    if (this.title != null) {
      final EntityCollection e = this.drawTitle(this.title, gc,
          nonTitleArea, (entities != null));
      if (e != null) {
        entities.addAll(e);
      }
    }

    final Iterator iterator = this.subtitles.iterator();
    while (iterator.hasNext()) {
      final Title currentTitle = (Title) iterator.next();
      final EntityCollection e = this.drawTitle(currentTitle, gc,
          nonTitleArea, (entities != null));
      if (e != null) {
        entities.addAll(e);
      }
    }
View Full Code Here

      RectangleUtil.setRect(area, area.x + size.width, area.y, area.width
          - size.width, area.height);
    } else {
      throw new RuntimeException("Unrecognised title position.");
    }
    EntityCollection result = null;
    if (retValue instanceof EntityBlockResult) {
      final EntityBlockResult ebr = (EntityBlockResult) retValue;
      result = ebr.getEntityCollection();
    }
    return result;
View Full Code Here

    // TODO Draw shapes and labels
    // second pass adds shapes where the items are ..
    else if (this.isItemPass(pass)) {

      // setup for collecting optional entity info...
      EntityCollection entities = null;
      if (info != null) {
        entities = info.getOwner().getEntityCollection();
      }

      this.drawSecondaryPass(gc, plot, dataset, pass, series, item,
View Full Code Here

          (value < 0.0));
    }

    // collect entity and tool tip information...
    if (state.getInfo() != null) {
      final EntityCollection entities = state.getEntityCollection();
      if (entities != null) {
        String tip = null;
        final CategoryToolTipGenerator tipster = this
            .getToolTipGenerator(row, column);
        if (tipster != null) {
          tip = tipster.generateToolTip(dataset, row, column);
        }
        String url = null;
        if (this.getItemURLGenerator(row, column) != null) {
          url = this.getItemURLGenerator(row, column).generateURL(
              dataset, row, column);
        }
        final Region reg = new Region();
        reg.add(bar);
        final CategoryItemEntity entity = new CategoryItemEntity(reg,
            tip, url, dataset, row, dataset.getColumnKey(column),
            column);
        entities.add(entity);
      }
    }

  }
View Full Code Here

        gc.setForeground(this.getItemOutlinePaint(row, column));
        gc.drawRectangle(bar);
      }

      // add an item entity, if this information is being collected
      final EntityCollection entities = state.getEntityCollection();
      if (entities != null) {
        final Region region = new Region();
        region.add(bar);
        this.addItemEntity(entities, dataset, row, column, region);
      }
View Full Code Here

   * (may be <code>null</code>) being used to record chart entities.
   *
   * @return The entity collection (possibly <code>null</code>).
   */
  public EntityCollection getEntityCollection() {
    EntityCollection result = null;
    if (this.info != null) {
      final ChartRenderingInfo owner = this.info.getOwner();
      if (owner != null) {
        result = owner.getEntityCollection();
      }
View Full Code Here

        }

        // update the linking line target for later
        // add an entity for the pie section
        if (state.getInfo() != null) {
          final EntityCollection entities = state
              .getEntityCollection();
          if (entities != null) {
            final String tip = null;
            if (this.toolTipGenerator != null) {
              // tip = this.toolTipGenerator.generateToolTip(
              // this.dataset, key);
            }
            String url = null;
            if (this.urlGenerator != null) {
              url = this.urlGenerator.generateURL(this.dataset,
                  key, this.pieIndex);
            }
            final PieSectionEntity entity = new PieSectionEntity(
                null, this.dataset, this.pieIndex, section,
                key, tip, url);
            entities.add(entity);
          }
        }
      }
    }
    state.setLatestAngle(angle2);
View Full Code Here

      this.drawItemLabel(gc, dataset, row, column, plot, generator, bar,
          (value < 0.0));
    }

    // add an item entity, if this information is being collected
    final EntityCollection entities = state.getEntityCollection();
    if (entities != null) {
      final Region region = new Region();
      region.add(bar);
      this.addItemEntity(entities, dataset, row, column, region);
    }
View Full Code Here

TOP

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

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.