Class VFSDetailsCompositeHelper


  • public class VFSDetailsCompositeHelper
    extends Object
    This class provides common layout logic to all VFSDetailComposites. You can still roll your own layout but these methods will greatly simplify the process, if you keep within the mold.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.eclipse.swt.custom.CCombo createCCombo​(org.eclipse.swt.widgets.Composite composite, int flags, org.eclipse.swt.widgets.Control topWidget, int width)
      Creates a CCombo control to the left side of the parent composite and below the topWidget specified.
      CheckBoxVar createCheckboxVar​(org.pentaho.di.core.variables.VariableSpace variableSpace, org.eclipse.swt.widgets.Composite composite, org.eclipse.swt.widgets.Control topWidget)  
      ComboVar createComboVar​(org.pentaho.di.core.variables.VariableSpace variableSpace, org.eclipse.swt.widgets.Composite composite, int flags, org.eclipse.swt.widgets.Control topWidget, int width)  
      org.eclipse.swt.widgets.Label createLabel​(org.eclipse.swt.widgets.Composite composite, int flags, String key, org.eclipse.swt.widgets.Control topWidget)
      Creates a label attached to left side of the parent composite and below topWidget.
      PasswordTextVar createPasswordTextVar​(org.pentaho.di.core.variables.VariableSpace variableSpace, org.eclipse.swt.widgets.Composite composite, int flags, org.eclipse.swt.widgets.Control topWidget, int width)  
      PasswordVisibleTextVar createPasswordVisibleTextVar​(org.pentaho.di.core.variables.VariableSpace variableSpace, org.eclipse.swt.widgets.Composite composite, int flags, org.eclipse.swt.widgets.Control topWidget, int width)  
      org.eclipse.swt.widgets.Text createText​(org.eclipse.swt.widgets.Composite composite, int flags, org.eclipse.swt.widgets.Control topWidget, int width)
      Creates a Text control to the left side of the parent composite and below the topWidget specified.
      TextVar createTextVar​(org.pentaho.di.core.variables.VariableSpace variableSpace, org.eclipse.swt.widgets.Composite composite, int flags, org.eclipse.swt.widgets.Control topWidget, int width)
      Creates a TextVar control to the left side of the parent composite and below the topWidget specified.
      org.eclipse.swt.widgets.Label createTitleLabel​(org.eclipse.swt.widgets.Composite composite, String key, Set<org.eclipse.swt.widgets.Control> skipControls)
      This method places a centered title at the top of the composite recieved
      org.eclipse.swt.layout.FormData getFormDataField​(org.eclipse.swt.widgets.Control topWidget)  
      org.eclipse.swt.layout.FormData getFormDataField​(org.eclipse.swt.widgets.Control topWidget, int width)  
      org.eclipse.swt.layout.FormData getFormDataLabel​(org.eclipse.swt.widgets.Control topWidget)  
      int getMargin()  
      int getMaxLabelWidth()  
      PropsUI getProps()  
      static void setupCompositeResizeListener​(org.eclipse.swt.widgets.Composite wComposite)
      Sets the Size of the Detail Composite to the track the Parent ScrolledComposites size.
      static void updateScrollableRegion​(org.eclipse.swt.widgets.Composite wComposite)  
    • Method Detail

      • getProps

        public PropsUI getProps()
      • getMaxLabelWidth

        public int getMaxLabelWidth()
      • getMargin

        public int getMargin()
      • createLabel

        public org.eclipse.swt.widgets.Label createLabel​(org.eclipse.swt.widgets.Composite composite,
                                                         int flags,
                                                         String key,
                                                         org.eclipse.swt.widgets.Control topWidget)
        Creates a label attached to left side of the parent composite and below topWidget.
        Parameters:
        composite - The composite to draw the control on
        flags - The SWT flags
        key - the key to the message to use on the label
        topWidget - The Widget immediately above this control. It will be used to set top in the layout. If null, the widget will be placed at margin*2 below the top of the composite.
        Returns:
      • createText

        public org.eclipse.swt.widgets.Text createText​(org.eclipse.swt.widgets.Composite composite,
                                                       int flags,
                                                       org.eclipse.swt.widgets.Control topWidget,
                                                       int width)
        Creates a Text control to the left side of the parent composite and below the topWidget specified.
        Parameters:
        composite - T
        flags - The SWT flags
        topWidget - The Widget immediately above this control. It will be used to set top in the layout.
        width - Controls the right edge of the control. If 0 the control will fill the the composite minus the margin. If non-zero the control will be width pixels wide.
        Returns:
      • createTextVar

        public TextVar createTextVar​(org.pentaho.di.core.variables.VariableSpace variableSpace,
                                     org.eclipse.swt.widgets.Composite composite,
                                     int flags,
                                     org.eclipse.swt.widgets.Control topWidget,
                                     int width)
        Creates a TextVar control to the left side of the parent composite and below the topWidget specified.
        Parameters:
        variableSpace - The variableSpace to be used when specifying varaibles
        composite - T
        flags - The SWT flags
        topWidget - The Widget immediately above this control. It will be used to set top in the layout.
        width - Controls the right edge of the control. If 0 the control will fill the the composite minus the margin. If non-zero the control will be width pixels wide.
        Returns:
      • createCCombo

        public org.eclipse.swt.custom.CCombo createCCombo​(org.eclipse.swt.widgets.Composite composite,
                                                          int flags,
                                                          org.eclipse.swt.widgets.Control topWidget,
                                                          int width)
        Creates a CCombo control to the left side of the parent composite and below the topWidget specified.
        Parameters:
        composite - The parent composite
        flags - The SWT flags
        topWidget - The Widget immediately above this control. It will be used to set top in the layout.
        width - Controls the right edge of the control. If 0 the control will fill the the composite minus the margin. If non-zero the control will be width pixels wide.
        Returns:
      • createComboVar

        public ComboVar createComboVar​(org.pentaho.di.core.variables.VariableSpace variableSpace,
                                       org.eclipse.swt.widgets.Composite composite,
                                       int flags,
                                       org.eclipse.swt.widgets.Control topWidget,
                                       int width)
      • createPasswordTextVar

        public PasswordTextVar createPasswordTextVar​(org.pentaho.di.core.variables.VariableSpace variableSpace,
                                                     org.eclipse.swt.widgets.Composite composite,
                                                     int flags,
                                                     org.eclipse.swt.widgets.Control topWidget,
                                                     int width)
      • createPasswordVisibleTextVar

        public PasswordVisibleTextVar createPasswordVisibleTextVar​(org.pentaho.di.core.variables.VariableSpace variableSpace,
                                                                   org.eclipse.swt.widgets.Composite composite,
                                                                   int flags,
                                                                   org.eclipse.swt.widgets.Control topWidget,
                                                                   int width)
      • createCheckboxVar

        public CheckBoxVar createCheckboxVar​(org.pentaho.di.core.variables.VariableSpace variableSpace,
                                             org.eclipse.swt.widgets.Composite composite,
                                             org.eclipse.swt.widgets.Control topWidget)
      • createTitleLabel

        public org.eclipse.swt.widgets.Label createTitleLabel​(org.eclipse.swt.widgets.Composite composite,
                                                              String key,
                                                              Set<org.eclipse.swt.widgets.Control> skipControls)
        This method places a centered title at the top of the composite recieved
        Parameters:
        composite - The composite holding the details
        key - The key to the message file
        skipControls - Controls that should not be lined up along a vertical column
        Returns:
      • getFormDataLabel

        public org.eclipse.swt.layout.FormData getFormDataLabel​(org.eclipse.swt.widgets.Control topWidget)
      • getFormDataField

        public org.eclipse.swt.layout.FormData getFormDataField​(org.eclipse.swt.widgets.Control topWidget)
      • getFormDataField

        public org.eclipse.swt.layout.FormData getFormDataField​(org.eclipse.swt.widgets.Control topWidget,
                                                                int width)
      • setupCompositeResizeListener

        public static void setupCompositeResizeListener​(org.eclipse.swt.widgets.Composite wComposite)
        Sets the Size of the Detail Composite to the track the Parent ScrolledComposites size.
        Parameters:
        wComposite - The DetailComposite
      • updateScrollableRegion

        public static void updateScrollableRegion​(org.eclipse.swt.widgets.Composite wComposite)