Java 类org.jfree.chart.labels.CategoryToolTipGenerator 实例源码

项目:parabuild-ci    文件:AbstractCategoryItemRenderer.java   
/**
 * Adds an entity with the specified hotspot.
 *
 * @param entities  the entity collection.
 * @param dataset  the dataset.
 * @param row  the row index.
 * @param column  the column index.
 * @param hotspot  the hotspot.
 */
protected void addItemEntity(EntityCollection entities,
                             CategoryDataset dataset, int row, int column,
                             Shape hotspot) {

    String tip = null;
    CategoryToolTipGenerator tipster = getToolTipGenerator(row, column);
    if (tipster != null) {
        tip = tipster.generateToolTip(dataset, row, column);
    }
    String url = null;
    CategoryURLGenerator urlster = getItemURLGenerator(row, column);
    if (urlster != null) {
        url = urlster.generateURL(dataset, row, column);
    }
    CategoryItemEntity entity = new CategoryItemEntity(hotspot, tip, url,
            dataset, row, dataset.getColumnKey(column), column);
    entities.add(entity);

}
项目:ccu-historian    文件:AbstractCategoryItemRenderer.java   
/**
 * Returns the tool tip generator that should be used for the specified
 * item.  This method looks up the generator using the "three-layer"
 * approach outlined in the general description of this interface.  You
 * can override this method if you want to return a different generator per
 * item.
 *
 * @param row  the row index (zero-based).
 * @param column  the column index (zero-based).
 *
 * @return The generator (possibly <code>null</code>).
 */
@Override
public CategoryToolTipGenerator getToolTipGenerator(int row, int column) {

    CategoryToolTipGenerator result;
    if (this.toolTipGenerator != null) {
        result = this.toolTipGenerator;
    }
    else {
        result = getSeriesToolTipGenerator(row);
        if (result == null) {
            result = this.baseToolTipGenerator;
        }
    }
    return result;
}
项目:ccu-historian    文件:AbstractCategoryItemRenderer.java   
/**
 * Adds an entity with the specified hotspot.
 *
 * @param entities  the entity collection.
 * @param dataset  the dataset.
 * @param row  the row index.
 * @param column  the column index.
 * @param hotspot  the hotspot (<code>null</code> not permitted).
 */
protected void addItemEntity(EntityCollection entities,
        CategoryDataset dataset, int row, int column, Shape hotspot) {
    ParamChecks.nullNotPermitted(hotspot, "hotspot");
    if (!getItemCreateEntity(row, column)) {
        return;
    }
    String tip = null;
    CategoryToolTipGenerator tipster = getToolTipGenerator(row, column);
    if (tipster != null) {
        tip = tipster.generateToolTip(dataset, row, column);
    }
    String url = null;
    CategoryURLGenerator urlster = getItemURLGenerator(row, column);
    if (urlster != null) {
        url = urlster.generateURL(dataset, row, column);
    }
    CategoryItemEntity entity = new CategoryItemEntity(hotspot, tip, url,
            dataset, dataset.getRowKey(row), dataset.getColumnKey(column));
    entities.add(entity);
}
项目:jfreechart    文件:AbstractCategoryItemRenderer.java   
/**
 * Adds an entity with the specified hotspot.
 *
 * @param entities  the entity collection.
 * @param dataset  the dataset.
 * @param row  the row index.
 * @param column  the column index.
 * @param hotspot  the hotspot ({@code null} not permitted).
 */
protected void addItemEntity(EntityCollection entities,
        CategoryDataset dataset, int row, int column, Shape hotspot) {
    Args.nullNotPermitted(hotspot, "hotspot");
    if (!getItemCreateEntity(row, column)) {
        return;
    }
    String tip = null;
    CategoryToolTipGenerator tipster = getToolTipGenerator(row, column);
    if (tipster != null) {
        tip = tipster.generateToolTip(dataset, row, column);
    }
    String url = null;
    CategoryURLGenerator urlster = getItemURLGenerator(row, column);
    if (urlster != null) {
        url = urlster.generateURL(dataset, row, column);
    }
    CategoryItemEntity entity = new CategoryItemEntity(hotspot, tip, url,
            dataset, dataset.getRowKey(row), dataset.getColumnKey(column));
    entities.add(entity);
}
项目:aya-lang    文件:AbstractCategoryItemRenderer.java   
/**
 * Returns the tool tip generator that should be used for the specified
 * item.  This method looks up the generator using the "three-layer"
 * approach outlined in the general description of this interface.  You
 * can override this method if you want to return a different generator per
 * item.
 *
 * @param row  the row index (zero-based).
 * @param column  the column index (zero-based).
 *
 * @return The generator (possibly <code>null</code>).
 */
@Override
public CategoryToolTipGenerator getToolTipGenerator(int row, int column) {

    CategoryToolTipGenerator result;
    if (this.toolTipGenerator != null) {
        result = this.toolTipGenerator;
    }
    else {
        result = getSeriesToolTipGenerator(row);
        if (result == null) {
            result = this.baseToolTipGenerator;
        }
    }
    return result;
}
项目:aya-lang    文件:AbstractCategoryItemRenderer.java   
/**
 * Adds an entity with the specified hotspot.
 *
 * @param entities  the entity collection.
 * @param dataset  the dataset.
 * @param row  the row index.
 * @param column  the column index.
 * @param hotspot  the hotspot (<code>null</code> not permitted).
 */
protected void addItemEntity(EntityCollection entities,
        CategoryDataset dataset, int row, int column, Shape hotspot) {
    ParamChecks.nullNotPermitted(hotspot, "hotspot");
    if (!getItemCreateEntity(row, column)) {
        return;
    }
    String tip = null;
    CategoryToolTipGenerator tipster = getToolTipGenerator(row, column);
    if (tipster != null) {
        tip = tipster.generateToolTip(dataset, row, column);
    }
    String url = null;
    CategoryURLGenerator urlster = getItemURLGenerator(row, column);
    if (urlster != null) {
        url = urlster.generateURL(dataset, row, column);
    }
    CategoryItemEntity entity = new CategoryItemEntity(hotspot, tip, url,
            dataset, dataset.getRowKey(row), dataset.getColumnKey(column));
    entities.add(entity);
}
项目:HTML5_WebSite    文件:AbstractCategoryItemRenderer.java   
/**
 * Adds an entity with the specified hotspot.
 *
 * @param entities  the entity collection.
 * @param dataset  the dataset.
 * @param row  the row index.
 * @param column  the column index.
 * @param hotspot  the hotspot.
 */
protected void addItemEntity(EntityCollection entities,
                             CategoryDataset dataset, int row, int column,
                             Shape hotspot) {

    String tip = null;
    CategoryToolTipGenerator tipster = getToolTipGenerator(row, column);
    if (tipster != null) {
        tip = tipster.generateToolTip(dataset, row, column);
    }
    String url = null;
    CategoryURLGenerator urlster = getItemURLGenerator(row, column);
    if (urlster != null) {
        url = urlster.generateURL(dataset, row, column);
    }
    CategoryItemEntity entity = new CategoryItemEntity(hotspot, tip, url,
            dataset, dataset.getRowKey(row), dataset.getColumnKey(column));
    entities.add(entity);

}
项目:populus    文件:AbstractCategoryItemRenderer.java   
/**
 * Returns the tool tip generator that should be used for the specified
 * item.  This method looks up the generator using the "three-layer"
 * approach outlined in the general description of this interface.  You
 * can override this method if you want to return a different generator per
 * item.
 *
 * @param row  the row index (zero-based).
 * @param column  the column index (zero-based).
 *
 * @return The generator (possibly <code>null</code>).
 */
@Override
public CategoryToolTipGenerator getToolTipGenerator(int row, int column) {

    CategoryToolTipGenerator result;
    if (this.toolTipGenerator != null) {
        result = this.toolTipGenerator;
    }
    else {
        result = getSeriesToolTipGenerator(row);
        if (result == null) {
            result = this.baseToolTipGenerator;
        }
    }
    return result;
}
项目:populus    文件:AbstractCategoryItemRenderer.java   
/**
 * Adds an entity with the specified hotspot.
 *
 * @param entities  the entity collection.
 * @param dataset  the dataset.
 * @param row  the row index.
 * @param column  the column index.
 * @param hotspot  the hotspot (<code>null</code> not permitted).
 */
