|
|
|||||
| Package com.dassault_systemes.catjdialog |
Class CATComboBox
|
| Class Hierarchy |
java.lang.Object
|
+-com.dassault_systemes.catjdialog.CATCallbackSource
|
+-com.dassault_systemes.catjdialog.CATDialog
|
+-com.dassault_systemes.catjdialog.CATLeafElement
|
+-com.dassault_systemes.catjdialog.CATComboBox
| Class Location |
| Class Description |
public class CATComboBox
The combo-box graphical component.
| Field Summary |
| Constructor Summary |
| CATComboBox(CATDialog iDialog, String iName)
Creates a combo-box with the specified parent and name. |
| Method Summary |
| public void | addItem(String item)
Appends an item to the drop-down list. |
| public CATNotification | getComboActivatedNotification()
The combo-box activated notification. |
| public boolean | getEditable()
Determines whether this combo-box is editable or not. |
| public boolean | getEnable()
Determines whether this combo-box is enabled or not. |
| public String | getItem(int index)
Returns the item at specified index. |
| public int | getItemCount()
Returns the number of combo-box items. |
| public String[] | getItemList()
Returns the list of combo-box items as a string array. |
| public Enumeration | getItems()
Returns the list of combo-box items as a string enumeration. |
| public CATITranslator | getItemTranslator()
Returns the item translator. |
| public String | getSelection()
Returns the current combo-box selection. |
| public int | getSelectionIndex()
Returns the current combo-box selection index (in the drop-down list). |
| public void | insertItem(String item, int index)
Inserts an item in the list. |
| public void | removeItem(int index)
Removes an item from the list. |
| public void | removeItem(String item)
Removes an item from the list. |
| public void | setEditable(boolean iEditable)
Enables/disables editing in the combo-box (default is disabled). |
| public void | setEnable(boolean iEnable)
Enables or disables this combo-box. |
| public void | setItemList(String[] iItems)
Sets the list of combo-box items as a string array. |
| public void | setItems(Enumeration iEnum)
Sets the list of combo-box items as a string enumeration. |
| public void | setItems(String[] itemsTab)
Sets the list of combo-box items as a string array. |
| public void | setItemTranslator(CATITranslator iTranslator)
Sets an item translator for this combo-box. |
| public void | setSelection(int index)
Sets the current combo-box selection from the given item index. |
| public void | setSelection(String iSelection)
Sets the current combo-box selection. |
| Field Detail |
| Constructor Detail |
CATComboBox(CATDialog iDialog, String iName)
Creates a combo-box with the specified parent and name.
iParentiName| Method Detail |
public void addItem(String item)
Appends an item to the drop-down list.
item
public CATNotification getComboActivatedNotification()
The combo-box activated notification.
This notification is sent when the combo-box selection is changed.
public boolean getEditable()
Determines whether this combo-box is editable or not. Default is not editable.
true if this combo-box is enabled; false otherwise.
public boolean getEnable()
Determines whether this combo-box is enabled or not.
true if this combo-box is enabled; false otherwise.
public String getItem(int index)
Returns the item at specified index.
The
public int getItemCount()
Returns the number of combo-box items.
public String[] getItemList()
Returns the list of combo-box items as a string array.
public Enumeration getItems()
Returns the list of combo-box items as a string enumeration.
public CATITranslator getItemTranslator()
Returns the item translator.
public String getSelection()
Returns the current combo-box selection.
public int getSelectionIndex()
Returns the current combo-box selection index (in the drop-down list).
Note: this method might return an irrelevant value in the case of an editable combo-box.
public void insertItem(String item, int index)
Inserts an item in the list.
itemindex
public void removeItem(int index)
Removes an item from the list.
index
public void removeItem(String item)
Removes an item from the list.
item
public void setEditable(boolean iEditable)
Enables/disables editing in the combo-box (default is disabled).
An editable combo-box allows the user to type in its own textual values, and
select items for the drop-down list. An editable combo-box does not send
any ComboActivated notification. It should be associated with
a button to notify that the user is done with filling its value.
iEnabletrue, editing in this combo-box is enabled; otherwise it is disabled.
public void setEnable(boolean iEnable)
Enables or disables this combo-box.
A disabled combo-box selection can't be changed by the user and doesn't fire
its ComboActivated notification.
iEnabletrue, this checkbox is enabled; otherwise it is disabled.
public void setItemList(String[] iItems)
Sets the list of combo-box items as a string array.
iItems
public void setItems(Enumeration iEnum)
Sets the list of combo-box items as a string enumeration.
iEnum
public void setItems(String[] itemsTab)
Sets the list of combo-box items as a string array.
iItems
public void setItemTranslator(CATITranslator iTranslator)
Sets an item translator for this combo-box.
When a combo-box has such a translator, items are considered as internal tags, that are translated before being displayed to the user.
Note: editable combo-boxes do not support item translators!
iTranslator
public void setSelection(int index)
Sets the current combo-box selection from the given item index.
index
public void setSelection(String iSelection)
Sets the current combo-box selection.
item