public interface IField
Sphinx Platform Field
A platform field is made of several controls (i.e. widgets such as: label, text, combo, button, list, etc.). From the association of such controls result a field whose behavior is specialized according to the widgets it owns. The field content creation is supposed to be performed inside method fillIntoGrid that must be implemented by every field.
Every field contains at least a label; this label displays a text that is owned by the field. This interface provides methods allowing: to set the text of this label control, to set the tool tip of this label control, or to get this label control.
A platform field may have listeners that can be added or removed thanks to methods provided by this interface. Inside concrete implementation of this interface, it is recommended to use a listener list (ListenerList) in order to store listeners associated to this field.
Label
,
ListenerList
Modifier and Type | Method and Description |
---|---|
void |
addFieldListener(IFieldListener listener)
Adds the given field listener in the listeners list of this field.
|
void |
dispose()
Disposes of the operating system resources associated with the field.
|
org.eclipse.swt.widgets.Control[] |
fillIntoGrid(org.eclipse.swt.widgets.Composite parent,
int nColumns)
Creates all controls of the dialog field and fills it to a composite.
|
org.eclipse.swt.widgets.Control |
getLabelControl() |
boolean |
isEnabled()
Gets the enable state of the dialog field.
|
void |
removeFieldListener(IFieldListener listener)
Removes the given field listener from the listeners list of this field.
|
void |
setEnabled(boolean enabled)
Sets the enable state of the field.
|
void |
setLabelText(java.lang.String labeltext)
Sets the label of the dialog field.
|
void |
setToolTipText(java.lang.String toolTip)
Sets the tool tip of the dialog field.
|
org.eclipse.swt.widgets.Control[] fillIntoGrid(org.eclipse.swt.widgets.Composite parent, int nColumns)
parent
- The parent composite into which this field must be created.nColumns
- The number of columns over which this field must span.GridLayout
,
FormLayout
org.eclipse.swt.widgets.Control getLabelControl()
void setEnabled(boolean enabled)
enabled
- The new enable state.boolean isEnabled()
void setLabelText(java.lang.String labeltext)
labeltext
- The text of the label.void setToolTipText(java.lang.String toolTip)
toolTip
- The text to use as tool tip.void addFieldListener(IFieldListener listener)
listener
- The field listener to add.void removeFieldListener(IFieldListener listener)
listener
- The field listener to remove.void dispose()