protected void addItemEntity(EntityCollection entities,
        CategoryDataset dataset, int row, int column, Shape hotspot) {
    ParamChecks.nullNotPermitted(hotspot, "hotspot");
    if (!getItemCreateEntity(row, column)) {
        return;
    }
    String tip = null;
    CategoryToolTipGenerator tipster = getToolTipGenerator(row, column);
    if (tipster != null) {
        tip = tipster.generateToolTip(dataset, row, column);
    }
    String url = null;
    CategoryURLGenerator urlster = getItemURLGenerator(row, column);
    if (urlster != null) {
        url = urlster.generateURL(dataset, row, column);
    }
    CategoryItemEntity entity = new CategoryItemEntity(hotspot, tip, url,
            dataset, dataset.getRowKey(row), dataset.getColumnKey(column));
    entities.add(entity);
}
项目:PI    文件:AbstractCategoryItemRenderer.java   
/**
 * Adds an entity with the specified hotspot.
 *
 * @param entities  the entity collection.
 * @param dataset  the dataset.
 * @param row  the row index.
 * @param column  the column index.
 * @param hotspot  the hotspot (<code>null</code> not permitted).
 */
protected void addItemEntity(EntityCollection entities,
                             CategoryDataset dataset, int row, int column,
                             Shape hotspot) {
    if (hotspot == null) {
        throw new IllegalArgumentException("Null 'hotspot' argument.");
    }
    if (!getItemCreateEntity(row, column)) {
        return;
    }
    String tip = null;
    CategoryToolTipGenerator tipster = getToolTipGenerator(row, column);
    if (tipster != null) {
        tip = tipster.generateToolTip(dataset, row, column);
    }
    String url = null;
    CategoryURLGenerator urlster = getItemURLGenerator(row, column);
    if (urlster != null) {
        url = urlster.generateURL(dataset, row, column);
    }
    CategoryItemEntity entity = new CategoryItemEntity(hotspot, tip, url,
            dataset, dataset.getRowKey(row), dataset.getColumnKey(column));
    entities.add(entity);
}
项目:group-five    文件:AbstractCategoryItemRenderer.java   
/**
 * Returns the tool tip generator that should be used for the specified
 * item.  This method looks up the generator using the "three-layer"
 * approach outlined in the general description of this interface.  You
 * can override this method if you want to return a different generator per
 * item.
 *
 * @param row  the row index (zero-based).
 * @param column  the column index (zero-based).
 *
 * @return The generator (possibly <code>null</code>).
 */
@Override
public CategoryToolTipGenerator getToolTipGenerator(int row, int column) {

    CategoryToolTipGenerator result;
    if (this.toolTipGenerator != null) {
        result = this.toolTipGenerator;
    }
    else {
        result = getSeriesToolTipGenerator(row);
        if (result == null) {
            result = this.baseToolTipGenerator;
        }
    }
    return result;
}
项目:nabs    文件:AbstractCategoryItemRenderer.java   
/**
 * Adds an entity with the specified hotspot.
 *
 * @param entities  the entity collection.
 * @param dataset  the dataset.
 * @param row  the row index.
 * @param column  the column index.
 * @param hotspot  the hotspot.
 */
protected void addItemEntity(EntityCollection entities,
                             CategoryDataset dataset, int row, int column,
                             Shape hotspot) {

    String tip = null;
    CategoryToolTipGenerator tipster = getToolTipGenerator(row, column);
    if (tipster != null) {
        tip = tipster.generateToolTip(dataset, row, column);
    }
    String url = null;
    CategoryURLGenerator urlster = getItemURLGenerator(row, column);
    if (urlster != null) {
        url = urlster.generateURL(dataset, row, column);
    }
    CategoryItemEntity entity = new CategoryItemEntity(hotspot, tip, url,
            dataset, row, dataset.getColumnKey(column), column);
    entities.add(entity);

}
项目:manydesigns.cn    文件:AbstractCategoryItemRenderer.java   
/**
 * Adds an entity with the specified hotspot.
 *
 * @param entities  the entity collection.
 * @param dataset  the dataset.
 * @param row  the row index.
 * @param column  the column index.
 * @param hotspot  the hotspot (<code>null</code> not permitted).
 */
