|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.esri.arcgis.addins.desktop.ComboBox
public abstract class ComboBox
Abstract base implementation of ArcGIS combo boxes.
This class should be subclassed by clients wishing to define new combo boxes.
The name of the subclass should be given as the "class
" attribute
in a ComboBox
extension contributed to the ArcGIS application framework.
For example, the add-in's config.xml markup might contain:
<ComboBox id="test_combobox" editable="true" sizeString="WWWWW" rows="10" itemSizeString="WWWWWWWWWW" hintText="hint" class="arcgissamples.addins.button.MyComboBox" caption="comboBox" category="Framework AddIn Samples" image="Images/Addlayer.png" tip="tip" message="message"> </ComboBox>
initialize
- to initializes this combo box and add members to it using the add() methodonEditChange
- called by system when the edit box is typed into (if editable)onSelChange
- called by system when a selection changesonFocus
- called by system when the combo box gets or loses focusonEnter
- called by system when the Enter key is pressed in the edit box (if editable)isEnabled
- if this combo box is not always enabledadd
- to add an element to the combo boxremove
- to remove an element from the combo boxclear
- to clear the combo box of all itemsselect
- to select an item in the combo boxgetSelected
- to get the currently selected item in the combo box
Field Summary | |
---|---|
IComboBoxHook |
hook
|
Constructor Summary | |
---|---|
ComboBox()
|
Method Summary | |
---|---|
int |
add(String str)
Call this method from the derived class to add an element to the combo box |
void |
clear()
Call this method from the derived class to clear (delete all element from) the combo box |
int |
getSelected()
Call this method from the derived class to get the currently selected item in the combo box |
abstract void |
initialize()
Called when the combo box is initialized. |
boolean |
isEnabled()
Returns whether this combo box is enabled. |
abstract void |
onEditChange(String editString)
Called by system when the edit box is typed into (if editable) |
abstract void |
onEnter()
Called by system when the Enter key is pressed in the edit box (if editable) |
abstract void |
onFocus(boolean setFocus)
Called by system when the combo box gets or loses focus |
abstract void |
onSelChange(int cookie)
Called by system when a selection changes |
void |
remove(int cookie)
Call this method from the derived class to delete an element from the combo box |
void |
select(int cookie)
Call this method from the derived class to select an element in the combo box |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public IComboBoxHook hook
Constructor Detail |
---|
public ComboBox()
Method Detail |
---|
public abstract void initialize()
IOException
- if there are interop problems.
AutomationException
- if the component throws an ArcObjects exception.public abstract void onEditChange(String editString) throws IOException, AutomationException
editString
- the String typed into the edit box
IOException
- if there are interop problems.
AutomationException
- if the component throws an ArcObjects exception.public abstract void onSelChange(int cookie) throws IOException, AutomationException
cookie
- the item selected
IOException
- if there are interop problems.
AutomationException
- if the component throws an ArcObjects exception.public abstract void onFocus(boolean setFocus) throws IOException, AutomationException
setFocus
- - true when combo box gets focus, false when it loses focus
IOException
- if there are interop problems.
AutomationException
- if the component throws an ArcObjects exception.public abstract void onEnter() throws IOException, AutomationException
IOException
- if there are interop problems.
AutomationException
- if the component throws an ArcObjects exception.public boolean isEnabled() throws IOException, AutomationException
The default implementation returns true to indicate that the combo box is always enabled.
Override this method if the combo box is not always enabled.
true
if enabled, and
false
if disabled
IOException
AutomationException
public final int add(String str) throws AutomationException, IOException
str
- - the item to be added to the combo box
IOException
- if there are interop problems.
AutomationException
- if the component throws an ArcObjects exception.public final void remove(int cookie) throws AutomationException, IOException
cookie
- - the item to be deleted (use the cookie obtained from the add() method)
IOException
- if there are interop problems.
AutomationException
- if the component throws an ArcObjects exception.public final void clear() throws AutomationException, IOException
IOException
- if there are interop problems.
AutomationException
- if the component throws an ArcObjects exception.public final void select(int cookie) throws AutomationException, IOException
cookie
- - the item to be selected (use the cookie obtained from the add() method)
IOException
- if there are interop problems.
AutomationException
- if the component throws an ArcObjects exception.public final int getSelected() throws AutomationException, IOException
AutomationException
IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |