Class ColorMapImpl

Object
ColorMapImpl
All Implemented Interfaces:
ColorMap

public class ColorMapImpl extends Object implements ColorMap
A simple implementation of the color map interface.
Author:
iant, aaime
  • Constructor Details

    • ColorMapImpl

      public ColorMapImpl()
    • ColorMapImpl

      public ColorMapImpl(Function function)
  • Method Details

    • addColorMapEntry

      public void addColorMapEntry(ColorMapEntry entry)
      Specified by:
      addColorMapEntry in interface ColorMap
    • getColorMapEntries

      public ColorMapEntry[] getColorMapEntries()
      Specified by:
      getColorMapEntries in interface ColorMap
    • getColorMapEntry

      public ColorMapEntry getColorMapEntry(int index)
      Specified by:
      getColorMapEntry in interface ColorMap
    • getType

      public int getType()
      Description copied from interface: ColorMap
      Type of color map; matchinges the function returned by getFunction().getName()
      Specified by:
      getType in interface ColorMap
      Returns:
      One of TYPE_RAMP, TYPE_INTERVALS, or TYPE_VALUE
      See Also:
      • org.geotools.styling.ColorMap#getType()
    • setType

      public void setType(int type)
      Specified by:
      setType in interface ColorMap
      Parameters:
      type - One of TYPE_RAMP, TYPE_INTERVALS, or TYPE_VALUE
      See Also:
      • org.geotools.styling.ColorMap#setType(int)
    • accept

      public Object accept(TraversingStyleVisitor visitor, Object data)
      Description copied from interface: ColorMap
      calls the visit method of a StyleVisitor
      Specified by:
      accept in interface ColorMap
      Parameters:
      visitor - the style visitor
    • getExtendedColors

      public boolean getExtendedColors()
      Specified by:
      getExtendedColors in interface ColorMap
    • setExtendedColors

      public void setExtendedColors(boolean extended)
      Description copied from interface: ColorMap
      Tells me to use 65536 colors even if 256 could suffice.
      Specified by:
      setExtendedColors in interface ColorMap
      Parameters:
      extended - true for using 65536 colors, false for using 256.
    • getFunction

      public Function getFunction()
      Specified by:
      getFunction in interface ColorMap
      Returns:
      Interpolate or Categorize function
    • accept

      public void accept(StyleVisitor visitor)
      Specified by:
      accept in interface ColorMap
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object