public abstract class AbstractField extends Object implements IField
Constructor and Description |
---|
AbstractField(org.eclipse.ui.forms.widgets.FormToolkit toolkit,
org.eclipse.swt.widgets.Composite parent) |
AbstractField(org.eclipse.ui.forms.widgets.FormToolkit toolkit,
org.eclipse.swt.widgets.Composite parent,
IFormFieldData model) |
Modifier and Type | Method and Description |
---|---|
abstract org.eclipse.swt.widgets.Control |
createControl(org.eclipse.ui.forms.widgets.FormToolkit tk,
org.eclipse.swt.widgets.Composite p) |
org.eclipse.swt.widgets.Composite |
getComposite()
Gets the top most container control of the field which must be a
Composite . |
org.eclipse.swt.widgets.Control |
getControl()
Gets the control in charge of displaying/editing the field value.
|
protected org.eclipse.swt.widgets.Label |
getHelpText() |
org.eclipse.swt.widgets.Label |
getLabel() |
IFormFieldData |
getModel()
Gets the IfieldData model of this field.
|
boolean |
isVertical() |
void |
layout(org.eclipse.swt.widgets.Label lbl,
org.eclipse.swt.widgets.Control ctrl,
org.eclipse.ui.forms.widgets.ImageHyperlink button)
Layouts the label, edition control and help button in their container (
IField.getComposite() )
This method can be redefined by subclasses who need to change the standard layout for label, control and help button.When it is called default LayoutData have already been applied to the widgets so that this method can typically either modify or replace the existing LayoutData of the widgets. |
void |
setEditable(boolean onoff) |
void |
setHelpText(String s)
Set the text to be displayed in the help field of the control.
|
void |
setModel(IFormFieldData data) |
void |
setVertical(boolean value) |
public AbstractField(org.eclipse.ui.forms.widgets.FormToolkit toolkit, org.eclipse.swt.widgets.Composite parent, IFormFieldData model)
public AbstractField(org.eclipse.ui.forms.widgets.FormToolkit toolkit, org.eclipse.swt.widgets.Composite parent)
public boolean isVertical()
public void setVertical(boolean value)
public abstract org.eclipse.swt.widgets.Control createControl(org.eclipse.ui.forms.widgets.FormToolkit tk, org.eclipse.swt.widgets.Composite p)
public void layout(org.eclipse.swt.widgets.Label lbl, org.eclipse.swt.widgets.Control ctrl, org.eclipse.ui.forms.widgets.ImageHyperlink button)
IField.getComposite()
)
This method can be redefined by subclasses who need to change the standard layout for label, control and help button.public final void setHelpText(String s)
Warning: you must call getComposite()
before using this method.
setHelpText
in interface IField
public final org.eclipse.swt.widgets.Composite getComposite()
Composite
.getComposite
in interface IField
public org.eclipse.swt.widgets.Control getControl()
getControl
in interface IField
public IFormFieldData getModel()
public final org.eclipse.swt.widgets.Label getLabel()
protected org.eclipse.swt.widgets.Label getHelpText()
public void setModel(IFormFieldData data)
public void setEditable(boolean onoff)
setEditable
in interface IField