protected void addItemEntity(EntityCollection entities,
        CategoryDataset dataset, int row, int column, Shape hotspot) {
    ParamChecks.nullNotPermitted(hotspot, "hotspot");
    if (!getItemCreateEntity(row, column)) {
        return;
    }
    String tip = null;
    CategoryToolTipGenerator tipster = getToolTipGenerator(row, column);
    if (tipster != null) {
        tip = tipster.generateToolTip(dataset, row, column);
    }
    String url = null;
    CategoryURLGenerator urlster = getItemURLGenerator(row, column);
    if (urlster != null) {
        url = urlster.generateURL(dataset, row, column);
    }
    CategoryItemEntity entity = new CategoryItemEntity(hotspot, tip, url,
            dataset, dataset.getRowKey(row), dataset.getColumnKey(column));
    entities.add(entity);
}
项目:ECG-Viewer    文件:AbstractCategoryItemRenderer.java   
/**
 * Adds an entity with the specified hotspot.
 *
 * @param entities  the entity collection.
 * @param dataset  the dataset.
 * @param row  the row index.
 * @param column  the column index.
 * @param hotspot  the hotspot (<code>null</code> not permitted).
 */
protected void addItemEntity(EntityCollection entities,
        CategoryDataset dataset, int row, int column, Shape hotspot) {
    ParamChecks.nullNotPermitted(hotspot, "hotspot");
    if (!getItemCreateEntity(row, column)) {
        return;
    }
    String tip = null;
    CategoryToolTipGenerator tipster = getToolTipGenerator(row, column);
    if (tipster != null) {
        tip = tipster.generateToolTip(dataset, row, column);
    }
    String url = null;
    CategoryURLGenerator urlster = getItemURLGenerator(row, column);
    if (urlster != null) {
        url = urlster.generateURL(dataset, row, column);
    }
    CategoryItemEntity entity = new CategoryItemEntity(hotspot, tip, url,
            dataset, dataset.getRowKey(row), dataset.getColumnKey(column));
    entities.add(entity);
}
项目:manydesigns.cn    文件:AbstractCategoryItemRenderer.java   
/**
 * Returns the tool tip generator that should be used for the specified
 * item.  This method looks up the generator using the "three-layer"
 * approach outlined in the general description of this interface.  You
 * can override this method if you want to return a different generator per
 * item.
 *
 * @param row  the row index (zero-based).
 * @param column  the column index (zero-based).
 *
 * @return The generator (possibly <code>null</code>).
 */
@Override
public CategoryToolTipGenerator getToolTipGenerator(int row, int column) {

    CategoryToolTipGenerator result;
    if (this.toolTipGenerator != null) {
        result = this.toolTipGenerator;
    }
    else {
        result = getSeriesToolTipGenerator(row);
        if (result == null) {
            result = this.baseToolTipGenerator;
        }
    }
    return result;
}
项目:parabuild-ci    文件:AbstractCategoryItemRenderer.java   
/**
 * Returns the tool tip generator that should be used for the specified item.  This
 * method looks up the generator using the "three-layer" approach outlined in the 
 * general description of this interface.  You can override this method if you want
 * to return a different generator per item.
 *
 * @param row  the row index (zero-based).
 * @param column  the column index (zero-based).
 *
 * @return The generator (possibly <code>null</code>).
 */
public CategoryToolTipGenerator getToolTipGenerator(int row, int column) {

    CategoryToolTipGenerator result = null;
    if (this.toolTipGenerator != null) {
        result = this.toolTipGenerator;
    }
    else {
        result = getSeriesToolTipGenerator(row);  
        if (result == null) {
            result = this.baseToolTipGenerator;   
        }
    }
    return result;
}
项目:parabuild-ci    文件:StackedBarChart3DTests.java   
/**
 * Check that setting a tool tip generator for a series does override the
 * default generator.
 */
public void testSetSeriesToolTipGenerator() {
    CategoryPlot plot = (CategoryPlot) this.chart.getPlot();
    CategoryItemRenderer renderer = plot.getRenderer();
    StandardCategoryToolTipGenerator tt
            = new StandardCategoryToolTipGenerator();
    renderer.setSeriesToolTipGenerator(0, tt);
    CategoryToolTipGenerator tt2 = renderer.getToolTipGenerator(0, 0);
    assertTrue(tt2 == tt);
}
项目:parabuild-ci    文件:BarChart3DTests.java   
/**
 * Check that setting a tool tip generator for a series does override the
 * default generator.
 */
