Logo Search packages:      
Sourcecode: libjfreechart-java version File versions  Download package

void org::jfree::chart::renderer::xy::AbstractXYItemRenderer::addEntity ( EntityCollection  entities,
Shape  area,
XYDataset  dataset,
int  series,
int  item,
double  entityX,
double  entityY 
) [inline, protected, inherited]

Adds an entity to the collection.

Parameters:
entities the entity collection being populated.
area the entity area (if null a default will be used).
dataset the dataset.
series the series.
item the item.
entityX the entity's center x-coordinate in user space (only used if area is null).
entityY the entity's center y-coordinate in user space (only used if area is null).

Definition at line 1723 of file AbstractXYItemRenderer.java.

References org::jfree::chart::entity::EntityCollection::add(), org::jfree::chart::renderer::xy::AbstractXYItemRenderer::defaultEntityRadius, org::jfree::chart::labels::XYToolTipGenerator::generateToolTip(), org::jfree::chart::urls::XYURLGenerator::generateURL(), org::jfree::chart::renderer::AbstractRenderer::getItemCreateEntity(), org::jfree::chart::renderer::xy::AbstractXYItemRenderer::getPlot(), org::jfree::chart::renderer::xy::AbstractXYItemRenderer::getToolTipGenerator(), and org::jfree::chart::renderer::xy::AbstractXYItemRenderer::getURLGenerator().

Referenced by org::jfree::chart::renderer::xy::XYBoxAndWhiskerRenderer::drawHorizontalItem(), org::jfree::chart::renderer::xy::XYStepRenderer::drawItem(), org::jfree::chart::renderer::xy::XYStepAreaRenderer::drawItem(), org::jfree::chart::renderer::xy::XYBubbleRenderer::drawItem(), org::jfree::chart::renderer::xy::XYBlockRenderer::drawItem(), org::jfree::chart::renderer::xy::XYBarRenderer::drawItem(), org::jfree::chart::renderer::xy::XYAreaRenderer::drawItem(), org::jfree::chart::renderer::xy::StandardXYItemRenderer::drawItem(), org::jfree::chart::renderer::xy::StackedXYBarRenderer::drawItem(), org::jfree::chart::renderer::xy::StackedXYAreaRenderer2::drawItem(), org::jfree::chart::renderer::xy::ClusteredXYBarRenderer::drawItem(), org::jfree::chart::renderer::xy::CandlestickRenderer::drawItem(), org::jfree::chart::renderer::xy::XYLineAndShapeRenderer::drawSecondaryPass(), and org::jfree::chart::renderer::xy::XYBoxAndWhiskerRenderer::drawVerticalItem().

                                                             {
        if (!getItemCreateEntity(series, item)) {
            return;
        }
        Shape hotspot = area;
        if (hotspot == null) {
            double w = this.defaultEntityRadius * 2;
            if (getPlot().getOrientation() == PlotOrientation.VERTICAL) {
                  hotspot = new Ellipse2D.Double(
                              entityX - this.defaultEntityRadius,
                              entityY - this.defaultEntityRadius, w, w);
            }
            else {
                  hotspot = new Ellipse2D.Double(
                              entityY - this.defaultEntityRadius,
                        entityX - this.defaultEntityRadius, 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);
        }
        XYItemEntity entity = new XYItemEntity(hotspot, dataset, series, item,
                tip, url);
        entities.add(entity);
    }


Generated by  Doxygen 1.6.0   Back to index