當前位置: 首頁>>代碼示例>>Java>>正文


Java EntityCollection.add方法代碼示例

本文整理匯總了Java中org.jfree.chart.entity.EntityCollection.add方法的典型用法代碼示例。如果您正苦於以下問題:Java EntityCollection.add方法的具體用法?Java EntityCollection.add怎麽用?Java EntityCollection.add使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.jfree.chart.entity.EntityCollection的用法示例。


在下文中一共展示了EntityCollection.add方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: addEntity

import org.jfree.chart.entity.EntityCollection; //導入方法依賴的package包/類
/**
 * Adds an entity to the collection.
 *
 * @param entities  the entity collection being populated.
 * @param area  the entity area (if <code>null</code> a default will be
 *              used).
 * @param dataset  the dataset.
 * @param series  the series.
 * @param item  the item.
 * @param entityX  the entity's center x-coordinate in user space.
 * @param entityY  the entity's center y-coordinate in user space.
 */
protected void addEntity(EntityCollection entities, Shape area,
                         XYDataset dataset, int series, int item,
                         double entityX, double entityY) {
    if (!getItemCreateEntity(series, item)) {
        return;
    }
    if (area == null) {
        area = new Ellipse2D.Double(entityX - this.defaultEntityRadius,
                entityY - this.defaultEntityRadius,
                this.defaultEntityRadius * 2, this.defaultEntityRadius * 2);
    }
    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(area, dataset, series, item,
            tip, url);
    entities.add(entity);
}
 
開發者ID:parabuild-ci,項目名稱:parabuild-ci,代碼行數:37,代碼來源:AbstractXYItemRenderer.java

示例2: addItemEntity

import org.jfree.chart.entity.EntityCollection; //導入方法依賴的package包/類
/**
 * 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);

}
 
開發者ID:parabuild-ci,項目名稱:parabuild-ci,代碼行數:29,代碼來源:AbstractCategoryItemRenderer.java

示例3: addItemEntity

import org.jfree.chart.entity.EntityCollection; //導入方法依賴的package包/類
/**
 * 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);
}
 
開發者ID:mdzio,項目名稱:ccu-historian,代碼行數:30,代碼來源:AbstractCategoryItemRenderer.java

示例4: addItemEntity

import org.jfree.chart.entity.EntityCollection; //導入方法依賴的package包/類
/**
 * 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);
}
 
開發者ID:jfree,項目名稱:jfreechart,代碼行數:30,代碼來源:AbstractCategoryItemRenderer.java

示例5: addItemEntity

import org.jfree.chart.entity.EntityCollection; //導入方法依賴的package包/類
/**
 * 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);

}
 
開發者ID:SOCR,項目名稱:HTML5_WebSite,代碼行數:29,代碼來源:AbstractCategoryItemRenderer.java

示例6: addItemEntity

import org.jfree.chart.entity.EntityCollection; //導入方法依賴的package包/類
/**
 * 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);
}
 
開發者ID:lulab,項目名稱:PI,代碼行數:33,代碼來源:AbstractCategoryItemRenderer.java

示例7: addItemEntity

import org.jfree.chart.entity.EntityCollection; //導入方法依賴的package包/類
/**
 * Override the method so we can set custom tooltips
 */
@Override
   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;
	if((index-1) < tooltips.size()){
		tip = tooltips.get(index-1);
	}
	
       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);
   }
 
開發者ID:PGWelch,項目名稱:com.opendoorlogistics,代碼行數:26,代碼來源:GanttChartComponent.java

示例8: addEntity

import org.jfree.chart.entity.EntityCollection; //導入方法依賴的package包/類
/**
 * A utility method for adding an {@link XYAnnotationEntity} to 
 * a {@link PlotRenderingInfo} instance.
 * 
 * @param info  the plot rendering info (<code>null</code> permitted).
 * @param hotspot  the hotspot area.
 * @param rendererIndex  the renderer index.
 * @param toolTipText  the tool tip text.
 * @param urlText  the URL text.
 */
protected void addEntity(PlotRenderingInfo info, 
                         Shape hotspot, int rendererIndex, 
                         String toolTipText, String urlText) {
    if (info == null) {
        return;  
    }
    EntityCollection entities = info.getOwner().getEntityCollection();
    if (entities == null) {
        return;
    }
    XYAnnotationEntity entity = new XYAnnotationEntity(hotspot, 
            rendererIndex, toolTipText, urlText);
    entities.add(entity);
}
 
