Search in sources :

Example 61 with ListDataProvider

use of org.eclipse.nebula.widgets.nattable.data.ListDataProvider in project nebula.widgets.nattable by eclipse.

the class _5123_SummaryRowPositionExample method createExampleControl.

@Override
public Control createExampleControl(Composite parent) {
    Composite panel = new Composite(parent, SWT.NONE);
    GridLayout layout = new GridLayout();
    layout.verticalSpacing = 20;
    panel.setLayout(layout);
    // property names of the NumberValues class
    String[] propertyNames = { "columnOneNumber", "columnTwoNumber", "columnThreeNumber", "columnFourNumber", "columnFiveNumber" };
    IColumnPropertyAccessor<NumberValues> cpa = new ReflectiveColumnPropertyAccessor<>(propertyNames);
    IDataProvider dataProvider = new ListDataProvider<>(createNumberValueList(), cpa);
    ConfigRegistry configRegistry = new ConfigRegistry();
    // Summary row fixed on top
    DataLayer dataLayer = new DataLayer(dataProvider);
    ViewportLayer viewportLayer = new ViewportLayer(dataLayer);
    // Plug in the SummaryRowLayer
    FixedSummaryRowLayer summaryRowLayer = new FixedSummaryRowLayer(dataLayer, viewportLayer, configRegistry, false);
    summaryRowLayer.setHorizontalCompositeDependency(false);
    CompositeLayer composite = new CompositeLayer(1, 2);
    composite.setChildLayer("SUMMARY", summaryRowLayer, 0, 0);
    composite.setChildLayer(GridRegion.BODY, viewportLayer, 0, 1);
    NatTable natTable = new NatTable(panel, composite, false);
    GridDataFactory.fillDefaults().grab(true, true).applyTo(natTable);
    // Configure custom summary formula for a column
    natTable.addConfiguration(new ExampleSummaryRowConfiguration(dataProvider));
    natTable.addConfiguration(new DefaultNatTableStyleConfiguration());
    natTable.setConfigRegistry(configRegistry);
    natTable.configure();
    // Summary row fixed at the bottom
    dataLayer = new DataLayer(dataProvider);
    // IMPORTANT:
    // since the summary row layer is to the bottom of the viewport layer
    // we need to configure a GridLineCellLayerPainter that clips the top
    // cell. This means the body data layer is clipped at the bottom since
    // the painter is used globally
    dataLayer.setLayerPainter(new GridLineCellLayerPainter(false, true));
    viewportLayer = new ViewportLayer(dataLayer);
    // Plug in the SummaryRowLayer
    summaryRowLayer = new FixedSummaryRowLayer(dataLayer, viewportLayer, configRegistry, false);
    summaryRowLayer.setHorizontalCompositeDependency(false);
    composite = new CompositeLayer(1, 2);
    composite.setChildLayer(GridRegion.BODY, viewportLayer, 0, 0);
    composite.setChildLayer("SUMMARY", summaryRowLayer, 0, 1);
    natTable = new NatTable(panel, composite, false);
    GridDataFactory.fillDefaults().grab(true, true).applyTo(natTable);
    // Configure custom summary formula for a column
    natTable.addConfiguration(new ExampleSummaryRowConfiguration(dataProvider));
    natTable.addConfiguration(new DefaultNatTableStyleConfiguration());
    natTable.setConfigRegistry(configRegistry);
    natTable.configure();
    return panel;
}
Also used : ListDataProvider(org.eclipse.nebula.widgets.nattable.data.ListDataProvider) Composite(org.eclipse.swt.widgets.Composite) IDataProvider(org.eclipse.nebula.widgets.nattable.data.IDataProvider) ViewportLayer(org.eclipse.nebula.widgets.nattable.viewport.ViewportLayer) CompositeLayer(org.eclipse.nebula.widgets.nattable.layer.CompositeLayer) NumberValues(org.eclipse.nebula.widgets.nattable.dataset.NumberValues) FixedSummaryRowLayer(org.eclipse.nebula.widgets.nattable.summaryrow.FixedSummaryRowLayer) ReflectiveColumnPropertyAccessor(org.eclipse.nebula.widgets.nattable.data.ReflectiveColumnPropertyAccessor) ConfigRegistry(org.eclipse.nebula.widgets.nattable.config.ConfigRegistry) IConfigRegistry(org.eclipse.nebula.widgets.nattable.config.IConfigRegistry) GridLayout(org.eclipse.swt.layout.GridLayout) DataLayer(org.eclipse.nebula.widgets.nattable.layer.DataLayer) DefaultNatTableStyleConfiguration(org.eclipse.nebula.widgets.nattable.config.DefaultNatTableStyleConfiguration) NatTable(org.eclipse.nebula.widgets.nattable.NatTable) GridLineCellLayerPainter(org.eclipse.nebula.widgets.nattable.painter.layer.GridLineCellLayerPainter)

