com.supermap.data

Class ColorDictionary



  • public class ColorDictionary
    extends InternalHandleDisposable
    color Dictionary table class, color dictionary consists of key value pairs.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void clear()
      clear all items.
      void dispose()
      Releases all resources that the object occupies.
      Color getColor(double key)
      obtains colors presented by specified key in color dictionary table
      Color[] getColors()
      obtains color dictionary table color array.
      int getCount()
      Obtains the number of key value in table
      double[] getKeys()
      obtains color dictionary table value array.
      void removeKey(double key)
      Removes the specified items.
      void setColor(double key, Color value)
      add color into table
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ColorDictionary

        public ColorDictionary()
        Constructs a new ColorDictionary object.
      • ColorDictionary

        public ColorDictionary(ColorDictionary clrDict)
        Constructs a same ColorDictionary object.
        Parameters:
        clrDict - specified color dictionary class.
    • Method Detail

      • getKeys

        public double[] getKeys()
        obtains color dictionary table value array.
        Returns:
        value array.
      • getColors

        public Color[] getColors()
        obtains color dictionary table color array.
        Returns:
        the color array.
      • getColor

        public Color getColor(double key)
        obtains colors presented by specified key in color dictionary table
        Parameters:
        key - specified key value.
        Returns:
        key corresponding color
      • setColor

        public void setColor(double key,
                             Color value)
        add color into table
        Parameters:
        key - specified value.
        value - specified color.
      • getCount

        public int getCount()
        Obtains the number of key value in table
        Returns:
        the number of key value in table
      • removeKey

        public void removeKey(double key)
        Removes the specified items.
        Parameters:
        key - the key value of items to remove
      • clear

        public void clear()
        clear all items.
      • dispose

        public void dispose()
        Releases all resources that the object occupies.