Examples of ChartEntity


Examples of org.jfree.chart.entity.ChartEntity

        String result = null;
        if (this.info != null) {
            EntityCollection entities = this.info.getEntityCollection();
            if (entities != null) {
                Rectangle insets = getClientArea();
                ChartEntity entity = entities.getEntity(
                        (int) ((e.x - insets.x) / this.scaleX),
                        (int) ((e.y - insets.y) / this.scaleY));
                if (entity != null) {
                    result = entity.getToolTipText();
                }
            }
        }
        return result;
View Full Code Here

Examples of org.jfree.chart.entity.ChartEntity

        this.anchor = new Point2D.Double(x, y);
        this.chart.setNotify(true)// force a redraw
        this.canvas.redraw();

        // new entity code
        ChartEntity entity = null;
        if (this.info != null) {
            EntityCollection entities = this.info.getEntityCollection();
            if (entities != null) {
                entity = entities.getEntity(x, y);
            }
View Full Code Here

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

Examples of org.jfree.chart.entity.ChartEntity

        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

Examples of org.jfree.chart.entity.ChartEntity

        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

Examples of org.jfree.chart.entity.ChartEntity

        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

Examples of org.jfree.chart.entity.ChartEntity

    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

Examples of org.jfree.chart.entity.ChartEntity

    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

Examples of org.jfree.chart.entity.ChartEntity

    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

Examples of org.jfree.chart.entity.ChartEntity

      }
      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
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.