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>
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: FormInput input = 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
Modifier and TypeClassDescriptionstatic enum
enumeration of available positioning elementsstatic enum
enumeration of the contained widgets -
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetInput()
getter for the inputorg.eclipse.swt.layout.FormData
getter for the inputFDorg.eclipse.swt.widgets.Label
getLabel()
getter for the labelorg.eclipse.swt.layout.FormData
getter for the labelFDgetText
(FormInput.Widget widget) getter for the widget textvoid
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 Details
-
vc_id
- See Also:
-
label
protected org.eclipse.swt.widgets.Label labelattributes -
input
-
labelFD
protected org.eclipse.swt.layout.FormData labelFD -
inputFD
protected org.eclipse.swt.layout.FormData inputFD
-
-
Constructor Details
-
FormInput
Constructor.- Parameters:
label
-control
- input
-
-
Method Details
-
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
getter for the input- Returns:
- input
-
setInput
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
setter for the widget text- Parameters:
string
- textwidget
- to set text on
-
getText
getter for the widget text- Parameters:
widget
- to retrieve the text from- Returns:
- string text
-
setToolTip
setter for the tooltip- Parameters:
string
- text
-