Example 62 with ListDataProvider

use of org.eclipse.nebula.widgets.nattable.data.ListDataProvider in project nebula.widgets.nattable by eclipse.

the class _5015_AutomaticDataSpanningExample method createExampleControl.

@Override
public Control createExampleControl(Composite parent) {
    // property names of the NumberValues class
    String[] propertyNames = { "columnOneNumber", "columnTwoNumber", "columnThreeNumber", "columnFourNumber", "columnFiveNumber" };
    IColumnPropertyAccessor<NumberValues> cpa = new ReflectiveColumnPropertyAccessor<>(propertyNames);
    IDataProvider dataProvider = new ListDataProvider<>(createNumberValueList(), cpa);
    AutomaticSpanningDataProvider spanningDataProvider = new AutomaticSpanningDataProvider(dataProvider, true, false);
    // spanningDataProvider.addAutoSpanningColumnPositions(0, 1, 2);
    // spanningDataProvider.addAutoSpanningColumnPositions(2, 3, 4);
    // spanningDataProvider.addAutoSpanningColumnPositions(0, 1, 3, 4);
    // spanningDataProvider.addAutoSpanningRowPositions(0, 1, 2);
    // spanningDataProvider.addAutoSpanningRowPositions(2, 3, 4);
    // spanningDataProvider.addAutoSpanningRowPositions(0, 1, 3, 4);
    NatTable natTable = new NatTable(parent, new ViewportLayer(new SelectionLayer(new SpanningDataLayer(spanningDataProvider))), false);
    natTable.addConfiguration(new DefaultNatTableStyleConfiguration());
    natTable.addConfiguration(new BodyMenuConfiguration(natTable, spanningDataProvider));
    natTable.configure();
    natTable.registerCommandHandler(new DisplayPersistenceDialogCommandHandler());
    return natTable;
}
Also used : ListDataProvider(org.eclipse.nebula.widgets.nattable.data.ListDataProvider) AutomaticSpanningDataProvider(org.eclipse.nebula.widgets.nattable.data.AutomaticSpanningDataProvider) IDataProvider(org.eclipse.nebula.widgets.nattable.data.IDataProvider) ViewportLayer(org.eclipse.nebula.widgets.nattable.viewport.ViewportLayer) SpanningDataLayer(org.eclipse.nebula.widgets.nattable.layer.SpanningDataLayer) NumberValues(org.eclipse.nebula.widgets.nattable.dataset.NumberValues) ReflectiveColumnPropertyAccessor(org.eclipse.nebula.widgets.nattable.data.ReflectiveColumnPropertyAccessor) DisplayPersistenceDialogCommandHandler(org.eclipse.nebula.widgets.nattable.persistence.command.DisplayPersistenceDialogCommandHandler) SelectionLayer(org.eclipse.nebula.widgets.nattable.selection.SelectionLayer) DefaultNatTableStyleConfiguration(org.eclipse.nebula.widgets.nattable.config.DefaultNatTableStyleConfiguration) NatTable(org.eclipse.nebula.widgets.nattable.NatTable)

Example 63 with ListDataProvider

use of org.eclipse.nebula.widgets.nattable.data.ListDataProvider in project nebula.widgets.nattable by eclipse.

the class _5031_VerticalCompositionExample method createExampleControl.

