/** * {@inheritDoc} */ @Override public List<?> getColumnKeys() { return dataset.getColumnKeys(); }
/** * {@inheritDoc} */ @Override public List<?> getColumnKeys() { return dataset.getColumnKeys(); }
/** * Returns the column keys. * * @return The keys. */ public List getColumnKeys() { Set colKeys = new HashSet(); for (Iterator iter = datasets.keySet().iterator(); iter.hasNext();) { CategoryDataset dataset = (CategoryDataset) iter.next(); colKeys.addAll(dataset.getColumnKeys()); } return new ArrayList(colKeys); }
/** * Returns the Java2D coordinate for the middle of the specified data item. * * @param rowKey the row key. * @param columnKey the column key. * @param dataset the dataset. * @param axis the axis. * @param area the data area. * @param edge the edge along which the axis lies. * * @return The Java2D coordinate for the middle of the item. * * @since 1.0.11 */ @Override public double getItemMiddle(Comparable rowKey, Comparable columnKey, CategoryDataset dataset, CategoryAxis axis, Rectangle2D area, RectangleEdge edge) { return axis.getCategoryMiddle(columnKey, dataset.getColumnKeys(), area, edge); }
/** * Returns the keys for the dataset. * <p> * If the underlying dataset is {@code null}, this method returns an * empty list. * * @return The keys. */ @Override public List getKeys() { List result = Collections.EMPTY_LIST; if (this.source != null) { if (this.extract == TableOrder.BY_ROW) { result = this.source.getColumnKeys(); } else if (this.extract == TableOrder.BY_COLUMN) { result = this.source.getRowKeys(); } } return result; }
/** * Returns the keys for the dataset. * <p> * If the underlying dataset is <code>null</code>, this method returns an * empty list. * * @return The keys. */ public List getKeys() { List result = Collections.EMPTY_LIST; if (this.source != null) { if (this.extract == TableOrder.BY_ROW) { result = this.source.getColumnKeys(); } else if (this.extract == TableOrder.BY_COLUMN) { result = this.source.getRowKeys(); } } return result; }
/** * Returns the Java2D coordinate for the middle of the specified data item. * * @param rowKey the row key. * @param columnKey the column key. * @param dataset the dataset. * @param axis the axis. * @param area the data area. * @param edge the edge along which the axis lies. * * @return The Java2D coordinate for the middle of the item. * * @since 1.0.11 */ public double getItemMiddle(Comparable rowKey, Comparable columnKey, CategoryDataset dataset, CategoryAxis axis, Rectangle2D area, RectangleEdge edge) { return axis.getCategoryMiddle(columnKey, dataset.getColumnKeys(), area, edge); }
/** * Returns a list of the categories in the plot's primary dataset. * * @return A list of the categories in the plot's primary dataset. * * @see #getCategoriesForAxis(CategoryAxis) */ public List getCategories() { List result = null; if (getDataset() != null) { result = Collections.unmodifiableList(getDataset().getColumnKeys()); } return result; }
private CategoryDataset reduceDataset(CategoryDataset dataset, List<? extends Comparable<?>> rowKeysToKeep) { DefaultCategoryDataset newDataset = new DefaultCategoryDataset(); for (Comparable<?> rowKey : rowKeysToKeep) { for (Iterator iterator1 = dataset.getColumnKeys().iterator(); iterator1.hasNext();) { Comparable colKey = (Comparable) iterator1.next(); newDataset.addValue(dataset.getValue(rowKey, colKey), rowKey, colKey); } } return newDataset; }
/** * Returns a list of the categories in the plot's primary dataset. * * @return A list of the categories in the plot's primary dataset. * * @see #getCategoriesForAxis(CategoryAxis) */ public List getCategories() { List result = null; if (getDataset() != null) { result = Collections.unmodifiableList(getDataset().getColumnKeys()); } return result; }
/** * Reduce a given dataset to only contain a specified number of columns */ public static CategoryDataset reduceDataset(CategoryDataset dataset, List rowKeysToKeep) { DefaultCategoryDataset newDataset = new DefaultCategoryDataset(); for (Iterator iterator = rowKeysToKeep.iterator(); iterator.hasNext();) { Comparable rowKey = (Comparable) iterator.next(); if (-1 == dataset.getRowIndex(rowKey)) { continue; /* [FISH-108] The dataset doesn't have the row. We should skip */ } for (Iterator iterator1 = dataset.getColumnKeys().iterator(); iterator1.hasNext();) { Comparable colKey = (Comparable) iterator1.next(); newDataset.addValue(dataset.getValue(rowKey, colKey), rowKey, colKey); } } return newDataset; }
/** * Returns a value from the table. * * @param row the row index (zero-based). * @param column the column index (zero-based). * * @return The value (possibly <code>null</code>). */ public Number getValue(int row, int column) { Comparable rowKey = getRowKey(row); Comparable columnKey = getColumnKey(column); Comparable orgRowKey = (Comparable) keyToRowKey.get(rowKey); CategoryDataset dataset = (CategoryDataset) keyToDataset.get(rowKey); if (dataset.getColumnKeys().contains(columnKey) && dataset.getRowKeys().contains(orgRowKey)) { return dataset.getValue(orgRowKey, columnKey); } else { return null; } }
return false; if (!getColumnKeys().equals(that.getColumnKeys())) { return false;
return false; if (!getColumnKeys().equals(that.getColumnKeys())) { return false;
prefetchSectionPaints(); if (this.dataExtractOrder == TableOrder.BY_ROW) { keys = this.dataset.getColumnKeys();
prefetchSectionPaints(); if (this.dataExtractOrder == TableOrder.BY_ROW) { keys = this.dataset.getColumnKeys();
keys = this.dataset.getColumnKeys();
keys = this.dataset.getColumnKeys();
if(getDataExtractOrder() == TableOrder.BY_ROW) keys = getDataset().getColumnKeys();
protected JFreeChart createGraph() { final CategoryDataset dataset = createDataSet().build(); List rows = dataset.getColumnKeys(); for(int i = 0; i < rows.size(); i ++){ Object row = rows.get(i);