--- trunk/src/skrueger/RasterLegendData.java 2009/02/24 22:43:52 2
+++ trunk/src/skrueger/RasterLegendData.java 2009/07/29 09:33:33 244
@@ -1,56 +1,85 @@
-package skrueger;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.apache.log4j.Logger;
-
-import skrueger.i8n.Translation;
-
-/**
- * Holds all the additional information needed to paint a Legend for a RasterLayer.
- * So far, only Legends for one-band raster layers are supported.
- *
- * @author Stefan Alfons Krüger
- *
- */
-public class RasterLegendData extends HashMap {
- static private final Logger LOGGER = Logger.getLogger(RasterLegendData.class);
- private Boolean paintGaps = false;
-
- public Boolean isPaintGaps() {
- return paintGaps;
- }
-
- public void setPaintGaps(boolean paintPaps) {
- this.paintGaps = paintPaps;
- }
-
- /**
- * {@link #paintGaps} defines, if gaps should be painted between the legends colors,
- * indicating nominal values in the raster (e.g. classifications)
- */
- public RasterLegendData(boolean paintGaps) {
- super();
- this.paintGaps = paintGaps;
- }
-
- public boolean getPaintGaps() {
- return paintGaps ;
- }
-
- public List getSortedKeys(){
- Object[] array = keySet().toArray();
-
- Arrays.sort(array);
-
- final LinkedList linkedList = new LinkedList();
- for (Object o : array){
- linkedList.add( (Double)o);
- }
-
- return linkedList;
-
- }
-}
+/*******************************************************************************
+ * Copyright (c) 2009 Martin O. J. Schmitz.
+ *
+ * This file is part of the SCHMITZM library - a collection of utility
+ * classes based on Java 1.6, focussing (not only) on Java Swing
+ * and the Geotools library.
+ *
+ * The SCHMITZM project is hosted at:
+ * http://wald.intevation.org/projects/schmitzm/
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License (license.txt)
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * or try this link: http://www.gnu.org/licenses/lgpl.html
+ *
+ * Contributors:
+ * Martin O. J. Schmitz - initial API and implementation
+ * Stefan A. Krüger - additional utility classes
+ ******************************************************************************/
+package skrueger;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.apache.log4j.Logger;
+
+import skrueger.i8n.Translation;
+
+/**
+ * Holds all the additional information needed to paint a Legend for a RasterLayer.
+ * So far, only Legends for one-band raster layers are supported.
+ *
+ * @author Stefan Alfons Krüger
+ *
+ */
+public class RasterLegendData extends HashMap {
+ static private final Logger LOGGER = Logger.getLogger(RasterLegendData.class);
+ private Boolean paintGaps = false;
+
+ public Boolean isPaintGaps() {
+ return paintGaps;
+ }
+
+ public void setPaintGaps(boolean paintPaps) {
+ this.paintGaps = paintPaps;
+ }
+
+ /**
+ * {@link #paintGaps} defines, if gaps should be painted between the legends colors,
+ * indicating nominal values in the raster (e.g. classifications)
+ */
+ public RasterLegendData(boolean paintGaps) {
+ super();
+ this.paintGaps = paintGaps;
+ }
+
+ public boolean getPaintGaps() {
+ return paintGaps ;
+ }
+
+ public List getSortedKeys(){
+ Object[] array = keySet().toArray();
+
+ Arrays.sort(array);
+
+ final LinkedList linkedList = new LinkedList();
+ for (Object o : array){
+ linkedList.add( (Double)o);
+ }
+
+ return linkedList;
+
+ }
+}