From f542c9eed334b8cbb8efaf7d82f2b4aaccfe7160 Mon Sep 17 00:00:00 2001 From: luukkainen Date: Thu, 15 May 2014 09:20:21 +0000 Subject: [PATCH] Allow getting "other" item/category from FilteredDataset fixes #4881 git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@29496 ac1ea38d-2e2b-0410-8846-a27921b304fc --- .../src/org/simantics/jfreechart/chart/FilteredDataset.java | 3 +++ .../simantics/jfreechart/chart/FilteringCategoryDataset.java | 4 ++++ .../org/simantics/jfreechart/chart/FilteringPieDataset.java | 4 ++++ 3 files changed, 11 insertions(+) diff --git a/org.simantics.jfreechart/src/org/simantics/jfreechart/chart/FilteredDataset.java b/org.simantics.jfreechart/src/org/simantics/jfreechart/chart/FilteredDataset.java index 1d11f122..a5770ffc 100644 --- a/org.simantics.jfreechart/src/org/simantics/jfreechart/chart/FilteredDataset.java +++ b/org.simantics.jfreechart/src/org/simantics/jfreechart/chart/FilteredDataset.java @@ -23,4 +23,7 @@ public interface FilteredDataset { public void setFilterFraction(double filterFraction); public void updateFiltered(); + + @SuppressWarnings("rawtypes") + public Comparable getOther(); } diff --git a/org.simantics.jfreechart/src/org/simantics/jfreechart/chart/FilteringCategoryDataset.java b/org.simantics.jfreechart/src/org/simantics/jfreechart/chart/FilteringCategoryDataset.java index fb5ec1a7..df619550 100644 --- a/org.simantics.jfreechart/src/org/simantics/jfreechart/chart/FilteringCategoryDataset.java +++ b/org.simantics.jfreechart/src/org/simantics/jfreechart/chart/FilteringCategoryDataset.java @@ -178,6 +178,10 @@ public class FilteringCategoryDataset extends AbstractDataset implements org.jfr return used.getColumnIndex(key); } + public Comparable getOther() { + return other; + } + diff --git a/org.simantics.jfreechart/src/org/simantics/jfreechart/chart/FilteringPieDataset.java b/org.simantics.jfreechart/src/org/simantics/jfreechart/chart/FilteringPieDataset.java index dacef528..acc6f3be 100644 --- a/org.simantics.jfreechart/src/org/simantics/jfreechart/chart/FilteringPieDataset.java +++ b/org.simantics.jfreechart/src/org/simantics/jfreechart/chart/FilteringPieDataset.java @@ -112,5 +112,9 @@ public class FilteringPieDataset extends AbstractDataset implements PieDataset, public Number getValue(int index) { return used.getValue(index); } + + public Comparable getOther() { + return other; + } } -- 2.47.1