public class ComboField extends BasicField implements IComboField
Combo Field
Field containing a label and a combo control.
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String[] |
EMPTY_LIST |
fLabelControl, fLabelText, fUseFormLayout, fWidgetFactory, MAX_WITDH| Constructor and Description |
|---|
ComboField() |
ComboField(boolean isEditable) |
ComboField(int style) |
ComboField(IWidgetFactory widgetFactory) |
ComboField(IWidgetFactory widgetFactory,
boolean isEditable) |
ComboField(IWidgetFactory widgetFactory,
int style) |
| Modifier and Type | Method and Description | |||
|---|---|---|---|---|
void |
dispose()
Disposes of the operating system resources associated with the field.
|
|||
protected org.eclipse.swt.widgets.Control[] |
doFillIntoGrid(org.eclipse.swt.widgets.Composite parent,
int nColumns)
/!\
| To be re-implemented by platform field implementors.
| /!\
|
|
org.eclipse.swt.widgets.Control |
getComboControl() |
|||
protected org.eclipse.swt.widgets.Combo |
getComboControl(org.eclipse.swt.widgets.Composite parent,
int hspan)
Creates combo control.
|
|||
java.lang.String[] |
getItems()
Gets the combo items.
|
|||
protected int |
getNumberOfControls()
Returns the number of columns of the dialog field.
|
|||
int |
getSelectionIndex() |
|||
java.lang.String |
getText()
Gets the text.
|
|||
void |
refresh()
Brings the UI in sync with the model.
|
|||
boolean |
selectItem(int index)
Selects an item.
|
|||
boolean |
selectItem(int index,
boolean silent) |
|||
boolean |
selectItem(java.lang.String name)
Selects an item.
|
|||
boolean |
setFocus()
Tries to set the focus to this field.
|
|||
void |
setItems(java.lang.String[] items)
Sets the combo items.
|
|||
void |
setItems(java.lang.String[] items,
boolean silent) |
|||
void |
setText(java.lang.String text)
Sets the text.
|
|||
void |
setTextWithoutUpdate(java.lang.String text)
Sets the text without triggering a dialog-changed event.
|
|||
protected void |
updateEnableState()
Called when the enable state changed.
|
addFieldListener, assertCompositeNotNull, createEmptySpace, createEmptySpace, createLabelControl, createSpecificComposite, dialogFieldChanged, fillIntoGrid, getLabelControl, getLabelControl, getLabelControl, isEnabled, isOkToUse, removeFieldListener, setEnabled, setLabelText, setToolTipTextclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddFieldListener, fillIntoGrid, getLabelControl, isEnabled, removeFieldListener, setEnabled, setLabelText, setToolTipTextpublic ComboField()
public ComboField(IWidgetFactory widgetFactory)
public ComboField(boolean isEditable)
public ComboField(int style)
public ComboField(IWidgetFactory widgetFactory, boolean isEditable)
public ComboField(IWidgetFactory widgetFactory, int style)
protected org.eclipse.swt.widgets.Control[] doFillIntoGrid(org.eclipse.swt.widgets.Composite parent,
int nColumns)
BasicField
| /!\ | To be re-implemented by platform field implementors. | /!\ |
doFillIntoGrid in class BasicFieldparent - The parent composite of this dialog field.nColumns - The number of columns of this dialog field.protected int getNumberOfControls()
BasicFieldgetNumberOfControls in class BasicFieldpublic boolean setFocus()
BasicFieldtrue if the dialog field can take focus. To be
re-implemented by dialog field implementors.setFocus in class BasicFieldprotected final org.eclipse.swt.widgets.Combo getComboControl(org.eclipse.swt.widgets.Composite parent,
int hspan)
parent - The parent composite (supposed to be not null).hspan - The number of columns the combo widget must span.protected void updateEnableState()
BasicFieldupdateEnableState in class BasicFieldpublic void dispose()
IFielddispose in interface IFielddispose in class BasicFieldpublic java.lang.String[] getItems()
getItems in interface IComboFieldpublic void setItems(java.lang.String[] items)
setItems in interface IComboFieldpublic void setItems(java.lang.String[] items,
boolean silent)
public java.lang.String getText()
public void setText(java.lang.String text)
setText in interface IComboFieldpublic boolean selectItem(int index)
selectItem in interface IComboFieldpublic boolean selectItem(int index,
boolean silent)
public boolean selectItem(java.lang.String name)
public int getSelectionIndex()
getSelectionIndex in interface IComboFieldpublic void setTextWithoutUpdate(java.lang.String text)
public void refresh()
BasicFieldrefresh in class BasicFieldpublic org.eclipse.swt.widgets.Control getComboControl()
getComboControl in interface IComboField