Class LabeledControl
- java.lang.Object
-
- org.pentaho.di.ui.core.widget.LabeledControl
-
public class LabeledControl extends Object
Creates a label paired with an swt control immediately below it. Call .attachBelow() to place the paired label/control below another control in a form.The
LabeledControl.Series
inner class allows creating a series of labeled controls, each automatically attached the its preceding control. E.g. +--------+ |Label1 | +--------+ |Control1| +--------+ |Label2 | +--------+ |Control2| +--------+ |Label3 | +--------+ |Control3| +--------+or if using
LabeledControl.Series.layout(int height, int width, int numcols)
, labeled controls will be layed out top down / left right with mechanics similar to GridLayout. E.g.+--------+--------+--------+ |Wide Label1 |Label4 | +--------+--------+--------+ |Wide Control |Control4| +--------+--------+--------+ |Label2 |Label3 |Label5 | +--------+--------+--------+ |Control2|Control3|Control5| +--------+--------+--------+
LabeledControl.Series.hideAll()
andLabeledControl.Series.show(Control)
will update attachments automatically to shift paired labels/controls up when preceding controls are hidden.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
LabeledControl.Series
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
attachBelow(org.eclipse.swt.widgets.Control control)
Attaches this LabeledControl below control.void
attachBelow(org.eclipse.swt.widgets.Control control, int left)
static LabeledControl
labeledControl(org.eclipse.swt.widgets.Composite parentComp, String labelText, org.eclipse.swt.widgets.Control control, int controlWidth, PropsUI props)
-
-
-
Method Detail
-
labeledControl
public static LabeledControl labeledControl(org.eclipse.swt.widgets.Composite parentComp, String labelText, org.eclipse.swt.widgets.Control control, int controlWidth, PropsUI props)
-
attachBelow
public void attachBelow(org.eclipse.swt.widgets.Control control)
Attaches this LabeledControl below control. If null, attaches to the top of the container.
-
attachBelow
public void attachBelow(org.eclipse.swt.widgets.Control control, int left)
-
-