public void testSetSeriesToolTipGenerator() {
    CategoryPlot plot = (CategoryPlot) this.chart.getPlot();
    CategoryItemRenderer renderer = plot.getRenderer();
    StandardCategoryToolTipGenerator tt
            = new StandardCategoryToolTipGenerator();
    renderer.setSeriesToolTipGenerator(0, tt);
    CategoryToolTipGenerator tt2 = renderer.getToolTipGenerator(0, 0);
    assertTrue(tt2 == tt);
}
项目:parabuild-ci    文件:LineChartTests.java   
/**
 * Check that setting a tool tip generator for a series does override the
 * default generator.
 */
public void testSetSeriesToolTipGenerator() {
    CategoryPlot plot = (CategoryPlot) this.chart.getPlot();
    CategoryItemRenderer renderer = plot.getRenderer();
    StandardCategoryToolTipGenerator tt
            = new StandardCategoryToolTipGenerator();
    renderer.setSeriesToolTipGenerator(0, tt);
    CategoryToolTipGenerator tt2 = renderer.getToolTipGenerator(0, 0);
    assertTrue(tt2 == tt);
}
项目:parabuild-ci    文件:StackedBarChartTests.java   
/**
 * Check that setting a tool tip generator for a series does override the
 * default generator.
 */
public void testSetSeriesToolTipGenerator() {
    CategoryPlot plot = (CategoryPlot) this.chart.getPlot();
    CategoryItemRenderer renderer = plot.getRenderer();
    StandardCategoryToolTipGenerator tt
            = new StandardCategoryToolTipGenerator();
    renderer.setSeriesToolTipGenerator(0, tt);
    CategoryToolTipGenerator tt2 = renderer.getToolTipGenerator(0, 0);
    assertTrue(tt2 == tt);
}
项目:parabuild-ci    文件:WaterfallChartTests.java   
/**
 * Check that setting a tool tip generator for a series does override the
 * default generator.
 */
public void testSetSeriesToolTipGenerator() {
    CategoryPlot plot = (CategoryPlot) this.chart.getPlot();
    CategoryItemRenderer renderer = plot.getRenderer();
    StandardCategoryToolTipGenerator tt
            = new StandardCategoryToolTipGenerator();
    renderer.setSeriesToolTipGenerator(0, tt);
    CategoryToolTipGenerator tt2 = renderer.getToolTipGenerator(0, 0);
    assertTrue(tt2 == tt);
}
项目:parabuild-ci    文件:AreaChartTests.java   
/**
 * Check that setting a tool tip generator for a series does override the
 * default generator.
 */
public void testSetSeriesToolTipGenerator() {
    CategoryPlot plot = (CategoryPlot) this.chart.getPlot();
    CategoryItemRenderer renderer = plot.getRenderer();
    StandardCategoryToolTipGenerator tt
            = new StandardCategoryToolTipGenerator();
    renderer.setSeriesToolTipGenerator(0, tt);
    CategoryToolTipGenerator tt2 = renderer.getToolTipGenerator(0, 0);
    assertTrue(tt2 == tt);
}
项目:parabuild-ci    文件:GanttChartTests.java   
/**
 * Check that setting a tool tip generator for a series does override the
 * default generator.
 */
public void testSetSeriesToolTipGenerator() {
    CategoryPlot plot = (CategoryPlot) this.chart.getPlot();
    CategoryItemRenderer renderer = plot.getRenderer();
    StandardCategoryToolTipGenerator tt
            = new StandardCategoryToolTipGenerator();
    renderer.setSeriesToolTipGenerator(0, tt);
    CategoryToolTipGenerator tt2 = renderer.getToolTipGenerator(0, 0);
    assertTrue(tt2 == tt);
}
项目:parabuild-ci    文件:StackedAreaChartTests.java   
/**
 * Check that setting a tool tip generator for a series does override the
 * default generator.
 */
