org.jfree.chart.labels.CategoryToolTipGenerator Java Examples
The following examples show how to use
org.jfree.chart.labels.CategoryToolTipGenerator.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AbstractCategoryItemRenderer.java From ccu-historian with GNU General Public License v3.0 | 6 votes |
/** * 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); }
Example #2
Source File: AbstractCategoryItemRenderer.java From openstock with GNU General Public License v3.0 | 6 votes |
/** * 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; }
Example #3
Source File: Arja_00112_s.java From coming with MIT License | 5 votes |
/** * 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); }
Example #4
Source File: JGenProg2017_000_s.java From coming with MIT License | 5 votes |
/** * 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); }
Example #5
Source File: Cardumen_00139_t.java From coming with MIT License | 5 votes |
/** * 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); }
Example #6
Source File: JGenProg2017_00102_s.java From coming with MIT License | 5 votes |
/** * 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); }
Example #7
Source File: Elixir_000_t.java From coming with MIT License | 5 votes |
/** * 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); }
Example #8
Source File: jMutRepair_0020_t.java From coming with MIT License | 5 votes |
/** * 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); }
Example #9
Source File: jMutRepair_000_t.java From coming with MIT License | 5 votes |
/** * 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); }
Example #10
Source File: JGenProg2017_0078_t.java From coming with MIT License | 5 votes |
/** * 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); }
Example #11
Source File: Arja_0062_t.java From coming with MIT License | 5 votes |
/** * 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); }
Example #12
Source File: Chart_1_AbstractCategoryItemRenderer_t.java From coming with MIT License | 5 votes |
/** * 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); }
Example #13
Source File: LineChart3DTest.java From ccu-historian with GNU General Public License v3.0 | 5 votes |
/** * 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); }
Example #14
Source File: jMutRepair_000_s.java From coming with MIT License | 5 votes |
/** * 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); }
Example #15
Source File: StackedAreaChartTest.java From ccu-historian with GNU General Public License v3.0 | 5 votes |
/** * 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); }
Example #16
Source File: AbstractCategoryItemRenderer.java From openstock with GNU General Public License v3.0 | 5 votes |
/** * 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); }
Example #17
Source File: Elixir_000_s.java From coming with MIT License | 5 votes |
/** * 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); }
Example #18
Source File: Cardumen_00191_t.java From coming with MIT License | 5 votes |
/** * 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); }
Example #19
Source File: 1_AbstractCategoryItemRenderer.java From SimFix with GNU General Public License v2.0 | 5 votes |
/** * 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); }
Example #20
Source File: jKali_000_t.java From coming with MIT License | 5 votes |
/** * 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); }
Example #21
Source File: jKali_000_s.java From coming with MIT License | 5 votes |
/** * 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); }
Example #22
Source File: Arja_0089_s.java From coming with MIT License | 5 votes |
/** * 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); }
Example #23
Source File: Cardumen_00191_t.java From coming with MIT License | 3 votes |
/** * Sets the base tool tip generator and sends a {@link RendererChangeEvent} * to all registered listeners. * * @param generator the generator (<code>null</code> permitted). * @param notify notify listeners? * * @since 1.2.0 * * @see #getBaseToolTipGenerator() */ public void setBaseToolTipGenerator(CategoryToolTipGenerator generator, boolean notify) { this.baseToolTipGenerator = generator; if (notify) { notifyListeners(new RendererChangeEvent(this)); } }
Example #24
Source File: 1_AbstractCategoryItemRenderer.java From SimFix with GNU General Public License v2.0 | 3 votes |
/** * Sets the tool tip generator for a series and sends a * {@link org.jfree.chart.event.RendererChangeEvent} to all registered * listeners. * * @param series the series index (zero-based). * @param generator the generator (<code>null</code> permitted). * @param notify notify listeners? * * @since 1.2.0 * * @see #getSeriesToolTipGenerator(int) */ public void setSeriesToolTipGenerator(int series, CategoryToolTipGenerator generator, boolean notify) { this.toolTipGeneratorList.set(series, generator); if (notify) { notifyListeners(new RendererChangeEvent(this)); } }
Example #25
Source File: jKali_0031_s.java From coming with MIT License | 3 votes |
/** * Returns the tool tip generator that should be used for the specified * item. 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). * @param selected is the item selected? * * @return The generator (possibly <code>null</code>). * * @since 1.2.0 */ public CategoryToolTipGenerator getToolTipGenerator(int row, int column, boolean selected) { CategoryToolTipGenerator result = null; result = getSeriesToolTipGenerator(row); if (result == null) { result = this.baseToolTipGenerator; } return result; }
Example #26
Source File: jKali_000_t.java From coming with MIT License | 3 votes |
/** * Sets the tool tip generator for a series and sends a * {@link org.jfree.chart.event.RendererChangeEvent} to all registered * listeners. * * @param series the series index (zero-based). * @param generator the generator (<code>null</code> permitted). * @param notify notify listeners? * * @since 1.2.0 * * @see #getSeriesToolTipGenerator(int) */ public void setSeriesToolTipGenerator(int series, CategoryToolTipGenerator generator, boolean notify) { this.toolTipGeneratorList.set(series, generator); if (notify) { notifyListeners(new RendererChangeEvent(this)); } }
Example #27
Source File: JGenProg2017_00102_s.java From coming with MIT License | 3 votes |
/** * Returns the tool tip generator that should be used for the specified * item. 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). * @param selected is the item selected? * * @return The generator (possibly <code>null</code>). * * @since 1.2.0 */ public CategoryToolTipGenerator getToolTipGenerator(int row, int column, boolean selected) { CategoryToolTipGenerator result = null; result = getSeriesToolTipGenerator(row); if (result == null) { result = this.baseToolTipGenerator; } return result; }
Example #28
Source File: JGenProg2017_0044_s.java From coming with MIT License | 3 votes |
/** * Sets the base tool tip generator and sends a {@link RendererChangeEvent} * to all registered listeners. * * @param generator the generator (<code>null</code> permitted). * @param notify notify listeners? * * @since 1.2.0 * * @see #getBaseToolTipGenerator() */ public void setBaseToolTipGenerator(CategoryToolTipGenerator generator, boolean notify) { this.baseToolTipGenerator = generator; if (notify) { notifyListeners(new RendererChangeEvent(this)); } }
Example #29
Source File: JGenProg2017_00102_s.java From coming with MIT License | 3 votes |
/** * Sets the base tool tip generator and sends a {@link RendererChangeEvent} * to all registered listeners. * * @param generator the generator (<code>null</code> permitted). * @param notify notify listeners? * * @since 1.2.0 * * @see #getBaseToolTipGenerator() */ public void setBaseToolTipGenerator(CategoryToolTipGenerator generator, boolean notify) { this.baseToolTipGenerator = generator; if (notify) { notifyListeners(new RendererChangeEvent(this)); } }
Example #30
Source File: Cardumen_0075_t.java From coming with MIT License | 3 votes |
/** * Returns the tool tip generator that should be used for the specified * item. 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). * @param selected is the item selected? * * @return The generator (possibly <code>null</code>). * * @since 1.2.0 */ public CategoryToolTipGenerator getToolTipGenerator(int row, int column, boolean selected) { CategoryToolTipGenerator result = null; result = getSeriesToolTipGenerator(row); if (result == null) { result = this.baseToolTipGenerator; } return result; }