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
Nested ClassesModifier and TypeClassDescriptionstatic enumenumeration of available positioning elementsstatic enumenumeration of the contained widgets -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetInput()getter for the inputorg.eclipse.swt.layout.FormDatagetter for the inputFDorg.eclipse.swt.widgets.LabelgetLabel()getter for the labelorg.eclipse.swt.layout.FormDatagetter for the labelFDgetText(FormInput.Widget widget) getter for the widget textvoidsetter for the inputvoidsetInputFD(org.eclipse.swt.layout.FormData inputFD) setter for the inputFDvoidsetLabel(org.eclipse.swt.widgets.Label label) setter for the labelvoidsetLabelFD(org.eclipse.swt.layout.FormData labelFD) setter for the labelFDvoidsetPosition(int numerator, int offset, FormInput.Widget widget, FormInput.Position side) setter for the element positionvoidsetPosition(org.eclipse.swt.layout.FormAttachment position, FormInput.Widget widget, FormInput.Position side) setter for the element positionvoidsetPosition(org.eclipse.swt.widgets.Control control, int offset, FormInput.Widget widget, FormInput.Position side) setter for the element positionvoidsetText(String text, FormInput.Widget widget) setter for the widget textvoidsetToolTip(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
-