Class WidgetBuilder<T extends org.eclipse.swt.widgets.Control>


  • 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

    • Constructor Detail

      • WidgetBuilder

        public WidgetBuilder()
    • 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)
      • image

        public WidgetBuilder<T> image​(org.eclipse.swt.graphics.Image image)
      • 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()