comparison artifacts/src/main/java/org/dive4elements/river/jfree/AxisDataset.java @ 9555:ef5754ba5573

Implemented legend aggregation based on type of themes. Added theme-editor style configuration for aggregated legend entries. Only configured themes get aggregated.
author gernotbelger
date Tue, 23 Oct 2018 16:26:48 +0200
parents d8e753d0fdb9
children
comparison
equal deleted inserted replaced
9554:33ce8eba9806 9555:ef5754ba5573
19 /** 19 /**
20 * Axis datasets. 20 * Axis datasets.
21 */ 21 */
22 public class AxisDataset { 22 public class AxisDataset {
23 23
24 /** Symbolic integer, but also coding the priority (0 goes first). */
25 protected int axisSymbol;
26
27 /** List of assigned datasets (in order). */ 24 /** List of assigned datasets (in order). */
28 protected List<XYDataset> datasets; 25 private final List<XYDataset> datasets = new ArrayList<>();
29 26
30 /** Range to use to include all given datasets. */ 27 /** Range to use to include all given datasets. */
31 protected Range range; 28 private Range range;
32 29
33 /** Index of axis in plot. */ 30 private boolean rangeDirty;
34 protected int plotAxisIndex;
35
36 protected boolean rangeDirty;
37
38 /** Create AxisDataset. */
39 public AxisDataset(final int symb) {
40 this.axisSymbol = symb;
41 this.datasets = new ArrayList<>();
42 }
43 31
44 /** Add a dataset to internal list for this axis. */ 32 /** Add a dataset to internal list for this axis. */
45 public void addDataset(final XYDataset dataset) { 33 public void addDataset(final XYDataset dataset) {
46 this.datasets.add(dataset); 34 this.datasets.add(dataset);
47 this.rangeDirty = true; 35 this.rangeDirty = true;
97 85
98 /** True if no datasets given. */ 86 /** True if no datasets given. */
99 public boolean isEmpty() { 87 public boolean isEmpty() {
100 return this.datasets.isEmpty(); 88 return this.datasets.isEmpty();
101 } 89 }
102
103 /** Set the 'real' axis index that this axis is mapped to. */
104 public void setPlotAxisIndex(final int axisIndex) {
105 this.plotAxisIndex = axisIndex;
106 }
107
108 /** Get the 'real' axis index that this axis is mapped to. */
109 public int getPlotAxisIndex() {
110 return this.plotAxisIndex;
111 }
112 } 90 }

http://dive4elements.wald.intevation.org