Package org.jfree.chart.labels

Examples of org.jfree.chart.labels.XYToolTipGenerator


    public void testSetSeriesToolTipGenerator() {
        XYPlot plot = (XYPlot) this.chart.getPlot();
        XYItemRenderer renderer = plot.getRenderer();
        StandardXYToolTipGenerator tt = new StandardXYToolTipGenerator();
        renderer.setSeriesToolTipGenerator(0, tt);
        XYToolTipGenerator tt2 = renderer.getToolTipGenerator(0, 0);
        assertTrue(tt2 == tt);
    }
View Full Code Here


    public void testSetSeriesToolTipGenerator() {
        XYPlot plot = (XYPlot) this.chart.getPlot();
        XYItemRenderer renderer = plot.getRenderer();
        StandardXYToolTipGenerator tt = new StandardXYToolTipGenerator();
        renderer.setSeriesToolTipGenerator(0, tt);
        XYToolTipGenerator tt2 = renderer.getToolTipGenerator(0, 0);
        assertTrue(tt2 == tt);
    }
View Full Code Here

            else {
                hotspot = new Ellipse2D.Double(entityY - r, entityX - r, w, w);
            }
        }
        String tip = null;
        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);
        }
View Full Code Here

     * @return The tooltip generator (possibly <code>null</code>).
     *
     * @since 1.0.14
     */
    public XYToolTipGenerator getToolTipGenerator(int series, int item) {
        XYToolTipGenerator generator
            = (XYToolTipGenerator) this.toolTipGeneratorList.get(series);
        if (generator == null) {
            generator = this.baseToolTipGenerator;
        }
        return generator;
View Full Code Here

    public void testSetSeriesToolTipGenerator() {
        XYPlot plot = (XYPlot) this.chart.getPlot();
        XYItemRenderer renderer = plot.getRenderer();
        StandardXYToolTipGenerator tt = new StandardXYToolTipGenerator();
        renderer.setSeriesToolTipGenerator(0, tt);
        XYToolTipGenerator tt2 = renderer.getToolTipGenerator(0, 0);
        assertTrue(tt2 == tt);
    }
View Full Code Here

    if ( renderer != null && legend ) {
      renderer.setLegendItemURLGenerator( new StandardXYSeriesLabelGenerator() );
    }

    if ( tooltips ) {
      XYToolTipGenerator generator =
          new StandardXYToolTipGenerator( chartDefinition.getTooltipContent(), new DecimalFormat( chartDefinition
              .getTooltipXFormat() ), new DecimalFormat( chartDefinition.getTooltipYFormat() ) );
      renderer.setToolTipGenerator( generator );
    }
View Full Code Here

      default:
        // should log an error if invalid chart type passed in - at least return null for no renderer
        return null;
    }
    if ( tooltips ) {
      XYToolTipGenerator generator =
          new StandardXYToolTipGenerator( chartDefinition.getTooltipContent(), new SimpleDateFormat( chartDefinition
              .getTooltipXFormat() ), new DecimalFormat( chartDefinition.getTooltipYFormat() ) );
      renderer.setToolTipGenerator( generator );
    }
    if ( urls ) {
View Full Code Here

      default:
        // should log an error if invalid chart type passed in - at least return null for no renderer
        return null;
    }
    if ( tooltips ) {
      XYToolTipGenerator generator =
          new StandardXYToolTipGenerator( chartDefinition.getTooltipContent(), new SimpleDateFormat( chartDefinition
              .getTooltipXFormat() ), new DecimalFormat( chartDefinition.getTooltipYFormat() ) );
      renderer.setToolTipGenerator( generator );
    }
    if ( urls ) {
View Full Code Here

      }

      // add an entity for the item...
      if ( entities != null ) {
        String tip = null;
        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 );
        }
View Full Code Here

        }
    }

    private void setupTooltips(final GridChartView chartView, XYItemRenderer renderer) {
        if (chartView.getTooltip() != null) {
            renderer.setBaseToolTipGenerator(new XYToolTipGenerator() {
                public String generateToolTip(XYDataset xyDataset, int i, int i1) {
                    return chartView.getTooltip();
                }
            });
        } else if (chartView.getDynamicTooltip() != null) {
View Full Code Here

TOP

Related Classes of org.jfree.chart.labels.XYToolTipGenerator

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.