public class LabeledControl extends Object
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()
and LabeledControl.Series.show(Control)
will update attachments automatically to
shift paired labels/controls up when preceding controls are hidden.
Modifier and Type | Class and Description |
---|---|
static class |
LabeledControl.Series |
Modifier and Type | Method and 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) |
public static LabeledControl labeledControl(org.eclipse.swt.widgets.Composite parentComp, String labelText, org.eclipse.swt.widgets.Control control, int controlWidth, PropsUI props)
public void attachBelow(org.eclipse.swt.widgets.Control control)
public void attachBelow(org.eclipse.swt.widgets.Control control, int left)
Copyright © 2019 Hitachi Vantara. All rights reserved.