Examples of ChartEntity


Examples of com.positive.charts.entity.ChartEntity

    area = this.trimMargin(area);
    this.drawBorder(g2, area);
    if (this.text.equals("")) {
      return null;
    }
    ChartEntity entity = null;
    if (params instanceof EntityBlockParams) {
      final EntityBlockParams p = (EntityBlockParams) params;
      if (p.getGenerateEntities()) {
        entity = new ChartEntity(area, this.toolTipText, this.urlText);
      }
    }
    area = this.trimBorder(area);
    if (this.backgroundPaint != null) {
      g2.setForeground(this.backgroundPaint);
View Full Code Here

Examples of com.positive.charts.entity.ChartEntity

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

Examples of org.jfree.chart.entity.ChartEntity

    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());
        if (buggyDrawArea)
        {
          a.transform(AffineTransform.getTranslateInstance(dataArea.getX(), dataArea.getY()));
        }
        a.intersect(new Area(dataArea));
        graphics2D.draw(a);
      }
      else
      {
        graphics2D.draw(chartEntity.getArea());
      }
    }
  }
View Full Code Here

Examples of org.jfree.chart.entity.ChartEntity

    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)
      {
        final AbstractImageMapEntry entry;
        if (chartEntity instanceof XYItemEntity ||
View Full Code Here

Examples of org.jfree.chart.entity.ChartEntity

      {
        areaHyperlinks = new ArrayList(entityCollection.getEntityCount());
       
        for (Iterator it = entityCollection.iterator(); it.hasNext();)
        {
          ChartEntity entity = (ChartEntity) it.next();
          JRPrintHyperlink printHyperlink = chartHyperlinkProvider.getEntityHyperlink(entity);
          if (printHyperlink != null)
          {
            JRPrintImageArea area = getImageArea(entity);
View Full Code Here

Examples of org.jfree.chart.entity.ChartEntity

    chartPanel.addChartMouseListener(new ChartMouseListener() {
      @Override
      public void chartMouseMoved(ChartMouseEvent event) {
        Cursor cursor = Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR);
        ChartEntity entity = event.getEntity();
        if (entity instanceof PlotEntity) {
          cursor = Cursor.getPredefinedCursor(Cursor.E_RESIZE_CURSOR);
        }
        chartPanel.setCursor(cursor);
      }
View Full Code Here

Examples of org.jfree.chart.entity.ChartEntity

    chartPanel.setPreferredSize(new Dimension(0, chartHeight));
    chartPanel.addChartMouseListener(new ChartMouseListener() {

      @Override
      public void chartMouseMoved(ChartMouseEvent event) {
        ChartEntity entity = event.getEntity();
        if (entity instanceof PieSectionEntity) {
          PieSectionEntity pieSectionEntity = (PieSectionEntity) entity;
          String sectionKey = (String) pieSectionEntity.getSectionKey();
          if (_groups.containsKey(sectionKey)) {
            chartPanel.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
          } else {
            chartPanel.setCursor(Cursor.getDefaultCursor());
          }
        } else {
          chartPanel.setCursor(Cursor.getDefaultCursor());
        }
      }

      @Override
      public void chartMouseClicked(ChartMouseEvent event) {
        ChartEntity entity = event.getEntity();
        if (entity instanceof PieSectionEntity) {
          PieSectionEntity pieSectionEntity = (PieSectionEntity) entity;
          String sectionKey = (String) pieSectionEntity.getSectionKey();
          if (_groups.containsKey(sectionKey)) {
            drillToGroup(sectionKey, true);
View Full Code Here

Examples of org.jfree.chart.entity.ChartEntity

    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());
        if (buggyDrawArea)
        {
          a.transform(AffineTransform.getTranslateInstance(dataArea.getX(), dataArea.getY()));
        }
        a.intersect(new Area(dataArea));
        graphics2D.draw(a);
      }
      else
      {
        graphics2D.draw(chartEntity.getArea());
      }
    }
  }
View Full Code Here

Examples of org.jfree.chart.entity.ChartEntity

    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)
      {
        final AbstractImageMapEntry entry;
        if (chartEntity instanceof XYItemEntity ||
View Full Code Here

Examples of org.jfree.chart.entity.ChartEntity

        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);
                    if (area.length() > 0) {
                        sb.append(area);
                        sb.append(StringUtils.getLineSeparator());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.