[Schmitzm-commits] r262 - in trunk/src/schmitzm: geotools/gui jfree/chart/style
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Fri Jul 31 19:19:34 CEST 2009
Author: alfonx
Date: 2009-07-31 19:19:34 +0200 (Fri, 31 Jul 2009)
New Revision: 262
Modified:
trunk/src/schmitzm/geotools/gui/JMapPane.java
trunk/src/schmitzm/jfree/chart/style/ChartType.java
Log:
* Chart Wizard hacking
* new Min/Max functions in ChartType
Modified: trunk/src/schmitzm/geotools/gui/JMapPane.java
===================================================================
--- trunk/src/schmitzm/geotools/gui/JMapPane.java 2009-07-31 17:05:18 UTC (rev 261)
+++ trunk/src/schmitzm/geotools/gui/JMapPane.java 2009-07-31 17:19:34 UTC (rev 262)
@@ -60,7 +60,6 @@
import org.geotools.coverage.grid.GridGeometry2D;
import org.geotools.coverage.grid.io.AbstractGridCoverage2DReader;
import org.geotools.coverage.grid.io.AbstractGridFormat;
-import org.geotools.coverage.io.AbstractGridCoverageReader;
import org.geotools.data.FeatureSource;
import org.geotools.data.memory.MemoryFeatureCollection;
import org.geotools.factory.GeoTools;
Modified: trunk/src/schmitzm/jfree/chart/style/ChartType.java
===================================================================
--- trunk/src/schmitzm/jfree/chart/style/ChartType.java 2009-07-31 17:05:18 UTC (rev 261)
+++ trunk/src/schmitzm/jfree/chart/style/ChartType.java 2009-07-31 17:19:34 UTC (rev 262)
@@ -120,12 +120,9 @@
}
/**
- * @return the total number of possible variables presented in this chart -
- * no matter what datatype they require. This function usually
- * returns value 1 or 2.
- * @see #getCountOfRequiredNumericFields()
+ * @return Minimal required number of series.
*/
- public int getCountOfRequiredFields() {
+ public int getMinDimensions() {
switch (this) {
case BAR:
case LINE:
@@ -133,29 +130,31 @@
case POINT:
case SCATTER:
return 2;
+ case PIE:
default:
return 1;
}
}
/**
- * @return the number of numeric variables needed to create this type of
- * chart. Usually return a value 0,1 or 2.
- * @see #getCountOfRequiredFields()
+ * @return Maximum allowed number of series. -1 = no limits
*/
- public int getCountOfRequiredNumericFields() {
+ public int getMaxDimensions() {
switch (this) {
+ case SCATTER:
+ return 2;
+ case PIE:
+ return 1;
case BAR:
case LINE:
case AREA:
case POINT:
- case SCATTER:
- return 2;
default:
- return 0;
+ return -1;
}
}
+
/**
* Does the {@link ChartType} allow category data for the domain axis?
*/
More information about the Schmitzm-commits
mailing list