/** * {@inheritDoc} */ @Override @SuppressWarnings("rawtypes") public int getColumnIndex(Comparable key) { return dataset.getColumnIndex(key); }
/** * {@inheritDoc} */ @Override @SuppressWarnings("rawtypes") public int getColumnIndex(Comparable key) { return dataset.getColumnIndex(key); }
/** * Sets the column key. * * @param columnKey the column key (<code>null</code> not permitted). * * @since 1.0.6 * * @see #getColumnKey() */ public void setColumnKey(Comparable columnKey) { this.columnKey = columnKey; // update the deprecated fields this.category = columnKey; this.categoryIndex = this.dataset.getColumnIndex(columnKey); }
/** * Returns the index for the specified column key. * * @param key the key. * * @return The column index, or -1 if the key is not recognised. */ public int getColumnIndex(Comparable key) { int index = this.underlying.getColumnIndex(key); if (index >= this.firstCategoryIndex && index <= lastCategoryIndex()) { return index - this.firstCategoryIndex; } return -1; // we didn't find the key }
/** * Creates a pie dataset from a table dataset by taking all the values * for a single column. * * @param dataset the dataset (<code>null</code> not permitted). * @param columnKey the column key. * * @return A pie dataset. */ public static PieDataset createPieDatasetForColumn(CategoryDataset dataset, Comparable columnKey) { int column = dataset.getColumnIndex(columnKey); return createPieDatasetForColumn(dataset, column); }
/** * Creates a pie dataset from a table dataset by taking all the values * for a single column. * * @param dataset the dataset ({@code null} not permitted). * @param columnKey the column key. * * @return A pie dataset. */ public static PieDataset createPieDatasetForColumn(CategoryDataset dataset, Comparable columnKey) { int column = dataset.getColumnIndex(columnKey); return createPieDatasetForColumn(dataset, column); }
/** * Returns the index for the specified column key. * * @param key the key. * * @return The column index, or -1 if the key is not recognised. */ @Override public int getColumnIndex(Comparable key) { int index = this.underlying.getColumnIndex(key); if (index >= this.firstCategoryIndex && index <= lastCategoryIndex()) { return index - this.firstCategoryIndex; } return -1; // we didn't find the key }
/** * Returns the index for a given key, or {@code -1} if there is no * such key. * * @param key the key. * * @return The index for the key, or {@code -1}. */ @Override public int getIndex(Comparable key) { int result = -1; if (this.source != null) { if (this.extract == TableOrder.BY_ROW) { result = this.source.getColumnIndex(key); } else if (this.extract == TableOrder.BY_COLUMN) { result = this.source.getRowIndex(key); } } return result; }
/** * Returns the index for a given key, or <code>-1</code> if there is no * such key. * * @param key the key. * * @return The index for the key, or <code>-1</code>. */ public int getIndex(Comparable key) { int result = -1; if (this.source != null) { if (this.extract == TableOrder.BY_ROW) { result = this.source.getColumnIndex(key); } else if (this.extract == TableOrder.BY_COLUMN) { result = this.source.getRowIndex(key); } } return result; }
/** * Creates a new entity instance for an item in the specified dataset. * * @param area the 'hotspot' area (<code>null</code> not permitted). * @param toolTipText the tool tip text. * @param urlText the URL text. * @param dataset the dataset (<code>null</code> not permitted). * @param rowKey the row key (<code>null</code> not permitted). * @param columnKey the column key (<code>null</code> not permitted). * * @since 1.0.6 */ public CategoryItemEntity(Shape area, String toolTipText, String urlText, CategoryDataset dataset, Comparable rowKey, Comparable columnKey) { super(area, toolTipText, urlText); if (dataset == null) { throw new IllegalArgumentException("Null 'dataset' argument."); } this.dataset = dataset; this.rowKey = rowKey; this.columnKey = columnKey; // populate the deprecated fields this.series = dataset.getRowIndex(rowKey); this.category = columnKey; this.categoryIndex = dataset.getColumnIndex(columnKey); }
plot.getRangeAxisLocation(), orientation); CategoryDataset dataset = plot.getDataset(); int catIndex = dataset.getColumnIndex(getCategory()); int catCount = dataset.getColumnCount(); double j2DX = domainAxis.getCategoryMiddle(catIndex, catCount,
plot.getRangeAxisLocation(), orientation); CategoryDataset dataset = plot.getDataset(); int catIndex = dataset.getColumnIndex(getCategory()); int catCount = dataset.getColumnCount(); double j2DX = domainAxis.getCategoryMiddle(catIndex, catCount,
Rectangle2D area, RectangleEdge edge) { int categoryIndex = dataset.getColumnIndex(category); int categoryCount = dataset.getColumnCount(); int seriesIndex = dataset.getRowIndex(seriesKey);
int catIndex1 = dataset.getColumnIndex(this.category1); int catIndex2 = dataset.getColumnIndex(this.category2); int catCount = dataset.getColumnCount();
Rectangle2D area, RectangleEdge edge) { int categoryIndex = dataset.getColumnIndex(category); int categoryCount = dataset.getColumnCount(); int seriesIndex = dataset.getRowIndex(seriesKey);
int catIndex1 = dataset.getColumnIndex(this.category1); int catIndex2 = dataset.getColumnIndex(this.category2); int catCount = dataset.getColumnCount();
if(generator != null) text = generator.generateColumnLabel(dataset, dataset.getColumnIndex(category));
int catIndex = dataset.getColumnIndex(this.category); int catCount = dataset.getColumnCount();
int catIndex = dataset.getColumnIndex(this.category); int catCount = dataset.getColumnCount();
int column = getDataset().getColumnIndex(key); label = getLegendItemLabelGenerator().generateColumnLabel(getDataset(), column);