public final class ColorMap extends Object
Modifier and Type | Field and Description |
---|---|
static RenderingHints.Key |
KEY_METAFILES_COLOR_MAP
RenderingHint Key to use with ColorMap
|
static RenderingHints.Key |
METAFILES_COLOR_MAP
Deprecated.
Use KEY_METAFILES_COLOR_MAP instead.
|
Constructor and Description |
---|
ColorMap(int initialSize)
Constructs an empty ColorMap with the specified initial capacity.
|
ColorMap(Map colorMap)
Constructs a new ColorMap with the same mappings as the specified Map.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isEmpty()
Returns true if this map contains no color mappings.
|
Color |
mapColor(Color color)
Returns the color to which the specified color is mapped, or null if the
map contains no mapping for this color.
|
void |
put(Color key,
Color value)
Associates the specified color with specified key-color in this map.
|
void |
putAll(Map colorMap)
Copies all of the mappings from the specified map to this map.
|
public static RenderingHints.Key KEY_METAFILES_COLOR_MAP
public static RenderingHints.Key METAFILES_COLOR_MAP
public ColorMap(int initialSize)
initialSize
- the initial capacity.public ColorMap(Map colorMap) throws MetafilesException
colorMap
- the map whose mappings are to be placed in this map.MetafilesException
- if the specified map contains any keys or values except
Color.public void putAll(Map colorMap) throws MetafilesException
colorMap
- mappings to be stored in this map.MetafilesException
- if the specified map contains any keys or values except
Color.public void put(Color key, Color value) throws MetafilesException
key
- key-color with which the specified color is to be associated.value
- color to be associated with the specified key-color.MetafilesException
- if any of both colors is null.public Color mapColor(Color color)
color
- the color whose associated value is to be returned.public boolean isEmpty()
Copyright (c) 2008-2016 Aspose Pty Ltd. All Rights Reserved.