|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ibm.commons.swt.data.editors.api.PropertyEditor com.ibm.commons.swt.data.editors.api.AbstractComboEditor
public abstract class AbstractComboEditor
An editor for a property which can be set via a Combo control. Typically this property will have at least two known values.
Constructor Summary | |
---|---|
AbstractComboEditor()
Constructs a new instance of this class. |
|
AbstractComboEditor(ILookup lookup)
Constructs a new instance of this class with the given lookup. |
Method Summary | |
---|---|
protected void |
comboAdd(org.eclipse.swt.widgets.Control combo,
java.lang.String value)
|
protected void |
comboDeselectAll(org.eclipse.swt.widgets.Control combo)
|
protected java.lang.String |
comboGetItem(org.eclipse.swt.widgets.Control combo,
int index)
|
protected int |
comboGetItemCount(org.eclipse.swt.widgets.Control combo)
|
protected int |
comboGetSelectionIndex(org.eclipse.swt.widgets.Control combo)
|
java.lang.String |
comboGetText(org.eclipse.swt.widgets.Control combo)
|
protected void |
comboRemove(org.eclipse.swt.widgets.Control combo,
int index)
|
protected void |
comboRemoveAll(org.eclipse.swt.widgets.Control combo,
java.lang.String oldVal)
|
protected void |
comboSelect(org.eclipse.swt.widgets.Control combo,
int index)
|
protected void |
comboSetText(org.eclipse.swt.widgets.Control combo,
java.lang.String text)
|
org.eclipse.swt.widgets.Control |
createControl(CompositeEditor parent)
This method is called by the PropertyEditor during initialization. |
void |
fillCombo(org.eclipse.swt.widgets.Control combo)
Initializes the given combo with the model options and current value. |
java.lang.String |
getDefaultValue()
|
java.lang.String |
getFirstLineTitle()
Return the title for the first line. |
com.ibm.commons.swt.data.controls.IListActions |
getListActions()
|
ILookup |
getLookup()
Returns the lookup that is used to populate the contents of the control. |
java.lang.String |
getRenderedValue(java.lang.String value)
Return the value shown for the given model value. |
void |
initControlValue(CompositeEditor parent,
java.lang.String value)
Set the given value into the control created for this property editor. |
boolean |
isEditable()
Return true if the user can type into the combo, false if they can only select from the options. |
boolean |
isFirstBlankLine()
Return true if the combo should contain a blank line (null/empty) option. |
boolean |
isImmediateUpdate()
|
void |
setComboValue(org.eclipse.swt.widgets.Control combo,
java.lang.String value)
Set the given value into the combo. |
void |
setDefaultValue(java.lang.String defaultValue)
|
void |
setFirstBlankLine(boolean firstBlankLine)
Set if the combo should contain a blank line (null/empty) option. |
void |
setFirstLineTitle(java.lang.String firstLineTitle)
Set the title for the first line. |
void |
setId(java.lang.String id)
Allows the implementor to associate an ID attribute with this control. |
void |
setListActions(com.ibm.commons.swt.data.controls.IListActions listActions)
|
void |
setLookup(org.eclipse.swt.widgets.Control combo,
ILookup lookup)
Sets the lookup used to populate the contents of the control. |
void |
setLookup(ILookup lookup)
Deprecated. |
boolean |
stopEdit(CompositeEditor parent)
Called to tell the current editor to stop editing the associated attribute. |
Methods inherited from class com.ibm.commons.swt.data.editors.api.PropertyEditor |
---|
addPropertyEditorUpdateListener, addValidator, callDialog, getContextAttribute, getContextObject, getDefaultEditor, getDialogButtonAltText, getDialogButtonImage, getDialogButtonText, getEditor, getScriptMode, getTextValidator, getValidator, getWorkBenchPart, hasDialogButton, isScriptModeFixed, postModelUpdate, preModelUpdate, removePropertyEditorUpdateListener, setContextAttribute, setContextObject, setScriptMode, setValidator, setWorkBenchPart |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractComboEditor()
public AbstractComboEditor(ILookup lookup)
ILookup
Method Detail |
---|
public org.eclipse.swt.widgets.Control createControl(CompositeEditor parent)
PropertyEditor
createControl
in class PropertyEditor
parent
- - The parent of the control
public void setId(java.lang.String id)
PropertyEditor
setId
in class PropertyEditor
public void fillCombo(org.eclipse.swt.widgets.Control combo)
getFirstLineTitle()
, isFirstBlankLine()
, getLookup()
.
Control
- ILookup
public void initControlValue(CompositeEditor parent, java.lang.String value)
PropertyEditor
initControlValue
in class PropertyEditor
CompositeEditor
public void setComboValue(org.eclipse.swt.widgets.Control combo, java.lang.String value)
Control
- - the current combo box controlString
- - the desired value of the controlpublic boolean stopEdit(CompositeEditor parent)
PropertyEditor
stopEdit
in class PropertyEditor
parent
- - CompositeEditor
public java.lang.String getRenderedValue(java.lang.String value)
getRenderedValue
in class PropertyEditor
value
- - the String value stored in the associated model.
public ILookup getLookup()
ILookup
public void setLookup(org.eclipse.swt.widgets.Control combo, ILookup lookup)
lookup
- - ILookuppublic void setLookup(ILookup lookup)
setLookup(Control, ILookup)
public boolean isImmediateUpdate()
public boolean isEditable()
public boolean isFirstBlankLine()
public void setFirstBlankLine(boolean firstBlankLine)
firstLineBlank
- public java.lang.String getFirstLineTitle()
public void setFirstLineTitle(java.lang.String firstLineTitle)
firstLineTitle
- public com.ibm.commons.swt.data.controls.IListActions getListActions()
public void setListActions(com.ibm.commons.swt.data.controls.IListActions listActions)
public final java.lang.String comboGetText(org.eclipse.swt.widgets.Control combo)
protected final void comboSetText(org.eclipse.swt.widgets.Control combo, java.lang.String text)
protected final int comboGetSelectionIndex(org.eclipse.swt.widgets.Control combo)
protected final int comboGetItemCount(org.eclipse.swt.widgets.Control combo)
protected final java.lang.String comboGetItem(org.eclipse.swt.widgets.Control combo, int index)
protected final void comboAdd(org.eclipse.swt.widgets.Control combo, java.lang.String value)
protected final void comboRemove(org.eclipse.swt.widgets.Control combo, int index)
protected final void comboRemoveAll(org.eclipse.swt.widgets.Control combo, java.lang.String oldVal)
protected final void comboSelect(org.eclipse.swt.widgets.Control combo, int index)
protected final void comboDeselectAll(org.eclipse.swt.widgets.Control combo)
public java.lang.String getDefaultValue()
public void setDefaultValue(java.lang.String defaultValue)
defaultValue
- the defaultValue to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |