Package org.jfree.chart.entity

Examples of org.jfree.chart.entity.ChartEntity


            }
            this.canvas.redraw();
        }

        // new entity code
        ChartEntity entity = null;
        int x = (int) ((event.x - getClientArea().x) / this.scaleX);
        int y = (int) ((event.y - getClientArea().y) / this.scaleY);

        if (this.info != null) {
            EntityCollection entities = this.info.getEntityCollection();
View Full Code Here


        assertFalse(i1.equals(i2));
        i2.getPlotInfo().setDataArea(new Rectangle(1, 2, 3, 4));
        assertTrue(i1.equals(i2));

        StandardEntityCollection e1 = new StandardEntityCollection();
        e1.add(new ChartEntity(new Rectangle(1, 2, 3, 4)));
        i1.setEntityCollection(e1);
        assertFalse(i1.equals(i2));
        StandardEntityCollection e2 = new StandardEntityCollection();
        e2.add(new ChartEntity(new Rectangle(1, 2, 3, 4)));
        i2.setEntityCollection(e2);
    }
View Full Code Here

        i1.getChartArea().setRect(4.0, 3.0, 2.0, 1.0);
        assertFalse(i1.equals(i2));
        i2.getChartArea().setRect(4.0, 3.0, 2.0, 1.0);
        assertTrue(i1.equals(i2));

        i1.getEntityCollection().add(new ChartEntity(new Rectangle(1, 2, 2,
                1)));
        assertFalse(i1.equals(i2));
        i2.getEntityCollection().add(new ChartEntity(new Rectangle(1, 2, 2,
                1)));
        assertTrue(i1.equals(i2));

    }
View Full Code Here

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

    if ( urlTemplate == null ) {
      return;
    }
    Iterator iter = info.getEntityCollection().iterator();
    while ( iter.hasNext() ) {
      ChartEntity entity = (ChartEntity) iter.next();
      if ( entity instanceof XYItemEntity ) {
        if ( urlTemplate != null ) {
          XYItemEntity xyItemEntity = (XYItemEntity) entity;
          if ( paramName == null ) {
            xyItemEntity.setURLText( urlTemplate );
View Full Code Here

    if ( urlTemplate == null ) {
      return;
    }
    Iterator iter = info.getEntityCollection().iterator();
    while ( iter.hasNext() ) {
      ChartEntity entity = (ChartEntity) iter.next();
      if ( entity instanceof XYItemEntity ) {
        if ( urlTemplate != null ) {
          XYItemEntity xyItemEntity = (XYItemEntity) entity;
          if ( paramName == null ) {
            xyItemEntity.setURLText( urlTemplate );
View Full Code Here

    if ( urlTemplate == null ) {
      return;
    }
    Iterator iter = info.getEntityCollection().iterator();
    while ( iter.hasNext() ) {
      ChartEntity entity = (ChartEntity) iter.next();
      if ( entity instanceof XYItemEntity ) {
        if ( urlTemplate != null ) {
          XYItemEntity xyItemEntity = (XYItemEntity) entity;
          if ( paramName == null ) {
            xyItemEntity.setURLText( urlTemplate );
View Full Code Here

      }
      out.write("<MAP name=\"" + chartId + "\">\n");
      ChartRenderingInfo info = (ChartRenderingInfo) root.getRenderingInfo();
      Iterator entities = info.getEntityCollection().iterator();
      while (entities.hasNext()) {
        ChartEntity ce = (ChartEntity) entities.next();
        out.write("\n<AREA shape=\"" + ce.getShapeType() + "\" ");
        out.write("COORDS=\"" + ce.getShapeCoords() + "\" ");
            if (ce instanceof XYItemEntity)
            {
              dataset = ((XYItemEntity)ce).getDataset();
            }
        if (!(ce instanceof LegendItemEntity)) {
View Full Code Here

  private void populateInfo( final ChartRenderingInfo info ) {
    ArrayList keyListArray = null;
    int keyListIndex = 0;
    Iterator iter = info.getEntityCollection().iterator();
    while ( iter.hasNext() ) {
      ChartEntity entity = (ChartEntity) iter.next();
      if ( entity instanceof PieSectionEntity ) {
        PieSectionEntity pieSectionEntity = (PieSectionEntity) entity;
        String value = pieSectionEntity.getSectionKey().toString();
        if ( paramName == null ) {
          pieSectionEntity.setURLText( value );
View Full Code Here

    }
    ArrayList seriesListArray = null;

    Iterator iter = info.getEntityCollection().iterator();
    while ( iter.hasNext() ) {
      ChartEntity entity = (ChartEntity) iter.next();
      if ( entity instanceof PieSectionEntity ) {
        populatePieSectionEntity( (PieSectionEntity) entity );
      } else if ( entity instanceof CategoryItemEntity ) {
        populateCategoryItemEntity( (CategoryItemEntity) entity, seriesListArray );
      }
View Full Code Here

TOP

Related Classes of org.jfree.chart.entity.ChartEntity

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.