Class VFSDetailsCompositeHelper
- java.lang.Object
-
- org.pentaho.di.core.vfs.connections.ui.dialog.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.
-
-
Constructor Summary
Constructors Constructor Description VFSDetailsCompositeHelper()
VFSDetailsCompositeHelper(Class<?> messageClass, PropsUI props)
-
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 recievedorg.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)
-
-
-
Constructor Detail
-
VFSDetailsCompositeHelper
public VFSDetailsCompositeHelper() throws IllegalAccessException
- Throws:
IllegalAccessException
-
-
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 onflags
- The SWT flagskey
- the key to the message to use on the labeltopWidget
- 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
- Tflags
- The SWT flagstopWidget
- 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 varaiblescomposite
- Tflags
- The SWT flagstopWidget
- 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 compositeflags
- The SWT flagstopWidget
- 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 detailskey
- The key to the message fileskipControls
- 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)
-
-