開發者ID:parabuild-ci,項目名稱:parabuild-ci,代碼行數:25,代碼來源:AbstractXYAnnotation.java

示例9: addEntity

import org.jfree.chart.entity.EntityCollection; //導入方法依賴的package包/類
/**
 * Adds an entity to the collection.
 *
 * @param entities  the entity collection being populated.
 * @param area  the entity area (if <code>null</code> a default will be
 *              used).
 * @param dataset  the dataset.
 * @param series  the series.
 * @param item  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>).
 */
protected void addEntity(EntityCollection entities, Shape area,
                         XYDataset dataset, int series, int item,
                         double entityX, double entityY) {
    if (!getItemCreateEntity(series, item)) {
        return;
    }
    Shape hotspot = area;
    if (hotspot == null) {
        double r = getDefaultEntityRadius();
        double w = r * 2;
        if (getPlot().getOrientation() == PlotOrientation.VERTICAL) {
            hotspot = new Ellipse2D.Double(entityX - r, entityY - r, w, w);
        }
        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);
    }
    XYItemEntity entity = new XYItemEntity(hotspot, dataset, series, item,
            tip, url);
    entities.add(entity);
}
 
開發者ID:mdzio,項目名稱:ccu-historian,代碼行數:45,代碼來源:AbstractXYItemRenderer.java

示例10: addEntity

import org.jfree.chart.entity.EntityCollection; //導入方法依賴的package包/類
/**
 * 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);
}
 
開發者ID:mdzio,項目名稱:ccu-historian,代碼行數:48,代碼來源:AbstractCategoryItemRenderer.java

示例11: createAndAddEntity

import org.jfree.chart.entity.EntityCollection; //導入方法依賴的package包/類
/**
 * Created an entity for the axis.
 *
 * @param cursor  the initial cursor value.
 * @param state  the axis state after completion of the drawing with a
 *     possibly updated cursor position.
 * @param dataArea  the data area.
 * @param edge  the edge.
 * @param plotState  the PlotRenderingInfo from which a reference to the
 *     entity collection can be obtained.
 *
 * @since 1.0.13
 */
protected void createAndAddEntity(double cursor, AxisState state,
        Rectangle2D dataArea, RectangleEdge edge,
        PlotRenderingInfo plotState) {

    if (plotState == null || plotState.getOwner() == null) {
        return;  // no need to create entity if we can't save it anyways...
    }
    Rectangle2D hotspot = null;
    if (edge.equals(RectangleEdge.TOP)) {
        hotspot = new Rectangle2D.Double(dataArea.getX(),
                state.getCursor(), dataArea.getWidth(),
                cursor - state.getCursor());
    }
    else if (edge.equals(RectangleEdge.BOTTOM)) {
        hotspot = new Rectangle2D.Double(dataArea.getX(), cursor,
                dataArea.getWidth(), state.getCursor() - cursor);
    }
    else if (edge.equals(RectangleEdge.LEFT)) {
        hotspot = new Rectangle2D.Double(state.getCursor(),
                dataArea.getY(), cursor - state.getCursor(),
                dataArea.getHeight());
    }
    else if (edge.equals(RectangleEdge.RIGHT)) {
        hotspot = new Rectangle2D.Double(cursor, dataArea.getY(),
                state.getCursor() - cursor, dataArea.getHeight());
    }
    EntityCollection e = plotState.getOwner().getEntityCollection();
    if (e != null) {
        e.add(new AxisEntity(hotspot, this));
    }
}
 
開發者ID:mdzio,項目名稱:ccu-historian,代碼行數:45,代碼來源:Axis.java

示例12: addEntity

import org.jfree.chart.entity.EntityCollection; //導入方法依賴的package包/類
/**
 * A utility method for adding an {@link XYAnnotationEntity} to
 * a {@link PlotRenderingInfo} instance.
 *
 * @param info  the plot rendering info (<code>null</code> permitted).
 * @param hotspot  the hotspot area.
 * @param rendererIndex  the renderer index.
 * @param toolTipText  the tool tip text.
 * @param urlText  the URL text.
 */
protected void addEntity(PlotRenderingInfo info,
                         Shape hotspot, int rendererIndex,
                         String toolTipText, String urlText) {
    if (info == null) {
        return;
    }
    EntityCollection entities = info.getOwner().getEntityCollection();
    if (entities == null) {
        return;
    }
    XYAnnotationEntity entity = new XYAnnotationEntity(hotspot,
            rendererIndex, toolTipText, urlText);
    entities.add(entity);
}
 
開發者ID:nick-paul,項目名稱:aya-lang,代碼行數:25,代碼來源:AbstractXYAnnotation.java

示例13: addEntity

import org.jfree.chart.entity.EntityCollection; //導入方法依賴的package包/類
/**
 * Adds an entity to the collection.  Note the the {@code entityX} and
 * {@code entityY} coordinates are in Java2D space, should already be 
 * adjusted for the plot orientation, and will only be used if 
 * {@code hotspot} is {@code null}.
 *
 * @param entities  the entity collection being populated.
 * @param hotspot  the entity area (if {@code null} a default will be
 *              used).
 * @param dataset  the dataset.
 * @param series  the series.
 * @param item  the item.
 * @param entityX  the entity x-coordinate (in Java2D space, only used if 
 *         {@code hotspot} is {@code null}).
 * @param entityY  the entity y-coordinate (in Java2D space, only used if 
 *         {@code hotspot} is {@code null}).
 */
protected void addEntity(EntityCollection entities, Shape hotspot,
        XYDataset dataset, int series, int item, double entityX, 
        double entityY) {
    
    if (!getItemCreateEntity(series, item)) {
        return;
    }

    // if not hotspot is provided, we create a default based on the 
    // provided data coordinates (which are already in Java2D space)
    if (hotspot == null) {
        double r = getDefaultEntityRadius();
        double w = r * 2;
        hotspot = new Ellipse2D.Double(entityX - r, entityY - 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);
    }
    XYItemEntity entity = new XYItemEntity(hotspot, dataset, series, item,
            tip, url);
    entities.add(entity);
}
 
開發者ID:jfree,項目名稱:jfreechart,代碼行數:46,代碼來源:AbstractXYItemRenderer.java

示例14: addEntity

import org.jfree.chart.entity.EntityCollection; //導入方法依賴的package包/類
/**
 * Adds an entity to the collection.
 *
 * @param entities  the entity collection being populated.
 * @param area  the entity area (if {@code null} a default will be
 *              used).
 * @param dataset  the dataset.
 * @param series  the series.
 * @param item  the item.
 * @param entityX  the entity's center x-coordinate in user space (only
 *                 used if {@code area} is {@code null}).
 * @param entityY  the entity's center y-coordinate in user space (only
 *                 used if {@code area} is {@code null}).
 */
protected void addEntity(EntityCollection entities, Shape area,
                         XYDataset dataset, int series, int item,
                         double entityX, double entityY) {
    if (!getItemCreateEntity(series, item)) {
        return;
    }
    Shape hotspot = area;
    if (hotspot == null) {
        double r = getDefaultEntityRadius();
        double w = r * 2;
        if (getPlot().getOrientation() == PlotOrientation.VERTICAL) {
            hotspot = new Ellipse2D.Double(entityX - r, entityY - r, w, w);
        }
        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);
    }
    XYItemEntity entity = new XYItemEntity(hotspot, dataset, series, item,
            tip, url);
    entities.add(entity);
}
 
開發者ID:jfree,項目名稱:jfreechart,代碼行數:45,代碼來源:DefaultPolarItemRenderer.java

示例15: addEntity

import org.jfree.chart.entity.EntityCollection; //導入方法依賴的package包/類
/**
 * Adds an entity to the collection.
 *
 * @param entities  the entity collection being populated.
 * @param hotspot  the entity area (if {@code null} 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} is {@code null}).
 * @param entityY  the entity's center y-coordinate in user space (only
 *                 used if {@code area} is {@code null}).
 *
 * @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);
}
 
開發者ID:jfree,項目名稱:jfreechart,代碼行數:48,代碼來源:AbstractCategoryItemRenderer.java


注:本文中的org.jfree.chart.entity.EntityCollection.add方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。