Package org.pentaho.di.ui.core.widget
Class WidgetBuilder<T extends org.eclipse.swt.widgets.Control>
- java.lang.Object
-
- org.pentaho.di.ui.core.widget.WidgetBuilder<T>
-
public class WidgetBuilder<T extends org.eclipse.swt.widgets.Control> extends Object
Builder class to simplify creation and layout of SWT controls.To create a radio button inside of a composite and below a label, for example:
Button radioBtn = new WidgetBuilder
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
WidgetBuilder.PDIVarControlFactory<C>
static interface
WidgetBuilder.SWTControlFactory<C>
static class
WidgetBuilder.Templates
-
Constructor Summary
Constructors Constructor Description WidgetBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description WidgetBuilder<T>
below(org.eclipse.swt.widgets.Control controlAbove, int margin)
WidgetBuilder<T>
bottom(int percentageOfParent, int marginPixels)
T
build()
WidgetBuilder<T>
container(org.eclipse.swt.widgets.Composite container)
WidgetBuilder<T>
height(int height)
WidgetBuilder<T>
image(org.eclipse.swt.graphics.Image image)
WidgetBuilder<T>
items(String... items)
WidgetBuilder<T>
left(int percentageOfParent, int marginPixels)
WidgetBuilder<T>
margin(int width, int height)
WidgetBuilder<T>
pdiVarControlFactory(WidgetBuilder.PDIVarControlFactory<T> pdiVarControlFactory)
WidgetBuilder<T>
props(PropsUI props)
WidgetBuilder<T>
right(int percentageOfParent, int marginPixels)
WidgetBuilder<T>
rightOf(org.eclipse.swt.widgets.Control controlToLeft, int margin)
WidgetBuilder<T>
space(org.pentaho.di.core.variables.VariableSpace space)
WidgetBuilder<T>
style(int style)
WidgetBuilder<T>
swtControlFactory(WidgetBuilder.SWTControlFactory<T> swtControlFactory)
WidgetBuilder<T>
text(String text)
WidgetBuilder<T>
top(int percentageOfParent, int marginPixels)
WidgetBuilder<T>
width(int width)
-
-
-
Method Detail
-
below
public WidgetBuilder<T> below(org.eclipse.swt.widgets.Control controlAbove, int margin)
-
rightOf
public WidgetBuilder<T> rightOf(org.eclipse.swt.widgets.Control controlToLeft, int margin)
-
container
public WidgetBuilder<T> container(org.eclipse.swt.widgets.Composite container)
-
left
public WidgetBuilder<T> left(int percentageOfParent, int marginPixels)
-
right
public WidgetBuilder<T> right(int percentageOfParent, int marginPixels)
-
bottom
public WidgetBuilder<T> bottom(int percentageOfParent, int marginPixels)
-
top
public WidgetBuilder<T> top(int percentageOfParent, int marginPixels)
-
height
public WidgetBuilder<T> height(int height)
-
width
public WidgetBuilder<T> width(int width)
-
margin
public WidgetBuilder<T> margin(int width, int height)
-
style
public WidgetBuilder<T> style(int style)
-
text
public WidgetBuilder<T> text(String text)
-
image
public WidgetBuilder<T> image(org.eclipse.swt.graphics.Image image)
-
items
public WidgetBuilder<T> items(String... items)
-
props
public WidgetBuilder<T> props(PropsUI props)
-
space
public WidgetBuilder<T> space(org.pentaho.di.core.variables.VariableSpace space)
-
swtControlFactory
public WidgetBuilder<T> swtControlFactory(WidgetBuilder.SWTControlFactory<T> swtControlFactory)
- Parameters:
swtControlFactory
- , typically the constructor for the desired swt control. E.g. Button::new swtControlFactory OR pdiVarControlFactory must be set, but not both.
-
pdiVarControlFactory
public WidgetBuilder<T> pdiVarControlFactory(WidgetBuilder.PDIVarControlFactory<T> pdiVarControlFactory)
- Parameters:
pdiVarControlFactory
- , typically the construtor for the desired pdi var control. E.g. ComboVar::new swtControlFactory OR pdiVarControlFactory must be set, but not both.
-
build
public T build()
-
-