@Override
public Control createExampleControl(Composite parent) {
    // property names of the Person class
    String[] propertyNames = { "firstName", "lastName", "gender", "married", "birthday" };
    // mapping from property to label, needed for column header labels
    Map<String, String> propertyToLabelMap = new HashMap<>();
    propertyToLabelMap.put("firstName", "Firstname");
    propertyToLabelMap.put("lastName", "Lastname");
    propertyToLabelMap.put("gender", "Gender");
    propertyToLabelMap.put("married", "Married");
    propertyToLabelMap.put("birthday", "Birthday");
    IColumnPropertyAccessor<Person> columnPropertyAccessor = new ReflectiveColumnPropertyAccessor<>(propertyNames);
    final List<Person> data = PersonService.getPersons(10);
    IDataProvider bodyDataProvider = new ListDataProvider<>(data, columnPropertyAccessor);
    final DataLayer bodyDataLayer = new DataLayer(bodyDataProvider);
    final SelectionLayer selectionLayer = new SelectionLayer(bodyDataLayer);
    ViewportLayer viewportLayer = new ViewportLayer(selectionLayer);
    ILayer columnHeaderLayer = new ColumnHeaderLayer(new DataLayer(new DefaultColumnHeaderDataProvider(propertyNames, propertyToLabelMap)), viewportLayer, selectionLayer);
    // set the region labels to make default configurations work, e.g.
    // selection
    CompositeLayer compositeLayer = new CompositeLayer(1, 2);
    compositeLayer.setChildLayer(GridRegion.COLUMN_HEADER, columnHeaderLayer, 0, 0);
    compositeLayer.setChildLayer(GridRegion.BODY, viewportLayer, 0, 1);
    return new NatTable(parent, compositeLayer);
}
Also used : ListDataProvider(org.eclipse.nebula.widgets.nattable.data.ListDataProvider) HashMap(java.util.HashMap) ColumnHeaderLayer(org.eclipse.nebula.widgets.nattable.grid.layer.ColumnHeaderLayer) ILayer(org.eclipse.nebula.widgets.nattable.layer.ILayer) IDataProvider(org.eclipse.nebula.widgets.nattable.data.IDataProvider) ViewportLayer(org.eclipse.nebula.widgets.nattable.viewport.ViewportLayer) CompositeLayer(org.eclipse.nebula.widgets.nattable.layer.CompositeLayer) ReflectiveColumnPropertyAccessor(org.eclipse.nebula.widgets.nattable.data.ReflectiveColumnPropertyAccessor) DataLayer(org.eclipse.nebula.widgets.nattable.layer.DataLayer) SelectionLayer(org.eclipse.nebula.widgets.nattable.selection.SelectionLayer) NatTable(org.eclipse.nebula.widgets.nattable.NatTable) DefaultColumnHeaderDataProvider(org.eclipse.nebula.widgets.nattable.grid.data.DefaultColumnHeaderDataProvider) Person(org.eclipse.nebula.widgets.nattable.dataset.person.Person)

Example 64 with ListDataProvider

use of org.eclipse.nebula.widgets.nattable.data.ListDataProvider in project nebula.widgets.nattable by eclipse.

the class _5042_HorizontalSplitViewportExample method createExampleControl.

