com.esri.arcgis.display
Interface IPresetColorRamp

All Superinterfaces:
IColorRamp, Serializable
All Known Implementing Classes:
PresetColorRamp

public interface IPresetColorRamp
extends IColorRamp, Serializable

Provides access to members that control the PresetColorRamp. A color ramp that must contain exactly 13 preset colors.

Description

IPresetColorRamp is designed to exactly mimic the behavior of ArcView 3.x's color ramps. Thus, it contains exactly 13 colors in a sequence that is defined by the order the colors are defined.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

See Also:
IPresetColorRamp, IMultiPartColorRamp, IAlgorithmicColorRamp, IColorRamp.getColor(int), IRandomColorRamp, IColorRamp.createRamp(boolean[]), IColorRamp

Method Summary
 int getNumberOfPresetColors()
          The number of valid colors in the color ramp.
 IColor getPresetColor(int index)
          The color at the index position.
 void setPresetColor(int index, IColor color)
          The color at the index position.
 
Methods inherited from interface com.esri.arcgis.display.IColorRamp
createRamp, getColor, getColors, getName, getSize, setName, setSize
 

Method Detail

setPresetColor

void setPresetColor(int index,
                    IColor color)
                    throws IOException,
                           AutomationException
The color at the index position.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
index - The index (in)
color - A reference to a com.esri.arcgis.display.IColor (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getPresetColor

IColor getPresetColor(int index)
                      throws IOException,
                             AutomationException
The color at the index position.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
index - The index (in)
Returns:
A reference to a com.esri.arcgis.display.IColor
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getNumberOfPresetColors

int getNumberOfPresetColors()
                            throws IOException,
                                   AutomationException
The number of valid colors in the color ramp. This must equal 13 before you can get values from the ramp.

Description

NumberOfPresetColors is the number of colors currently in an IPresetColorRamp . Since there are exactly 13 slots for colors, NumberOfPresetColors reports the number of slots that actually have a color assigned.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Returns:
The count
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.