|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.esri.arcgis.framework.ColorBrowser
public class ColorBrowser
Esri Custom Color Dialog.
The ColorBrowser allows the user to select a color by specifying individual RGB, CMYK, HSV, HLS, or gray color properties.
Use the ColorBrowser coclass to display the ArcMap color browser dialog box. Note that this coclass should only be used from within the ArcMap framework.
Edit a color by specifying red, green, and blue proportions. The selected color internally uses the RGB color model.
Edit a color by specifying cyan, magenta, yellow, and black proportions. The selected color internally uses the CMYK color model.
Edit a color by specifying hue, saturation, and value proportions. The selected color internally uses the HSV color model.
Edit a color by specifying the depth of grayness. The selected color internally uses the gray color model.
Edit a color by specifying a name selected from a fixed ArcMap color list. The selected color internally uses the HLS color model.
Constructor Summary | |
---|---|
ColorBrowser()
Constructs a ColorBrowser using ArcGIS Engine. |
|
ColorBrowser(Object obj)
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts. ColorBrowser theColorBrowser = (ColorBrowser) obj; |
Method Summary | |
---|---|
boolean |
doModal(int hWnd)
Show the browser. |
boolean |
equals(Object o)
Compare this object with another |
static String |
getClsid()
getClsid. |
IColor |
getColor()
Color edited by the browser. |
int |
hashCode()
the hashcode for this object |
void |
setColor(IColor color)
Color edited by the browser. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.esri.arcgis.interop.RemoteObjRef |
---|
getJintegraDispatch, release |
Constructor Detail |
---|
public ColorBrowser() throws IOException, UnknownHostException
IOException
- if there are interop problems
UnknownHostException
- if there are interop problemspublic ColorBrowser(Object obj) throws IOException
ColorBrowser theColorBrowser = (ColorBrowser) obj;
obj
to ColorBrowser
.
obj
- an object returned from ArcGIS Engine or Server
IOException
- if there are interop problemsMethod Detail |
---|
public static String getClsid()
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public void setColor(IColor color) throws IOException, AutomationException
Set the Color property to an existing IColor object—the type of coclass you use will determine what options the dialog displays for editing the colors (see the pictures in the ColorBrowser topic).
The following code creates an intial color to show in the color browser, displays the color browser, and then sets a new color to the selected color in the color browser. You would get m_app from the hook in ICommand::OnCreate().
setColor
in interface IColorBrowser
color
- A reference to a com.esri.arcgis.display.IColor (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IColor getColor() throws IOException, AutomationException
Set the Color property to an existing IColor object—the type of coclass you use will determine what options the dialog displays for editing the colors (see the pictures in the ColorBrowser topic).
getColor
in interface IColorBrowser
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean doModal(int hWnd) throws IOException, AutomationException
To display the dialog box, you should call the DoModal method. The method takes one parameter, a handle to the Application object of the ArcMap framework.
The DoModal method returns a Boolean—you should check the result to determine if the user intended to cancel the action (the result is False) or click OK (the result is True).
doModal
in interface IColorBrowser
hWnd
- The hWnd (A COM typedef) (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |