本文整理汇总了Java中org.jfree.chart.labels.CategoryToolTipGenerator.generateToolTip方法的典型用法代码示例。如果您正苦于以下问题:Java CategoryToolTipGenerator.generateToolTip方法的具体用法?Java CategoryToolTipGenerator.generateToolTip怎么用?Java CategoryToolTipGenerator.generateToolTip使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jfree.chart.labels.CategoryToolTipGenerator
的用法示例。
在下文中一共展示了CategoryToolTipGenerator.generateToolTip方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addItemEntity
import org.jfree.chart.labels.CategoryToolTipGenerator; //导入方法依赖的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);
}
示例2: addItemEntity
import org.jfree.chart.labels.CategoryToolTipGenerator; //导入方法依赖的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);
}
示例3: addItemEntity
import org.jfree.chart.labels.CategoryToolTipGenerator; //导入方法依赖的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);
}
示例4: addItemEntity
import org.jfree.chart.labels.CategoryToolTipGenerator; //导入方法依赖的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);
}
示例5: addItemEntity
import org.jfree.chart.labels.CategoryToolTipGenerator; //导入方法依赖的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);
}
示例6: addItemEntity
import org.jfree.chart.labels.CategoryToolTipGenerator; //导入方法依赖的package包/类
/**
* Adds an entity with the specified hotspot, but only if an entity
* collection is accessible via the renderer state.
*
* @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);
}
示例7: addEntity
import org.jfree.chart.labels.CategoryToolTipGenerator; //导入方法依赖的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);
}
示例8: addEntity
import org.jfree.chart.labels.CategoryToolTipGenerator; //导入方法依赖的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);
}
示例9: addEntity
import org.jfree.chart.labels.CategoryToolTipGenerator; //导入方法依赖的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 selected is the item selected?
* @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.2.0
*/
protected void addEntity(EntityCollection entities, Shape hotspot,
CategoryDataset dataset, int row, int column, boolean selected,
double entityX, double entityY) {
if (!getItemCreateEntity(row, column, selected)) {
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,
selected);
if (generator != null) {
tip = generator.generateToolTip(dataset, row, column);
}
String url = null;
CategoryURLGenerator urlster = getURLGenerator(row, column, selected);
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);
}