public void testSetSeriesToolTipGenerator() {
    CategoryPlot plot = (CategoryPlot) this.chart.getPlot();
    CategoryItemRenderer renderer = plot.getRenderer();
    StandardCategoryToolTipGenerator tt
        = new StandardCategoryToolTipGenerator();
    renderer.setSeriesToolTipGenerator(0, tt);
    CategoryToolTipGenerator tt2 = renderer.getToolTipGenerator(0, 0);
    assertTrue(tt2 == tt);
}
项目:parabuild-ci    文件:BarChartTests.java   
/**
 * Check that setting a tool tip generator for a series does override the
 * default generator.
 */
public void testSetSeriesToolTipGenerator() {
    CategoryPlot plot = (CategoryPlot) this.chart.getPlot();
    CategoryItemRenderer renderer = plot.getRenderer();
    StandardCategoryToolTipGenerator tt
            = new StandardCategoryToolTipGenerator();
    renderer.setSeriesToolTipGenerator(0, tt);
    CategoryToolTipGenerator tt2 = renderer.getToolTipGenerator(0, 0);
    assertTrue(tt2 == tt);
}
项目:parabuild-ci    文件:LineChart3DTests.java   
/**
 * Check that setting a tool tip generator for a series does override the
 * default generator.
 */
public void testSetSeriesToolTipGenerator() {
    CategoryPlot plot = (CategoryPlot) this.chart.getPlot();
    CategoryItemRenderer renderer = plot.getRenderer();
    StandardCategoryToolTipGenerator tt
            = new StandardCategoryToolTipGenerator();
    renderer.setSeriesToolTipGenerator(0, tt);
    CategoryToolTipGenerator tt2 = renderer.getToolTipGenerator(0, 0);
    assertTrue(tt2 == tt);
}
项目:parabuild-ci    文件:AbstractCategoryItemRenderer.java   
/**
 * Returns the tool tip generator that should be used for the specified
 * item.  This method looks up the generator using the "three-layer"
 * approach outlined in the general description of this interface.  You
 * can override this method if you want to return a different generator per
 * item.
 *
 * @param row  the row index (zero-based).
 * @param column  the column index (zero-based).
 *
 * @return The generator (possibly <code>null</code>).
 */
public CategoryToolTipGenerator getToolTipGenerator(int row, int column) {

    CategoryToolTipGenerator result = null;
    if (this.toolTipGenerator != null) {
        result = this.toolTipGenerator;
    }
    else {
        result = getSeriesToolTipGenerator(row);
        if (result == null) {
            result = this.baseToolTipGenerator;
        }
    }
    return result;
}
项目:ccu-historian    文件:AreaChartTest.java   
/**
 * Check that setting a tool tip generator for a series does override the
 * default generator.
 */
@Test
public void testSetSeriesToolTipGenerator() {
    CategoryPlot plot = (CategoryPlot) this.chart.getPlot();
    CategoryItemRenderer renderer = plot.getRenderer();
    StandardCategoryToolTipGenerator tt
            = new StandardCategoryToolTipGenerator();
    renderer.setSeriesToolTipGenerator(0, tt);
    CategoryToolTipGenerator tt2 = renderer.getToolTipGenerator(0, 0);
    assertSame(tt2, tt);
}
项目:ccu-historian    文件:StackedBarChart3DTest.java   
/**
 * Check that setting a tool tip generator for a series does override the
 * default generator.
 */
@Test
public void testSetSeriesToolTipGenerator() {
    CategoryPlot plot = (CategoryPlot) this.chart.getPlot();
    CategoryItemRenderer renderer = plot.getRenderer();
    StandardCategoryToolTipGenerator tt
            = new StandardCategoryToolTipGenerator();
    renderer.setSeriesToolTipGenerator(0, tt);
    CategoryToolTipGenerator tt2 = renderer.getToolTipGenerator(0, 0);
    assertTrue(tt2 == tt);
}
项目:ccu-historian    文件:StackedAreaChartTest.java   
/**
 * Check that setting a tool tip generator for a series does override the
 * default generator.
 */
