/** * Adds a mean and standard deviation to the table. * * @param mean the mean. * @param standardDeviation the standard deviation. * @param rowKey the row key. * @param columnKey the column key. */ public void add(double mean, double standardDeviation, Comparable rowKey, Comparable columnKey) { add(new Double(mean), new Double(standardDeviation), rowKey, columnKey); }
/** * Returns the value for an item (for this dataset, the mean value is * returned). * * @param rowKey the row key. * @param columnKey the columnKey. * * @return The value (possibly {@code null}). */ @Override public Number getValue(Comparable rowKey, Comparable columnKey) { return getMeanValue(rowKey, columnKey); }
/** * Clears all data from the dataset and sends a {@link DatasetChangeEvent} * to all registered listeners. * * @since 1.0.7 */ public void clear() { this.data.clear(); updateBounds(); fireDatasetChanged(); }
int r = getRowIndex(rowKey); int c = getColumnIndex(columnKey); this.data.removeObject(rowKey, columnKey); updateBounds(); fireDatasetChanged();
}); DefaultStatisticalCategoryDataset result = new DefaultStatisticalCategoryDataset(); for(Comparable<?> seriesId : seenSeriesIds) { for(Comparable<?> categoryId : seenCategoryIds) { List<Number> vals = keyToValue.getOrDefault(Arrays.asList(seriesId, categoryId), Arrays.<Number>asList(0.0, 0.0)); result.add(vals.get(0), vals.get(1), seriesId, categoryId);
this.setToolTipText("<html>Intensity: " + roundDouble((Double) tempSet.getMeanValue(0, 0), 4) + "<br>" + "STDEV: " + roundDouble((Double) tempSet.getStdDevValue(0, 0), 4) + "</html>"); double temp = tempSet.getMeanValue(0, 0).doubleValue(); valueLabel.setText(numberFormat.format(temp)); Color currentColor = GradientColorCoding.findGradientColor((Double) tempSet.getMeanValue(0, 0), minValue, maxValue, currentColorGradient, positiveColorGradient); renderer = new StatisticalBarChartColorRenderer(currentColor); } else { if ((Double) tempSet.getMeanValue(0, 0) >= 0) { renderer = new StatisticalBarChartColorRenderer(positiveValuesColor); } else {
/** * Sets up the table cell renderer and the bar chart. * * @param plotOrientation */ private void setUpRendererAndChart(PlotOrientation plotOrientation) { setName("Table.cellRenderer"); setLayout(new BorderLayout()); valueLabel = new JLabel(""); valueLabel.setMinimumSize(new Dimension(widthOfValueLabel, 0)); valueLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); valueLabel.setFont(valueLabel.getFont().deriveFont(valueLabel.getFont().getSize() - 2f)); signifianceLabel = new JLabel(""); signifianceLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); DefaultStatisticalCategoryDataset dataset = new DefaultStatisticalCategoryDataset(); chart = ChartFactory.createBarChart(null, null, null, dataset, plotOrientation, false, false, false); this.chartPanel = new ChartPanel(chart); this.setLayout(new BoxLayout(this, BoxLayout.LINE_AXIS)); this.add(valueLabel); this.add(chartPanel); this.add(signifianceLabel); }
int r = getRowIndex(rowKey); int c = getColumnIndex(columnKey); this.data.removeObject(rowKey, columnKey); updateBounds(); fireDatasetChanged();
private DefaultStatisticalCategoryDataset createDataset() final DefaultStatisticalCategoryDataset dataset = new DefaultStatisticalCategoryDataset(); int count = 0; variance = stat.getMemStat("var"); dataset.add(mean, Math.sqrt(variance), stat.getTask().toString(), release.getVersion());
/** * Clears all data from the dataset and sends a {@link DatasetChangeEvent} * to all registered listeners. * * @since 1.0.7 */ public void clear() { this.data.clear(); updateBounds(); fireDatasetChanged(); }
/** * Returns the value for an item (for this dataset, the mean value is * returned). * * @param row the row index. * @param column the column index. * * @return The value (possibly <code>null</code>). */ public Number getValue(int row, int column) { return getMeanValue(row, column); }
/** * Adds a mean and standard deviation to the table. * * @param mean the mean. * @param standardDeviation the standard deviation. * @param rowKey the row key. * @param columnKey the column key. */ public void add(double mean, double standardDeviation, Comparable rowKey, Comparable columnKey) { add(new Double(mean), new Double(standardDeviation), rowKey, columnKey); }
/** * Removes a column from the dataset and sends a {@link DatasetChangeEvent} * to all registered listeners. * * @param columnKey the column key ({@code null} not permitted). * * @see #removeRow(Comparable) * * @since 1.0.7 */ public void removeColumn(Comparable columnKey) { this.data.removeColumn(columnKey); updateBounds(); fireDatasetChanged(); }
/** * Returns the value for an item (for this dataset, the mean value is * returned). * * @param row the row index. * @param column the column index. * * @return The value (possibly {@code null}). */ @Override public Number getValue(int row, int column) { return getMeanValue(row, column); }
/** * Removes a row from the dataset and sends a {@link DatasetChangeEvent} * to all registered listeners. * * @param rowKey the row key ({@code null} not permitted). * * @see #removeColumn(Comparable) * * @since 1.0.7 */ public void removeRow(Comparable rowKey) { this.data.removeRow(rowKey); updateBounds(); fireDatasetChanged(); }
/** * Returns the value for an item (for this dataset, the mean value is * returned). * * @param rowKey the row key. * @param columnKey the columnKey. * * @return The value (possibly <code>null</code>). */ public Number getValue(Comparable rowKey, Comparable columnKey) { return getMeanValue(rowKey, columnKey); }
/** * Removes a column from the dataset and sends a {@link DatasetChangeEvent} * to all registered listeners. * * @param columnIndex the column index. * * @see #removeRow(int) * * @since 1.0.7 */ public void removeColumn(int columnIndex) { this.data.removeColumn(columnIndex); updateBounds(); fireDatasetChanged(); }
/** * Removes a row from the dataset and sends a {@link DatasetChangeEvent} * to all registered listeners. * * @param rowKey the row key (<code>null</code> not permitted). * * @see #removeColumn(Comparable) * * @since 1.0.7 */ public void removeRow(Comparable rowKey) { this.data.removeRow(rowKey); updateBounds(); fireDatasetChanged(); }
/** * Removes a row from the dataset and sends a {@link DatasetChangeEvent} * to all registered listeners. * * @param rowIndex the row index. * * @see #removeColumn(int) * * @since 1.0.7 */ public void removeRow(int rowIndex) { this.data.removeRow(rowIndex); updateBounds(); fireDatasetChanged(); }
/** * Removes a row from the dataset and sends a {@link DatasetChangeEvent} * to all registered listeners. * * @param rowIndex the row index. * * @see #removeColumn(int) * * @since 1.0.7 */ public void removeRow(int rowIndex) { this.data.removeRow(rowIndex); updateBounds(); fireDatasetChanged(); }