Package org.pentaho.di.ui.core.widget
Class PluginWidgetFactory
java.lang.Object
org.pentaho.di.ui.core.widget.PluginWidgetFactory
- Author:
- Thomas Hoedl(asc042)
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
The margin.static final int
The default middle.static final int
-
Constructor Summary
ConstructorsConstructorDescriptionPluginWidgetFactory
(org.eclipse.swt.widgets.Shell shell, org.pentaho.di.core.variables.VariableSpace varSpace) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionorg.eclipse.swt.widgets.Button
createButton
(int style, String text) org.eclipse.swt.layout.FormData
createControlLayoutData
(org.eclipse.swt.widgets.Control topControl) Convenience method to create FormData for Controls beside a label.org.eclipse.swt.widgets.Label
createLabel
(int style, String text) Create label.org.eclipse.swt.layout.FormData
createLabelLayoutData
(org.eclipse.swt.widgets.Control topControl) Convenience method to create FormData for labels.org.eclipse.swt.widgets.Button
createPushButton
(String text) org.eclipse.swt.widgets.Label
createRightLabel
(String text) Create label.org.eclipse.swt.widgets.Text
createSingleTextLeft
(String text) org.eclipse.swt.widgets.Text
createText
(int style, String text) int
int
void
setMargin
(int margin) void
setMiddle
(int middle)
-
Field Details
-
DEFAULT_MARGIN
public static final int DEFAULT_MARGINThe margin.- See Also:
-
DEFAULT_MIDDLE
public static final int DEFAULT_MIDDLEThe default middle.- See Also:
-
DEFAULT_RIGHT_OFFSET
public static final int DEFAULT_RIGHT_OFFSET- See Also:
-
-
Constructor Details
-
PluginWidgetFactory
public PluginWidgetFactory(org.eclipse.swt.widgets.Shell shell, org.pentaho.di.core.variables.VariableSpace varSpace) throws IllegalArgumentException Constructor.- Parameters:
shell
- the shell to set.varSpace
- the variableSpace to be used. e.g. for TextVar- Throws:
IllegalArgumentException
- if shell is null.
-
-
Method Details
-
getMargin
public int getMargin()- Returns:
- the margin
-
setMargin
public void setMargin(int margin) - Parameters:
margin
- the margin to set
-
getMiddle
public int getMiddle()- Returns:
- the middle
-
setMiddle
public void setMiddle(int middle) - Parameters:
middle
- the middle to set
-
createRightLabel
Create label.- Parameters:
text
- text to set.- Returns:
- new label.
-
createLabel
Create label.- Parameters:
style
- style to use.text
- text to set.- Returns:
- new label.
-
createLabelLayoutData
public org.eclipse.swt.layout.FormData createLabelLayoutData(org.eclipse.swt.widgets.Control topControl) Convenience method to create FormData for labels.- Parameters:
topControl
- the control which is above the current label, or null if none above.- Returns:
- layoutData.
-
createControlLayoutData
public org.eclipse.swt.layout.FormData createControlLayoutData(org.eclipse.swt.widgets.Control topControl) Convenience method to create FormData for Controls beside a label.- Parameters:
topControl
- the control which is above the current label, or null if none above.- Returns:
- layoutData.
-
createSingleTextLeft
- Parameters:
text
- text to set.- Returns:
- text widget.
-
createText
- Parameters:
style
- style to use.text
- text to set.- Returns:
- text widget.
-
createSingleTextVarLeft
- Returns:
- new ...
-
createButton
- Parameters:
style
- style to use.text
- text to set.- Returns:
- new button.
-
createPushButton
- Parameters:
text
- text to set.- Returns:
- new button.
-