skrueger
Class RasterLegendData

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.TreeMap<Double,Translation>
          extended by skrueger.RasterLegendData
All Implemented Interfaces:
Serializable, Cloneable, Map<Double,Translation>, NavigableMap<Double,Translation>, SortedMap<Double,Translation>, Copyable<RasterLegendData>

public class RasterLegendData
extends TreeMap<Double,Translation>
implements Copyable<RasterLegendData>

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 TODO implements Copyable
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
Constructor Summary
RasterLegendData(boolean paintGaps)
          paintGaps defines, if gaps should be painted between the legends colors, indicating nominal values in the raster (e.g. classifications)
 
Method Summary
 RasterLegendData copy()
          Creates a new RasterLegendData object with identical values
 RasterLegendData copyTo(RasterLegendData target)
          Deep-copies all values of this RasterLegendData to another RasterLegendData
 Map<Double,GridCoverage2D> createSampleRasters()
          Creates a sample GridCoverage2D (size 1x1, WGS84) for each legend value.
 List<Double> getSortedKeys()
          Returns a new list containing all Double values that shall apear in the legend.
 Boolean isPaintGaps()
          Shall bigger gaps be painted between the raster images
 void setPaintGaps(boolean paintPaps)
           
 
Methods inherited from class java.util.TreeMap
ceilingEntry, ceilingKey, clear, clone, comparator, containsKey, containsValue, descendingKeySet, descendingMap, entrySet, firstEntry, firstKey, floorEntry, floorKey, get, headMap, headMap, higherEntry, higherKey, keySet, lastEntry, lastKey, lowerEntry, lowerKey, navigableKeySet, pollFirstEntry, pollLastEntry, put, putAll, remove, size, subMap, subMap, tailMap, tailMap, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, isEmpty, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode, isEmpty
 

Constructor Detail

RasterLegendData

public RasterLegendData(boolean paintGaps)
paintGaps defines, if gaps should be painted between the legends colors, indicating nominal values in the raster (e.g. classifications)

Method Detail

isPaintGaps

public Boolean isPaintGaps()
Shall bigger gaps be painted between the raster images


setPaintGaps

public void setPaintGaps(boolean paintPaps)

getSortedKeys

public List<Double> getSortedKeys()
Returns a new list containing all Double values that shall apear in the legend.


createSampleRasters

public Map<Double,GridCoverage2D> createSampleRasters()
Creates a sample GridCoverage2D (size 1x1, WGS84) for each legend value. These rasters can be used to do visualize the legend item in the corresponding color via GridCoverageRenderer.


copy

public RasterLegendData copy()
Creates a new RasterLegendData object with identical values

Specified by:
copy in interface Copyable<RasterLegendData>

copyTo

public RasterLegendData copyTo(RasterLegendData target)
Deep-copies all values of this RasterLegendData to another RasterLegendData

Specified by:
copyTo in interface Copyable<RasterLegendData>