Package org.eclipse.jface.layout
Class RowDataFactory
java.lang.Object
org.eclipse.jface.layout.RowDataFactory
This class provides a convenient shorthand for creating and initialising
 RowData. This offers several benefits over creating RowData the normal way:
 
- The same factory can be used many times to create several RowData instances
- The setters on RowDataFactory all return "this", allowing them to be chained
- Since:
- 3.5
- 
Method SummaryModifier and TypeMethodDescriptionvoidSets the layout data on the given control.copy()Creates a copy of the receiver.static RowDataReturns a copy of the given RowDatacreate()Creates a new GridData instance.static RowDataFactorycreateFrom(RowData data) Creates a new RowDataFactory that creates copies of the given RowData by default.exclude(boolean shouldExclude) Instructs the GridLayout to ignore this control when performing layouts.hint(int xHint, int yHint) Sets the width and height hints.Sets the width and height hints.static RowDataFactoryCreates a new RowDataFactory initialized with the SWT defaults.
- 
Method Details- 
swtDefaultsCreates a new RowDataFactory initialized with the SWT defaults.Initial values are: - exclude(false)
- hint(SWT.DEFAULT, SWT.DEFAULT)
 - Returns:
- a new GridDataFactory instance
 
- 
createFromCreates a new RowDataFactory that creates copies of the given RowData by default.- Parameters:
- data- RowData to copy
- Returns:
- a new RowDataFactory that creates copies of the argument by default
 
- 
copyDataReturns a copy of the given RowData- Parameters:
- data- RowData to copy
- Returns:
- a copy of the argument
 
- 
excludeInstructs the GridLayout to ignore this control when performing layouts.- Parameters:
- shouldExclude- true iff the control should be excluded from layouts
- Returns:
- this
 
- 
createCreates a new GridData instance. All attributes of the GridData instance will be initialised by the factory.- Returns:
- a new GridData instance
 
- 
copyCreates a copy of the receiver.- Returns:
- a copy of the receiver
 
- 
applyToSets the layout data on the given control. Creates a new RowData instance and assigns it to the control by calling control.setLayoutData.- Parameters:
- control- control whose layout data will be initialised
 
- 
hintSets the width and height hints. The width and height hints override the control's preferred size. If either hint is set to SWT.DEFAULT, the control's preferred size is used.- Parameters:
- xHint- horizontal hint (pixels), or SWT.DEFAULT to use the control's preferred size
- yHint- vertical hint (pixels), or SWT.DEFAULT to use the control's preferred size
- Returns:
- this
 
- 
hintSets the width and height hints. The width and height hints override the control's preferred size. If either hint is set to SWT.DEFAULT, the control's preferred size is used.- Parameters:
- hint- size (pixels) to be used instead of the control's preferred size. If the x or y values are set to SWT.DEFAULT, the control's computeSize() method will be used to obtain that dimension of the preferred size.
- Returns:
- this
 
 
-