org.eclipse.emf.ecp.view.spi.swt.layout
Class LayoutProviderHelper

java.lang.Object
  extended by org.eclipse.emf.ecp.view.spi.swt.layout.LayoutProviderHelper

public final class LayoutProviderHelper
extends Object

The helper class allowing an easy access to LayoutProviders.

Since:
1.3
Author:
Eugen Neufeld

Method Summary
static void addLayoutProvider(LayoutProvider layoutProvider)
          Allows to add a LayoutProvider directly.
static org.eclipse.swt.widgets.Layout getColumnLayout(int numColumns, boolean equalWidth)
          Eases the access to the layout provider extension point.
static 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 Object getSpanningLayoutData(int spanX, int spanY)
          The layout data for a spanning layout.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 create
equalWidth - whether the columns should be equal width
Returns:
the layout to use
See Also:
LayoutProvider.getColumnLayout(int, boolean)

getLayoutData

public static 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 current GridCell
controlGridDescription - the GridDescription of the rendered VElement
currentRowGridDescription - the GridDescription of the current row
fullGridDescription - the GridDescription of the whole container
vElement - the VElement which is currently rendered
domainModel - The domain model object whose feature is currently rendered
control - the rendered Control
Returns:
the Object being the layout data to set
Since:
1.6
See Also:
LayoutProvider#getLayoutData(GridCell, GridDescription, GridDescription, GridDescription, VElement, Control)

getSpanningLayoutData

public static Object getSpanningLayoutData(int spanX,
                                           int spanY)
The layout data for a spanning layout.

Parameters:
spanX - the horizontal span
spanY - the vertical span
Returns:
a simple spanning layout

addLayoutProvider

public static void addLayoutProvider(LayoutProvider layoutProvider)
Allows to add a LayoutProvider directly.

Parameters:
layoutProvider - The LayoutProvider
Since:
1.6


Copyright © 2015. All Rights Reserved.