Package org.pentaho.di.ui.core.widget
Class PluginWidgetFactory
- java.lang.Object
-
- org.pentaho.di.ui.core.widget.PluginWidgetFactory
-
public class PluginWidgetFactory extends Object
- Author:
- Thomas Hoedl(asc042)
-
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_MARGIN
The margin.static int
DEFAULT_MIDDLE
The default middle.static int
DEFAULT_RIGHT_OFFSET
-
Constructor Summary
Constructors Constructor Description PluginWidgetFactory(org.eclipse.swt.widgets.Shell shell, org.pentaho.di.core.variables.VariableSpace varSpace)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.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)
TextVar
createSingleTextVarLeft()
org.eclipse.swt.widgets.Text
createText(int style, String text)
int
getMargin()
int
getMiddle()
void
setMargin(int margin)
void
setMiddle(int middle)
-
-
-
Field Detail
-
DEFAULT_MARGIN
public static final int DEFAULT_MARGIN
The margin.- See Also:
- Constant Field Values
-
DEFAULT_MIDDLE
public static final int DEFAULT_MIDDLE
The default middle.- See Also:
- Constant Field Values
-
DEFAULT_RIGHT_OFFSET
public static final int DEFAULT_RIGHT_OFFSET
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
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 Detail
-
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
public org.eclipse.swt.widgets.Label createRightLabel(String text)
Create label.- Parameters:
text
- text to set.- Returns:
- new label.
-
createLabel
public org.eclipse.swt.widgets.Label createLabel(int style, String text)
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
public org.eclipse.swt.widgets.Text createSingleTextLeft(String text)
- Parameters:
text
- text to set.- Returns:
- text widget.
-
createText
public org.eclipse.swt.widgets.Text createText(int style, String text)
- Parameters:
style
- style to use.text
- text to set.- Returns:
- text widget.
-
createSingleTextVarLeft
public TextVar createSingleTextVarLeft()
- Returns:
- new ...
-
createButton
public org.eclipse.swt.widgets.Button createButton(int style, String text)
- Parameters:
style
- style to use.text
- text to set.- Returns:
- new button.
-
createPushButton
public org.eclipse.swt.widgets.Button createPushButton(String text)
- Parameters:
text
- text to set.- Returns:
- new button.
-
-