Class LayoutProviderHelper
- java.lang.Object
-
- org.eclipse.emf.ecp.view.spi.swt.layout.LayoutProviderHelper
-
public final class LayoutProviderHelper extends java.lang.Object
The helper class allowing an easy access toLayoutProviders
.- Since:
- 1.3
- Author:
- Eugen Neufeld
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
addLayoutProvider(LayoutProvider layoutProvider)
Allows to add aLayoutProvider
directly.static org.eclipse.swt.widgets.Layout
getColumnLayout(int numColumns, boolean equalWidth)
Eases the access to the layout provider extension point.static org.eclipse.swt.widgets.Layout
getColumnLayout(int numColumns, boolean equalWidth, org.eclipse.swt.graphics.Point margins)
Eases the access to the layout provider extension point.static java.lang.Object
getLayoutData(SWTGridCell gridCell, SWTGridDescription controlGridDescription, SWTGridDescription currentRowGridDescription, SWTGridDescription fullGridDescription, VElement vElement, org.eclipse.emf.ecore.EObject domainModel, org.eclipse.swt.widgets.Control control)
Eases the access to the layout provider extension point.static java.lang.Object
getSpanningLayoutData(int spanX, int spanY)
The layout data for a spanning layout.
-
-
-
Method Detail
-
getColumnLayout
public static org.eclipse.swt.widgets.Layout getColumnLayout(int numColumns, boolean equalWidth)
Eases the access to the layout provider extension point. For the method description.- Parameters:
numColumns
- the number of columns to createequalWidth
- whether the columns should be equal width- Returns:
- the layout to use
- See Also:
LayoutProvider.getColumnLayout(int, boolean)
-
getColumnLayout
public static org.eclipse.swt.widgets.Layout getColumnLayout(int numColumns, boolean equalWidth, org.eclipse.swt.graphics.Point margins)
Eases the access to the layout provider extension point. For the method description.- Parameters:
numColumns
- the number of columns to createequalWidth
- whether the columns should be equal widthmargins
- the margins- Returns:
- the layout to use
- Since:
- 1.7
- See Also:
LayoutProvider.getColumnLayout(int, boolean, Point)
-
getLayoutData
public static java.lang.Object getLayoutData(SWTGridCell gridCell, SWTGridDescription controlGridDescription, SWTGridDescription currentRowGridDescription, SWTGridDescription fullGridDescription, VElement vElement, org.eclipse.emf.ecore.EObject domainModel, org.eclipse.swt.widgets.Control control)
Eases the access to the layout provider extension point. For the method description.- Parameters:
gridCell
- the currentSWTGridCell
controlGridDescription
- theSWTGridDescription
of the renderedVElement
currentRowGridDescription
- theSWTGridDescription
of the current rowfullGridDescription
- theSWTGridDescription
of the whole containervElement
- theVElement
which is currently rendereddomainModel
- The domain model object whose feature is currently renderedcontrol
- the renderedControl
- Returns:
- the Object being the layout data to set
- Since:
- 1.6
- See Also:
LayoutProvider.getLayoutData(SWTGridCell, SWTGridDescription, SWTGridDescription, SWTGridDescription, VElement, EObject, Control)
-
getSpanningLayoutData
public static java.lang.Object getSpanningLayoutData(int spanX, int spanY)
The layout data for a spanning layout.- Parameters:
spanX
- the horizontal spanspanY
- the vertical span- Returns:
- a simple spanning layout
-
addLayoutProvider
public static void addLayoutProvider(LayoutProvider layoutProvider)
Allows to add aLayoutProvider
directly.- Parameters:
layoutProvider
- TheLayoutProvider
- Since:
- 1.6
-
-