public class HyperlinkStringField extends BasicHyperlinkField implements IStringField
Dialog field containing a label and a text control.
|
Note |
Parts have been commented (content assist for example). These parts are not needed for the moment, but one day, they could be useful! |
fLabelControl, fLabelText, fUseFormLayout, fWidgetFactory, MAX_WITDH| Constructor and Description |
|---|
HyperlinkStringField(IWidgetFactory widgetFactory,
org.eclipse.ui.forms.events.HyperlinkAdapter hyperlinkAdapter) |
HyperlinkStringField(IWidgetFactory widgetFactory,
org.eclipse.ui.forms.events.HyperlinkAdapter hyperlinkAdapter,
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.
| /!\
|
|
protected int |
getNumberOfControls()
Returns the number of columns of the dialog field.
|
|||
java.lang.String |
getText()
Gets the text.
|
|||
org.eclipse.swt.widgets.Control |
getTextControl() |
|||
protected org.eclipse.swt.widgets.Text |
getTextControl(org.eclipse.swt.widgets.Composite parent,
int hspan) |
|||
protected boolean |
isEditable() |
|||
void |
refresh()
Brings the UI in sync with the model.
|
|||
void |
setEditable(boolean editable)
Sets the editable state of the field.
|
|||
boolean |
setFocus()
Tries to set the focus to this field.
|
|||
void |
setText(java.lang.String text)
Sets the text.
|
|||
void |
setTextEnabled(boolean b)
/!\
| This method only concerns the encapsulated text control.
| /!\
|
|
void |
setTextWithoutUpdate(java.lang.String text)
Sets the text without triggering a dialog-changed event.
|
|||
protected void |
updateEditableState() |
|||
protected void |
updateEnableState()
Called when the enable state changed.
|
createLabelControl, setLabelTextaddFieldListener, assertCompositeNotNull, createEmptySpace, createEmptySpace, createSpecificComposite, dialogFieldChanged, fillIntoGrid, getLabelControl, getLabelControl, getLabelControl, isEnabled, isOkToUse, removeFieldListener, setEnabled, setToolTipTextclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddFieldListener, fillIntoGrid, getLabelControl, isEnabled, removeFieldListener, setEnabled, setLabelText, setToolTipTextpublic HyperlinkStringField(IWidgetFactory widgetFactory, org.eclipse.ui.forms.events.HyperlinkAdapter hyperlinkAdapter)
public HyperlinkStringField(IWidgetFactory widgetFactory, org.eclipse.ui.forms.events.HyperlinkAdapter hyperlinkAdapter, int style)
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 final org.eclipse.swt.widgets.Text getTextControl(org.eclipse.swt.widgets.Composite parent,
int hspan)
parent - The parent composite (supposed to be not null).hspan - The number of columns the text widget must span.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 void updateEnableState()
BasicFieldupdateEnableState in class BasicFieldpublic void dispose()
IFielddispose in interface IFielddispose in class BasicFieldpublic java.lang.String getText()
nullgetText in interface IStringFieldpublic void refresh()
BasicFieldrefresh in class BasicFieldpublic void setText(java.lang.String text)
setText in interface IStringFieldpublic void setTextEnabled(boolean b)
| /!\ | This method only concerns the encapsulated text control. | /!\ |
Enables the text control if the parameter is true. Otherwise, disables it.
b - The new enabled state.public void setTextWithoutUpdate(java.lang.String text)
setTextWithoutUpdate in interface IStringFieldpublic org.eclipse.swt.widgets.Control getTextControl()
getTextControl in interface IStringFieldpublic void setEditable(boolean editable)
IStringFieldsetEditable in interface IStringFieldeditable - The new editable state.protected void updateEditableState()
protected final boolean isEditable()