org.pentaho.di.ui.core.widget
Class PluginWidgetFactory

java.lang.Object
  extended by org.pentaho.di.ui.core.widget.PluginWidgetFactory

public class PluginWidgetFactory
extends Object

Author:
Thomas Hoedl(asc042)

Field Summary
static int DEFAULT_MARGIN
          The margin.
static int DEFAULT_MIDDLE
          The default middle.
static int DEFAULT_RIGHT_OFFSET
           
 
Constructor Summary
PluginWidgetFactory(Shell shell, VariableSpace varSpace)
          Constructor.
 
Method Summary
 Button createButton(int style, String text)
           
 FormData createControlLayoutData(Control topControl)
          Convenience method to create FormData for Controls beside a label.
 Label createLabel(int style, String text)
          Create label.
 FormData createLabelLayoutData(Control topControl)
          Convenience method to create FormData for labels.
 Button createPushButton(String text)
           
 Label createRightLabel(String text)
          Create label.
 Text createSingleTextLeft(String text)
           
 TextVar createSingleTextVarLeft()
           
 Text createText(int style, String text)
           
 int getMargin()
           
 int getMiddle()
           
 void setMargin(int margin)
           
 void setMiddle(int middle)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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(Shell shell,
                           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 Label createRightLabel(String text)
Create label.

Parameters:
text - text to set.
Returns:
new label.

createLabel

public Label createLabel(int style,
                         String text)
Create label.

Parameters:
style - style to use.
text - text to set.
Returns:
new label.

createLabelLayoutData

public FormData createLabelLayoutData(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 FormData createControlLayoutData(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 Text createSingleTextLeft(String text)
Parameters:
text - text to set.
Returns:
text widget.

createText

public 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 Button createButton(int style,
                           String text)
Parameters:
style - style to use.
text - text to set.
Returns:
new button.

createPushButton

public Button createPushButton(String text)
Parameters:
text - text to set.
Returns:
new button.