@Test
public void testSetSeriesToolTipGenerator() {
    CategoryPlot plot = (CategoryPlot) this.chart.getPlot();
    CategoryItemRenderer renderer = plot.getRenderer();
    StandardCategoryToolTipGenerator tt
        = new StandardCategoryToolTipGenerator();
    renderer.setSeriesToolTipGenerator(0, tt);
    CategoryToolTipGenerator tt2 = renderer.getToolTipGenerator(0, 0);
    assertTrue(tt2 == tt);
}
项目:ccu-historian    文件:GanttChartTest.java   
/**
 * Check that setting a tool tip generator for a series does override the
 * default generator.
 */
@Test
public void testSetSeriesToolTipGenerator() {
    CategoryPlot plot = (CategoryPlot) this.chart.getPlot();
    CategoryItemRenderer renderer = plot.getRenderer();
    StandardCategoryToolTipGenerator tt
            = new StandardCategoryToolTipGenerator();
    renderer.setSeriesToolTipGenerator(0, tt);
    CategoryToolTipGenerator tt2 = renderer.getToolTipGenerator(0, 0);
    assertSame(tt2, tt);
}
项目:ccu-historian    文件:BarChartTest.java   
/**
 * Check that setting a tool tip generator for a series does override the
 * default generator.
 */
@Test
public void testSetSeriesToolTipGenerator() {
    CategoryPlot plot = (CategoryPlot) this.chart.getPlot();
    CategoryItemRenderer renderer = plot.getRenderer();
    StandardCategoryToolTipGenerator tt
            = new StandardCategoryToolTipGenerator();
    renderer.setSeriesToolTipGenerator(0, tt);
    CategoryToolTipGenerator tt2 = renderer.getToolTipGenerator(0, 0);
    assertTrue(tt2 == tt);
}
项目:ccu-historian    文件:LineChart3DTest.java   
/**
 * Check that setting a tool tip generator for a series does override the
 * default generator.
 */
@Test
public void testSetSeriesToolTipGenerator() {
    CategoryPlot plot = (CategoryPlot) this.chart.getPlot();
    CategoryItemRenderer renderer = plot.getRenderer();
    StandardCategoryToolTipGenerator tt
            = new StandardCategoryToolTipGenerator();
    renderer.setSeriesToolTipGenerator(0, tt);
    CategoryToolTipGenerator tt2 = renderer.getToolTipGenerator(0, 0);
    assertSame(tt2, tt);
}
项目:ccu-historian    文件:StackedBarChartTest.java   
/**
 * Check that setting a tool tip generator for a series does override the
 * default generator.
 */
@Test
public void testSetSeriesToolTipGenerator() {
    CategoryPlot plot = (CategoryPlot) this.chart.getPlot();
    CategoryItemRenderer renderer = plot.getRenderer();
    StandardCategoryToolTipGenerator tt
            = new StandardCategoryToolTipGenerator();
    renderer.setSeriesToolTipGenerator(0, tt);
    CategoryToolTipGenerator tt2 = renderer.getToolTipGenerator(0, 0);
    assertTrue(tt2 == tt);
}
项目:ccu-historian    文件:WaterfallChartTest.java   
/**
 * Check that setting a tool tip generator for a series does override the
 * default generator.
 */
@Test
public void testSetSeriesToolTipGenerator() {
    CategoryPlot plot = (CategoryPlot) this.chart.getPlot();
    CategoryItemRenderer renderer = plot.getRenderer();
    StandardCategoryToolTipGenerator tt
            = new StandardCategoryToolTipGenerator();
    renderer.setSeriesToolTipGenerator(0, tt);
    CategoryToolTipGenerator tt2 = renderer.getToolTipGenerator(0, 0);
    assertTrue(tt2 == tt);
}
项目:ccu-historian    文件:LineChartTest.java   
/**
 * Check that setting a tool tip generator for a series does override the
 * default generator.
 */
@Test
public void testSetSeriesToolTipGenerator() {
    CategoryPlot plot = (CategoryPlot) this.chart.getPlot();
    CategoryItemRenderer renderer = plot.getRenderer();
    StandardCategoryToolTipGenerator tt
            = new StandardCategoryToolTipGenerator();
    renderer.setSeriesToolTipGenerator(0, tt);
    CategoryToolTipGenerator tt2 = renderer.getToolTipGenerator(0, 0);
    assertSame(tt2, tt);
}
项目:ccu-historian    文件:BarChart3DTest.java   
/**
 * Check that setting a tool tip generator for a series does override the
 * default generator.
 */
