com.supermap.data
Class ColorDictionary
- java.lang.Object
-
- com.supermap.data.InternalHandle
-
- com.supermap.data.InternalHandleDisposable
-
- com.supermap.data.ColorDictionary
-
public class ColorDictionary extends InternalHandleDisposable
color Dictionary table class, color dictionary consists of key value pairs.
-
-
Constructor Summary
Constructors Constructor and Description ColorDictionary()
Constructs a new ColorDictionary object.ColorDictionary(ColorDictionary clrDict)
Constructs a same ColorDictionary object.
-
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 tableColor[]
getColors()
obtains color dictionary table color array.int
getCount()
Obtains the number of key value in tabledouble[]
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
-
-
-
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.
-
-