@Override
public Control createExampleControl(Composite parent) {
    // property names of the Person class
    String[] propertyNames = { "firstName", "lastName", "gender", "married", "birthday", "address.street", "address.housenumber", "address.postalCode", "address.city" };
    IColumnPropertyAccessor<PersonWithAddress> columnPropertyAccessor = new ExtendedReflectiveColumnPropertyAccessor<>(propertyNames);
    IDataProvider bodyDataProvider = new ListDataProvider<>(PersonService.getPersonsWithAddress(50), columnPropertyAccessor);
    DataLayer bodyDataLayer = new DataLayer(bodyDataProvider);
    // use a cell layer painter that is configured for left clipping
    // this ensures that the rendering works correctly for split viewports
    bodyDataLayer.setLayerPainter(new GridLineCellLayerPainter(true, false));
    // create a ViewportLayer for the left part of the table and configure
    // it to only contain the first 5 columns
    final ViewportLayer viewportLayerLeft = new ViewportLayer(bodyDataLayer);
    viewportLayerLeft.setMaxColumnPosition(5);
    // create a ViewportLayer for the right part of the table and configure
    // it to only contain the last 4 columns
    ViewportLayer viewportLayerRight = new ViewportLayer(bodyDataLayer);
    viewportLayerRight.setMinColumnPosition(5);
    // create a CompositeLayer that contains both ViewportLayers
    CompositeLayer compositeLayer = new CompositeLayer(2, 1);
    compositeLayer.setChildLayer("REGION_A", viewportLayerLeft, 0, 0);
    compositeLayer.setChildLayer("REGION_B", viewportLayerRight, 1, 0);
    // in order to make printing and exporting work correctly you need to
    // register the following command handlers
    // although in this example printing and exporting is not enabled, we
    // show the registering
    compositeLayer.registerCommandHandler(new MultiTurnViewportOnCommandHandler(viewportLayerLeft, viewportLayerRight));
    compositeLayer.registerCommandHandler(new MultiTurnViewportOffCommandHandler(viewportLayerLeft, viewportLayerRight));
    // set the width of the left viewport to only showing 2 columns at the
    // same time
    int leftWidth = bodyDataLayer.getStartXOfColumnPosition(2);
    // as the CompositeLayer is setting a IClientAreaProvider for the
    // composition we need to set a special ClientAreaAdapter after the
    // creation of the CompositeLayer to support split viewports
    ClientAreaAdapter leftClientAreaAdapter = new ClientAreaAdapter(viewportLayerLeft.getClientAreaProvider());
    leftClientAreaAdapter.setWidth(leftWidth);
    viewportLayerLeft.setClientAreaProvider(leftClientAreaAdapter);
    // Wrap NatTable in composite so we can slap on the external horizontal
    // sliders
    Composite composite = new Composite(parent, SWT.NONE);
    GridLayout gridLayout = new GridLayout(1, false);
    gridLayout.marginHeight = 0;
    gridLayout.marginWidth = 0;
    gridLayout.horizontalSpacing = 0;
    gridLayout.verticalSpacing = 0;
    composite.setLayout(gridLayout);
    NatTable natTable = new NatTable(composite, compositeLayer);
    GridData gridData = new GridData();
    gridData.horizontalAlignment = GridData.FILL;
    gridData.verticalAlignment = GridData.FILL;
    gridData.grabExcessHorizontalSpace = true;
    gridData.grabExcessVerticalSpace = true;
    natTable.setLayoutData(gridData);
    createSplitSliders(composite, viewportLayerLeft, viewportLayerRight);
    // add an IOverlayPainter to ensure the right border of the left
    // viewport always this is necessary because the left border of layer
    // stacks is not rendered by default
    natTable.addOverlayPainter(new IOverlayPainter() {

        @Override
        public void paintOverlay(GC gc, ILayer layer) {
            Color beforeColor = gc.getForeground();
            gc.setForeground(GUIHelper.COLOR_GRAY);
            int viewportBorderX = viewportLayerLeft.getWidth() - 1;
            gc.drawLine(viewportBorderX, 0, viewportBorderX, layer.getHeight() - 1);
            gc.setForeground(beforeColor);
        }
    });
    return composite;
}
Also used : ListDataProvider(org.eclipse.nebula.widgets.nattable.data.ListDataProvider) Composite(org.eclipse.swt.widgets.Composite) IOverlayPainter(org.eclipse.nebula.widgets.nattable.painter.IOverlayPainter) ILayer(org.eclipse.nebula.widgets.nattable.layer.ILayer) Color(org.eclipse.swt.graphics.Color) IDataProvider(org.eclipse.nebula.widgets.nattable.data.IDataProvider) ViewportLayer(org.eclipse.nebula.widgets.nattable.viewport.ViewportLayer) CompositeLayer(org.eclipse.nebula.widgets.nattable.layer.CompositeLayer) Point(org.eclipse.swt.graphics.Point) MultiTurnViewportOffCommandHandler(org.eclipse.nebula.widgets.nattable.print.command.MultiTurnViewportOffCommandHandler) MultiTurnViewportOnCommandHandler(org.eclipse.nebula.widgets.nattable.print.command.MultiTurnViewportOnCommandHandler) ClientAreaAdapter(org.eclipse.nebula.widgets.nattable.util.ClientAreaAdapter) DataLayer(org.eclipse.nebula.widgets.nattable.layer.DataLayer) GridLayout(org.eclipse.swt.layout.GridLayout) ExtendedReflectiveColumnPropertyAccessor(org.eclipse.nebula.widgets.nattable.data.ExtendedReflectiveColumnPropertyAccessor) GridData(org.eclipse.swt.layout.GridData) NatTable(org.eclipse.nebula.widgets.nattable.NatTable) PersonWithAddress(org.eclipse.nebula.widgets.nattable.dataset.person.PersonWithAddress) GridLineCellLayerPainter(org.eclipse.nebula.widgets.nattable.painter.layer.GridLineCellLayerPainter) GC(org.eclipse.swt.graphics.GC)