@Test
public void testSetSeriesToolTipGenerator() {
    CategoryPlot plot = (CategoryPlot) this.chart.getPlot();
    CategoryItemRenderer renderer = plot.getRenderer();
    StandardCategoryToolTipGenerator tt
            = new StandardCategoryToolTipGenerator();
    renderer.setSeriesToolTipGenerator(0, tt);
    CategoryToolTipGenerator tt2 = renderer.getToolTipGenerator(0, 0);
    assertSame(tt2, tt);
}
项目:ccu-historian    文件:AbstractCategoryItemRenderer.java   
/**
 * Creates a new renderer with no tool tip generator and no URL generator.
 * The defaults (no tool tip or URL generators) have been chosen to
 * minimise the processing required to generate a default chart.  If you
 * require tool tips or URLs, then you can easily add the required
 * generators.
 */
protected AbstractCategoryItemRenderer() {
    this.itemLabelGenerator = null;
    this.itemLabelGeneratorMap 
            = new HashMap<Integer, CategoryItemLabelGenerator>();
    this.toolTipGenerator = null;
    this.toolTipGeneratorMap 
            = new HashMap<Integer, CategoryToolTipGenerator>();
    this.itemURLGenerator = null;
    this.itemURLGeneratorMap = new HashMap<Integer, CategoryURLGenerator>();
    this.legendItemLabelGenerator
            = new StandardCategorySeriesLabelGenerator();
}
项目:ccu-historian    文件:AbstractCategoryItemRenderer.java   
/**
 * Adds an entity to the collection.
 *
 * @param entities  the entity collection being populated.
 * @param hotspot  the entity area (if <code>null</code> a default will be
 *              used).
 * @param dataset  the dataset.
 * @param row  the series.
 * @param column  the item.
 * @param entityX  the entity's center x-coordinate in user space (only
 *                 used if <code>area</code> is <code>null</code>).
 * @param entityY  the entity's center y-coordinate in user space (only
 *                 used if <code>area</code> is <code>null</code>).
 *
 * @since 1.0.13
 */
protected void addEntity(EntityCollection entities, Shape hotspot,
                         CategoryDataset dataset, int row, int column,
                         double entityX, double entityY) {
    if (!getItemCreateEntity(row, column)) {
        return;
    }
    Shape s = hotspot;
    if (hotspot == null) {
        double r = getDefaultEntityRadius();
        double w = r * 2;
        if (getPlot().getOrientation() == PlotOrientation.VERTICAL) {
            s = new Ellipse2D.Double(entityX - r, entityY - r, w, w);
        }
        else {
            s = new Ellipse2D.Double(entityY - r, entityX - r, w, w);
        }
    }
    String tip = null;
    CategoryToolTipGenerator generator = getToolTipGenerator(row, column);
    if (generator != null) {
        tip = generator.generateToolTip(dataset, row, column);
    }
    String url = null;
    CategoryURLGenerator urlster = getItemURLGenerator(row, column);
    if (urlster != null) {
        url = urlster.generateURL(dataset, row, column);
    }
    CategoryItemEntity entity = new CategoryItemEntity(s, tip, url,
            dataset, dataset.getRowKey(row), dataset.getColumnKey(column));
    entities.add(entity);
}
项目:jfreechart    文件:AbstractCategoryItemRenderer.java   
/**
 * Creates a new renderer with no tool tip generator and no URL generator.
 * The defaults (no tool tip or URL generators) have been chosen to
 * minimise the processing required to generate a default chart.  If you
 * require tool tips or URLs, then you can easily add the required
 * generators.
 */
protected AbstractCategoryItemRenderer() {
    this.itemLabelGeneratorMap 
            = new HashMap<Integer, CategoryItemLabelGenerator>();
    this.toolTipGeneratorMap 
            = new HashMap<Integer, CategoryToolTipGenerator>();
    this.itemURLGeneratorMap = new HashMap<Integer, CategoryURLGenerator>();
    this.legendItemLabelGenerator
            = new StandardCategorySeriesLabelGenerator();
}