Package org.pentaho.di.ui.core.widget
Class FormInput<C extends org.eclipse.swt.widgets.Control>
- java.lang.Object
-
- org.pentaho.di.ui.core.widget.FormInput<C>
-
public class FormInput<C extends org.eclipse.swt.widgets.Control> extends Object
This class defines the fairly generic FormInput. This class is simply a convenience utility, containing the primary information required to build an input for a FormLayout. This template requires one to define the type of contained control. ex: FormInputinput = new FormInput ( new Label( shell, SWT.NONE ), new Text(shell, SWT.SINGLE | SWT.LEFT | SWT.BORDER) ); input.setText( "Hello", FormInput.Widget.LABEL ); input.setText( "World", FormInput.Widget.INPUT ); input.setToolTip( "To whom do you want to send a shout out?", FormInput.Widget.INPUT ); input.setPosition( 0, 47, FormInput.Widget.LABEL, FormInput.Position.LEFT ); input.setPosition( 0, 130, FormInput.Widget.LABEL, FormInput.Position.RIGHT ); input.setPosition( input.getLabel( ), 10, FormInput.Widget.INPUT, FormInput.Position.LEFT ); - Author:
- Robert D. Rice
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FormInput.Position
enumeration of available positioning elementsstatic class
FormInput.Widget
enumeration of the contained widgets
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description C
getInput()
getter for the inputorg.eclipse.swt.layout.FormData
getInputFD()
getter for the inputFDorg.eclipse.swt.widgets.Label
getLabel()
getter for the labelorg.eclipse.swt.layout.FormData
getLabelFD()
getter for the labelFDString
getText(FormInput.Widget widget)
getter for the widget textvoid
setInput(C input)
setter for the inputvoid
setInputFD(org.eclipse.swt.layout.FormData inputFD)
setter for the inputFDvoid
setLabel(org.eclipse.swt.widgets.Label label)
setter for the labelvoid
setLabelFD(org.eclipse.swt.layout.FormData labelFD)
setter for the labelFDvoid
setPosition(int numerator, int offset, FormInput.Widget widget, FormInput.Position side)
setter for the element positionvoid
setPosition(org.eclipse.swt.layout.FormAttachment position, FormInput.Widget widget, FormInput.Position side)
setter for the element positionvoid
setPosition(org.eclipse.swt.widgets.Control control, int offset, FormInput.Widget widget, FormInput.Position side)
setter for the element positionvoid
setText(String text, FormInput.Widget widget)
setter for the widget textvoid
setToolTip(String text, FormInput.Widget widget)
setter for the tooltip
-
-
-
Field Detail
-
vc_id
public static final String vc_id
- See Also:
- Constant Field Values
-
label
protected org.eclipse.swt.widgets.Label label
attributes
-
input
protected C extends org.eclipse.swt.widgets.Control input
-
labelFD
protected org.eclipse.swt.layout.FormData labelFD
-
inputFD
protected org.eclipse.swt.layout.FormData inputFD
-
-
Constructor Detail
-
FormInput
public FormInput(org.eclipse.swt.widgets.Label label, C input)
Constructor.- Parameters:
label
-control
- input
-
-
Method Detail
-
getLabel
public org.eclipse.swt.widgets.Label getLabel()
getter for the label- Returns:
- label
-
setLabel
public void setLabel(org.eclipse.swt.widgets.Label label)
setter for the label- Parameters:
label
-
-
getInput
public C getInput()
getter for the input- Returns:
- input
-
setInput
public void setInput(C input)
setter for the input- Parameters:
input
-
-
getLabelFD
public org.eclipse.swt.layout.FormData getLabelFD()
getter for the labelFD- Returns:
- labelFD
-
setLabelFD
public void setLabelFD(org.eclipse.swt.layout.FormData labelFD)
setter for the labelFD- Parameters:
labelFD
-
-
getInputFD
public org.eclipse.swt.layout.FormData getInputFD()
getter for the inputFD- Returns:
- inputFD
-
setInputFD
public void setInputFD(org.eclipse.swt.layout.FormData inputFD)
setter for the inputFD- Parameters:
inputFD
-
-
setPosition
public void setPosition(int numerator, int offset, FormInput.Widget widget, FormInput.Position side)
setter for the element position- Parameters:
numerator
-offset
-widget
- to set position, [ lable, input ]position
- side, [ left, right, top, bottom ]
-
setPosition
public void setPosition(org.eclipse.swt.widgets.Control control, int offset, FormInput.Widget widget, FormInput.Position side)
setter for the element position- Parameters:
Control
-offset
-widget
- to set position, [ lable, input ]position
- side, [ left, right, top, bottom ]
-
setPosition
public void setPosition(org.eclipse.swt.layout.FormAttachment position, FormInput.Widget widget, FormInput.Position side)
setter for the element position- Parameters:
FormAttachment
- positionwidget
- to set position, [ lable, input ]position
- side, [ left, right, top, bottom ]
-
setText
public void setText(String text, FormInput.Widget widget)
setter for the widget text- Parameters:
string
- textwidget
- to set text on
-
getText
public String getText(FormInput.Widget widget)
getter for the widget text- Parameters:
widget
- to retrieve the text from- Returns:
- string text
-
setToolTip
public void setToolTip(String text, FormInput.Widget widget)
setter for the tooltip- Parameters:
string
- text
-
-