|
|
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) |
Method Summary |
CATNotification | getComboActivatedNotification() |
void | setItemTranslator(CATITranslator iTranslator) |
CATITranslator | getItemTranslator() |
boolean | getEnable() |
void | setEnable(boolean iEnable) |
boolean | getEditable() |
void | setEditable(boolean iEditable) |
String | getSelection() |
int | getSelectionIndex() |
String[] | getItemList() |
void | setItemList(String[] iItems) |
Enumeration | getItems() |
int | getItemCount() |
void | setItems(Enumeration iEnum) |
void | setItems(String[] itemsTab) |
String | getItem(int index) |
void | addItem(String item) |
void | insertItem(String item, int index) |
void | removeItem(String item) |
void | removeItem(int index) |
void | setSelection(String iSelection) |
void | setSelection(int index) |
Field Detail |
Constructor Detail |
CATComboBox(CATDialog iDialog, String iName)Creates a combo-box with the specified parent and name.
iParent
iName
Method Detail |
CATNotification getComboActivatedNotification()The combo-box activated notification.
This notification is sent when the combo-box selection is changed.
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
CATITranslator getItemTranslator()Returns the item translator.
boolean getEnable()Determines whether this combo-box is enabled or not.
true
if this combo-box is enabled; false
otherwise.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.
iEnable
true
, this checkbox is enabled; otherwise it is disabled.boolean getEditable()Determines whether this combo-box is editable or not. Default is not editable.
true
if this combo-box is enabled; false
otherwise.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.
iEnable
true
, editing in this combo-box is enabled; otherwise it is disabled.String getSelection()Returns the current combo-box selection.
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.
String[] getItemList()Returns the list of combo-box items as a string array.
void setItemList(String[] iItems)Sets the list of combo-box items as a string array.
iItems
Enumeration getItems()Returns the list of combo-box items as a string enumeration.
int getItemCount()Returns the number of combo-box items.
void setItems(Enumeration iEnum)Sets the list of combo-box items as a string enumeration.
iEnum
void setItems(String[] itemsTab)Sets the list of combo-box items as a string array.
iItems
String getItem(int index)Returns the item at specified index.
The
void addItem(String item)Appends an item to the drop-down list.
item
void insertItem(String item, int index)Inserts an item in the list.
item
index
void removeItem(String item)Removes an item from the list.
item
void removeItem(int index)Removes an item from the list.
index
void setSelection(String iSelection)Sets the current combo-box selection.
item
void setSelection(int index)Sets the current combo-box selection from the given item index.
index