Package org.jfree.chart.entity

Examples of org.jfree.chart.entity.EntityCollection


          rangeAxisIndex, transX, transY, orientation);

      // collect entity and tool tip information...
      if (state.getInfo() != null)
      {
        final EntityCollection entities = state.getEntityCollection();
        if (entities != null)
        {
          String tip = null;
          final XYToolTipGenerator generator
              = getToolTipGenerator(series, item);
          if (generator != null)
          {
            tip = generator.generateToolTip(dataset, series, item);
          }
          String url = null;
          if (getURLGenerator() != null)
          {
            url = getURLGenerator().generateURL(dataset, series,
                item);
          }
          final XYItemEntity entity = new XYItemEntity(s, dataset,
              series, item, tip, url);
          entities.add(entity);
        }
      }
    }

  }
View Full Code Here


          drawItemLabel(g2, orientation, dataset, series, item, transY, transX, false);
        }
      }

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

      // add an entity for the item...
      if (entities != null)
      {
        String tip = null;
        final XYToolTipGenerator generator = getToolTipGenerator(series, item);
        if (generator != null)
        {
          tip = generator.generateToolTip(dataset, series, item);
        }
        String url = null;
        if (getURLGenerator() != null)
        {
          url = getURLGenerator().generateURL(dataset, series, item);
        }
        final XYItemEntity entity = new XYItemEntity(circle, dataset, series, item, tip, url);
        entities.add(entity);
      }

      final int domainAxisIndex = plot.getDomainAxisIndex(domainAxis);
      final int rangeAxisIndex = plot.getRangeAxisIndex(rangeAxis);
      updateCrosshairValues(crosshairState, x, y, domainAxisIndex, rangeAxisIndex, transX, transY, orientation);
View Full Code Here

      return;
    }

    graphics2D.setColor(Color.RED);
    final Rectangle2D dataArea = getDataAreaOffset();
    final EntityCollection entityCollection = chartRenderingInfo.getEntityCollection();
    for (int i = 0; i < entityCollection.getEntityCount(); i++)
    {
      final ChartEntity chartEntity = entityCollection.getEntity(i);
      if (chartEntity instanceof XYItemEntity ||
          chartEntity instanceof CategoryItemEntity ||
          chartEntity instanceof PieSectionEntity)
      {
        final Area a = new Area(chartEntity.getArea());
View Full Code Here

      draw(graphics, bounds);
      graphics.dispose();
    }

    final ImageMap map = new ImageMap();
    final EntityCollection entityCollection = chartRenderingInfo.getEntityCollection();
    final int count = entityCollection.getEntityCount();
    for (int i = 0; i < count; i++)
    {
      final ChartEntity chartEntity = entityCollection.getEntity(i);
      final Shape area = chartEntity.getArea();
      final String hrefValue = chartEntity.getURLText();
      final String tooltipValue = chartEntity.getToolTipText();
      if (StringUtils.isEmpty(tooltipValue) == false ||
          StringUtils.isEmpty(hrefValue) == false)
View Full Code Here

        StringBuffer sb = new StringBuffer();
        sb.append("<map id=\"" + htmlEscape(name) + "\" name=\""
                + htmlEscape(name) + "\">");
        sb.append(StringUtils.getLineSeparator());
        EntityCollection entities = info.getEntityCollection();
        if (entities != null) {
            int count = entities.getEntityCount();
            for (int i = count - 1; i >= 0; i--) {
                ChartEntity entity = entities.getEntity(i);
                if (entity.getToolTipText() != null
                        || entity.getURLText() != null) {
                    String area = entity.getImageMapAreaTag(
                            toolTipTagFragmentGenerator,
                            urlTagFragmentGenerator);
View Full Code Here

                             Shape hotspot, int rendererIndex,
                             String toolTipText, String urlText) {
        if (info == null) {
            return;
        }
        EntityCollection entities = info.getOwner().getEntityCollection();
        if (entities == null) {
            return;
        }
        XYAnnotationEntity entity = new XYAnnotationEntity(hotspot,
                rendererIndex, toolTipText, urlText);
        entities.add(entity);
    }
View Full Code Here

                    bounds.getWidth(), bounds.getHeight());
            Object r = block.draw(g2, drawArea, params);
            if (sec != null) {
                if (r instanceof EntityBlockResult) {
                    EntityBlockResult ebr = (EntityBlockResult) r;
                    EntityCollection ec = ebr.getEntityCollection();
                    sec.addAll(ec);
                }
            }
        }
        BlockResult result = null;
View Full Code Here

                    g2.draw(path);
                }

                // add an entity for the pie section
                if (state.getInfo() != null) {
                    EntityCollection entities = state.getEntityCollection();
                    if (entities != null) {
                        String tip = null;
                        PieToolTipGenerator toolTipGenerator
                                = getToolTipGenerator();
                        if (toolTipGenerator != null) {
                            tip = toolTipGenerator.generateToolTip(dataset,
                                    key);
                        }
                        String url = null;
                        PieURLGenerator urlGenerator = getURLGenerator();
                        if (urlGenerator != null) {
                            url = urlGenerator.generateURL(dataset, key,
                                    getPieIndex());
                        }
                        PieSectionEntity entity = new PieSectionEntity(path,
                                dataset, getPieIndex(), section, key, tip,
                                url);
                        entities.add(entity);
                    }
                }
            }
            else if (currentPass == 2) {
                if (this.separatorsVisible) {
View Full Code Here

   {

      String result = null;
      if (this.info != null)
      {
         EntityCollection entities = this.info.getEntityCollection();
         if (entities != null)
         {
            Insets insets = getInsets();
            ChartEntity entity = entities.getEntity(
                    (int) ((e.getX() - insets.left) / this.scaleX),
                    (int) ((e.getY() - insets.top) / this.scaleY));
            if (entity != null)
            {
               result = entity.getToolTipText();
View Full Code Here

      if (this.info != null)
      {
         Insets insets = getInsets();
         double x = (viewX - insets.left) / this.scaleX;
         double y = (viewY - insets.top) / this.scaleY;
         EntityCollection entities = this.info.getEntityCollection();
         result = entities != null ? entities.getEntity(x, y) : null;
      }
      return result;

   }
View Full Code Here

TOP

Related Classes of org.jfree.chart.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.