|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.esri.arcgis.framework.ListDialog
public class ListDialog
List Dialog object.
The list dialog is a dialog used to present a list of options and allows the user to select one of the options.
Constructor Summary | |
---|---|
ListDialog()
Constructs a ListDialog using ArcGIS Engine. |
|
ListDialog(Object obj)
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts. ListDialog theListDialog = (ListDialog) obj; |
Method Summary | |
---|---|
void |
addString(String choice)
Adds a string to the list that the dialog will show. |
boolean |
doModal(String title,
int initialChoice,
int hWnd)
Displays the list dialog and lets the user select a choice. |
boolean |
equals(Object o)
Compare this object with another |
int |
getChoice()
The index of the string chosen (use after calling DoModal). |
static String |
getClsid()
getClsid. |
int |
hashCode()
the hashcode for this object |
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 ListDialog() throws IOException, UnknownHostException
IOException
- if there are interop problems
UnknownHostException
- if there are interop problemspublic ListDialog(Object obj) throws IOException
ListDialog theListDialog = (ListDialog) obj;
obj
to ListDialog
.
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 addString(String choice) throws IOException, AutomationException
Choice is a string that will be used as an item in the list displayed by the dialog.
The AddString method is used to populate the list that is displayed in the dialog. When the dialog is displayed, the items in the list are sorted in alphabetical order.
The following code shows a list in the dialog and then reports
the string associated with the selected item. You would get m_app
from the hook in ICommand::OnCreate().
addString
in interface IListDialog
choice
- The choice (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getChoice() throws IOException, AutomationException
The Choice property returns the index of the selected item in the list. The items are numbered starting at 0 in the order that they were added, not the order that they appear in the dialog.
getChoice
in interface IListDialog
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean doModal(String title, int initialChoice, int hWnd) throws IOException, AutomationException
Title is a string that specifies the title of the dialog.
initialChoice specifies the index of the item in the list that is initially selected when the dialog is shown. The items are numbered starting at 0 in the order that they were added to the list.
hWnd specifies the window handle of the parent window. In most cases this will be the hWnd of the application.
The DoModal method returns False if the dialog was cancelled.
doModal
in interface IListDialog
title
- The title (in)initialChoice
- The initialChoice (in)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 |