Example 65 with ListDataProvider

use of org.eclipse.nebula.widgets.nattable.data.ListDataProvider in project nebula.widgets.nattable by eclipse.

the class _5043_VerticalSplitViewportExample method createExampleControl.

@Override
public Control createExampleControl(Composite parent) {
    // property names of the Person class
    String[] propertyNames = { "firstName", "lastName", "gender", "married", "birthday", "address.street", "address.housenumber", "address.postalCode", "address.city" };
    IColumnPropertyAccessor<PersonWithAddress> columnPropertyAccessor = new ExtendedReflectiveColumnPropertyAccessor<>(propertyNames);
    IDataProvider bodyDataProvider = new ListDataProvider<>(PersonService.getPersonsWithAddress(50), columnPropertyAccessor);
    DataLayer bodyDataLayer = new DataLayer(bodyDataProvider);
    // use a cell layer painter that is configured for left clipping
    // this ensures that the rendering works correctly for split viewports
    bodyDataLayer.setLayerPainter(new GridLineCellLayerPainter(false, true));
    // create a ViewportLayer for the top part of the table and configure it
    // to only contain the first 10 rows
    final ViewportLayer viewportLayerTop = new ViewportLayer(bodyDataLayer);
    viewportLayerTop.setMaxRowPosition(10);
    // create a ViewportLayer for the bottom part of the table and configure
    // it to only contain the last rows
    ViewportLayer viewportLayerBottom = new ViewportLayer(bodyDataLayer);
    viewportLayerBottom.setMinRowPosition(10);
    // create a CompositeLayer that contains both ViewportLayers
    CompositeLayer compositeLayer = new CompositeLayer(1, 2);
    compositeLayer.setChildLayer("REGION_A", viewportLayerTop, 0, 0);
    compositeLayer.setChildLayer("REGION_B", viewportLayerBottom, 0, 1);
    // in order to make printing and exporting work correctly you need to
    // register the following command handlers although in this example
    // printing and exporting is not enabled, we show the registering
    compositeLayer.registerCommandHandler(new MultiTurnViewportOnCommandHandler(viewportLayerTop, viewportLayerBottom));
    compositeLayer.registerCommandHandler(new MultiTurnViewportOffCommandHandler(viewportLayerTop, viewportLayerBottom));
    // set the height of the top viewport to only showing 2 rows at the same
    // time
    int topHeight = bodyDataLayer.getStartYOfRowPosition(2);
    // as the CompositeLayer is setting a IClientAreaProvider for the
    // composition we need to set a special ClientAreaAdapter after the
    // creation of the CompositeLayer to support split viewports
    ClientAreaAdapter topClientAreaAdapter = new ClientAreaAdapter(viewportLayerTop.getClientAreaProvider());
    topClientAreaAdapter.setHeight(topHeight);
    viewportLayerTop.setClientAreaProvider(topClientAreaAdapter);
    // Wrap NatTable in composite so we can slap on the external vertical
    // sliders
    Composite composite = new Composite(parent, SWT.NONE);
    GridLayout gridLayout = new GridLayout(2, false);
    gridLayout.marginHeight = 0;
    gridLayout.marginWidth = 0;
    gridLayout.horizontalSpacing = 0;
    gridLayout.verticalSpacing = 0;
    composite.setLayout(gridLayout);
    NatTable natTable = new NatTable(composite, compositeLayer);
    GridData gridData = new GridData();
    gridData.horizontalAlignment = GridData.FILL;
    gridData.verticalAlignment = GridData.FILL;
    gridData.grabExcessHorizontalSpace = true;
    gridData.grabExcessVerticalSpace = true;
    natTable.setLayoutData(gridData);
    createSplitSliders(composite, viewportLayerTop, viewportLayerBottom);
    // add an IOverlayPainter to ensure the right border of the left
    // viewport always this is necessary because the left border of layer
    // stacks is not rendered by default
    natTable.addOverlayPainter(new IOverlayPainter() {

        @Override
        public void paintOverlay(GC gc, ILayer layer) {
            Color beforeColor = gc.getForeground();
            gc.setForeground(GUIHelper.COLOR_GRAY);
            int viewportBorderY = viewportLayerTop.getHeight() - 1;
            gc.drawLine(0, viewportBorderY, layer.getWidth() - 1, viewportBorderY);
            gc.setForeground(beforeColor);
        }
    });
    return composite;
}
Also used : ListDataProvider(org.eclipse.nebula.widgets.nattable.data.ListDataProvider) Composite(org.eclipse.swt.widgets.Composite) IOverlayPainter(org.eclipse.nebula.widgets.nattable.painter.IOverlayPainter) ILayer(org.eclipse.nebula.widgets.nattable.layer.ILayer) Color(org.eclipse.swt.graphics.Color) IDataProvider(org.eclipse.nebula.widgets.nattable.data.IDataProvider) ViewportLayer(org.eclipse.nebula.widgets.nattable.viewport.ViewportLayer) CompositeLayer(org.eclipse.nebula.widgets.nattable.layer.CompositeLayer) Point(org.eclipse.swt.graphics.Point) MultiTurnViewportOffCommandHandler(org.eclipse.nebula.widgets.nattable.print.command.MultiTurnViewportOffCommandHandler) MultiTurnViewportOnCommandHandler(org.eclipse.nebula.widgets.nattable.print.command.MultiTurnViewportOnCommandHandler) ClientAreaAdapter(org.eclipse.nebula.widgets.nattable.util.ClientAreaAdapter) DataLayer(org.eclipse.nebula.widgets.nattable.layer.DataLayer) GridLayout(org.eclipse.swt.layout.GridLayout) ExtendedReflectiveColumnPropertyAccessor(org.eclipse.nebula.widgets.nattable.data.ExtendedReflectiveColumnPropertyAccessor) GridData(org.eclipse.swt.layout.GridData) NatTable(org.eclipse.nebula.widgets.nattable.NatTable) PersonWithAddress(org.eclipse.nebula.widgets.nattable.dataset.person.PersonWithAddress) GridLineCellLayerPainter(org.eclipse.nebula.widgets.nattable.painter.layer.GridLineCellLayerPainter) GC(org.eclipse.swt.graphics.GC)

Aggregations

ListDataProvider (org.eclipse.nebula.widgets.nattable.data.ListDataProvider)73 DataLayer (org.eclipse.nebula.widgets.nattable.layer.DataLayer)64 NatTable (org.eclipse.nebula.widgets.nattable.NatTable)57 IDataProvider (org.eclipse.nebula.widgets.nattable.data.IDataProvider)46 ViewportLayer (org.eclipse.nebula.widgets.nattable.viewport.ViewportLayer)34 HashMap (java.util.HashMap)31 DefaultColumnHeaderDataProvider (org.eclipse.nebula.widgets.nattable.grid.data.DefaultColumnHeaderDataProvider)31 ILayer (org.eclipse.nebula.widgets.nattable.layer.ILayer)31 DefaultNatTableStyleConfiguration (org.eclipse.nebula.widgets.nattable.config.DefaultNatTableStyleConfiguration)30 ReflectiveColumnPropertyAccessor (org.eclipse.nebula.widgets.nattable.data.ReflectiveColumnPropertyAccessor)30 ColumnHeaderLayer (org.eclipse.nebula.widgets.nattable.grid.layer.ColumnHeaderLayer)29 SelectionLayer (org.eclipse.nebula.widgets.nattable.selection.SelectionLayer)27 DefaultCornerDataProvider (org.eclipse.nebula.widgets.nattable.grid.data.DefaultCornerDataProvider)25 RowHeaderLayer (org.eclipse.nebula.widgets.nattable.grid.layer.RowHeaderLayer)25 CornerLayer (org.eclipse.nebula.widgets.nattable.grid.layer.CornerLayer)24 GridLayer (org.eclipse.nebula.widgets.nattable.grid.layer.GridLayer)24 DefaultRowHeaderDataProvider (org.eclipse.nebula.widgets.nattable.grid.data.DefaultRowHeaderDataProvider)23 Person (org.eclipse.nebula.widgets.nattable.dataset.person.Person)21 DefaultRowHeaderDataLayer (org.eclipse.nebula.widgets.nattable.grid.layer.DefaultRowHeaderDataLayer)21 GridLayout (org.eclipse.swt.layout.GridLayout)19