|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IColorPalette
Provides access to members that control the Color Palette.
The ColorPalette is a pop-up style dialog that allows a user to select a particular color interactively.
The ColorPalette provides options to the user to show further color dialogs. Clicking the 'More Colors' option will display the ColorSelector dialog, which in turn allows the user to display the ColorBrowser dialog. In this way, the ColorPalette provides the developer with a simple way to allow the user to select from the full range of colors and color models available.
The following example shows how to display a ColorPalette with three simple colors. You would get m_app from the hook in ICommand::OnCreate().
Use this interface to allow a user to select a color interactively.
Method Summary | |
---|---|
IColor |
getColor()
The Selected Color. |
boolean |
trackPopupMenu(tagRECT rect,
IColor currentColor,
boolean orientation,
int hParentWnd)
Show Color Palette. |
Method Detail |
---|
boolean trackPopupMenu(tagRECT rect, IColor currentColor, boolean orientation, int hParentWnd) throws IOException, AutomationException
The TrackPopupMenu method displays the ColorPalette dialog on the screen.
The TrackPopupMenu method controls the display of the palette with four parameters.
rect
- A Structure: com.esri.arcgis.system.tagRECT (in)currentColor
- A reference to a com.esri.arcgis.display.IColor (in)orientation
- The orientation (in)hParentWnd
- The hParentWnd (A COM typedef) (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IColor getColor() throws IOException, AutomationException
The Color property of the IColorPalette interface returns the color selected during the TrackPopupMenu method.
The Color property may return the IColor interface of either an RgbColor, HsvColor, HlsColor, CmykColor or GrayColor coclass.
If the user selects a specific color, the Color property will return that selected color. If the user selects the More Colors option and selects a color from the ColorSelector that is then displayed, the IColorPalette Color property will return that color.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IColorPalette.trackPopupMenu(com.esri.arcgis.system.tagRECT, com.esri.arcgis.display.IColor, boolean, int)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |