Examples of SelectionLayer


Examples of org.eclipse.nebula.widgets.nattable.selection.SelectionLayer

    private SelectionModel model;

    @Before
    public void before() {
        SelectionLayer selectionLayer = new SelectionLayer(
                new DataLayerFixture(100, 100, 100, 40));
        model = new SelectionModel(selectionLayer);
    }
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.selection.SelectionLayer

            DataLayer bodyDataLayer = new DataLayer(dataProvider);
            ColumnReorderLayer columnReorderLayer = new ColumnReorderLayer(
                    bodyDataLayer);
            ColumnHideShowLayer columnHideShowLayer = new ColumnHideShowLayer(
                    columnReorderLayer);
            selectionLayer = new SelectionLayer(columnHideShowLayer);
            ViewportLayer viewportLayer = new ViewportLayer(selectionLayer);
            setUnderlyingLayer(viewportLayer);
        }
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.selection.SelectionLayer

    }

    public Control createExampleControl(Composite parent) {
        DummyBodyDataProvider bodyDataProvider = new DummyBodyDataProvider(500,
                1000000);
        SelectionLayer selectionLayer = new SelectionLayer(
                new ColumnHideShowLayer(new ColumnReorderLayer(new DataLayer(
                        bodyDataProvider))));
        ViewportLayer viewportLayer = new ViewportLayer(selectionLayer);

        DummyColumnHeaderDataProvider columnHeaderDataProvider = new DummyColumnHeaderDataProvider(
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.selection.SelectionLayer

    private void createNatTable(Composite parent, final ICellPainter painter) {
        IDataProvider bodyDataProvider = new ExampleTextBodyDataProvider();
        DataLayer dataLayer = new DataLayer(bodyDataProvider);
        dataLayer.setRowHeightByPosition(0, 32);
        SelectionLayer selectionLayer = new SelectionLayer(dataLayer);
        ViewportLayer viewportLayer = new ViewportLayer(selectionLayer);

        ILayer columnHeaderLayer = new ColumnHeaderLayer(new DataLayer(
                new DummyColumnHeaderDataProvider(bodyDataProvider)),
                viewportLayer, selectionLayer);
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.selection.SelectionLayer

    private void createNatTable2(Composite parent, final ICellPainter painter) {
        IDataProvider bodyDataProvider = new ExampleTextBodyDataProvider();
        DataLayer dataLayer = new DataLayer(bodyDataProvider);
        dataLayer.setRowHeightByPosition(0, 32);
        SelectionLayer selectionLayer = new SelectionLayer(dataLayer);
        ViewportLayer viewportLayer = new ViewportLayer(selectionLayer);

        ColumnHeaderLayer columnHeaderLayer = new ColumnHeaderLayer(
                new DataLayer(new ExampleHeaderDataProvider()), viewportLayer,
                selectionLayer, false);
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.selection.SelectionLayer

    }

    private void createVerticalHeaderNatTable(Composite parent,
            final ICellPainter painter) {
        IDataProvider bodyDataProvider = new ExampleHeaderDataProvider();
        SelectionLayer selectionLayer = new SelectionLayer(new DataLayer(
                bodyDataProvider));
        ViewportLayer viewportLayer = new ViewportLayer(selectionLayer);

        ColumnHeaderLayer columnHeaderLayer = new ColumnHeaderLayer(
                new DataLayer(new ExampleHeaderDataProvider()), viewportLayer,
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.selection.SelectionLayer

    @SuppressWarnings("unused")
    private void createNatTable3(Composite parent, final ICellPainter painter) {
        IDataProvider bodyDataProvider = new ExampleHeaderDataProvider();
        DataLayer dataLayer = new DataLayer(bodyDataProvider);

        SelectionLayer selectionLayer = new SelectionLayer(dataLayer);
        ViewportLayer viewportLayer = new ViewportLayer(selectionLayer);

        ILayer columnHeaderLayer = new ColumnHeaderLayer(new DataLayer(
                new DummyColumnHeaderDataProvider(bodyDataProvider)),
                viewportLayer, selectionLayer);
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.selection.SelectionLayer

    @SuppressWarnings("unused")
    private void createVerticalNatTable(Composite parent,
            final ICellPainter painter) {
        IDataProvider bodyDataProvider = new ExampleHeaderDataProvider();
        SelectionLayer selectionLayer = new SelectionLayer(new DataLayer(
                bodyDataProvider, 20, 100));
        ViewportLayer viewportLayer = new ViewportLayer(selectionLayer);

        ColumnHeaderLayer columnHeaderLayer = new ColumnHeaderLayer(
                new DataLayer(new DummyColumnHeaderDataProvider(
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.selection.SelectionLayer

        nattable.addConfiguration(new DefaultNatTableStyleConfiguration());
        nattable.addConfiguration(new HeaderMenuConfiguration(nattable));
        nattable.addConfiguration(new DefaultSelectionStyleConfiguration());

        // Custom selection configuration
        SelectionLayer selectionLayer = gridLayer.getSelectionLayer();
        selectionLayer.setSelectionModel(new RowSelectionModel<RowDataFixture>(
                selectionLayer, gridLayer.getBodyDataProvider(),
                new IRowIdAccessor<RowDataFixture>() {

                    public Serializable getRowId(RowDataFixture rowObject) {
                        return rowObject.getSecurity_id();
                    }

                }));

        selectionLayer
                .addConfiguration(new RowOnlySelectionConfiguration<RowDataFixture>());
        nattable.addConfiguration(new RowOnlySelectionBindings());

        nattable.configure();
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.selection.SelectionLayer

        nattable.setConfigRegistry(configRegistry);
        nattable.addConfiguration(new DefaultNatTableStyleConfiguration());
        nattable.addConfiguration(new SingleClickSortConfiguration());

        SelectionLayer selectionLayer = glazedListsGridLayer
                .getBodyLayerStack().getSelectionLayer();
        ListDataProvider<RowDataFixture> bodyDataProvider = glazedListsGridLayer
                .getBodyDataProvider();

        // Select complete rows
        RowOnlySelectionConfiguration<RowDataFixture> selectionConfig = new RowOnlySelectionConfiguration<RowDataFixture>();
        selectionLayer.addConfiguration(selectionConfig);
        nattable.addConfiguration(new RowOnlySelectionBindings());

        // Preserve selection on updates and sort
        selectionLayer.setSelectionModel(new RowSelectionModel<RowDataFixture>(
                selectionLayer, bodyDataProvider,
                new IRowIdAccessor<RowDataFixture>() {

                    public Serializable getRowId(RowDataFixture rowObject) {
                        return rowObject.getSecurity_id();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.