Package org.eclipse.nebula.widgets.nattable.selection

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


        ILayer contextLayer = getContextLayer();
        if (!(contextLayer instanceof SelectionLayer)) {
            throw new RuntimeException(
                    "For the GridSearchStrategy to work it needs the selectionLayer to be passed as the contextLayer."); //$NON-NLS-1$
        }
        SelectionLayer selectionLayer = (SelectionLayer) contextLayer;
        @SuppressWarnings("unchecked")
        PositionCoordinate coordinate = CellDisplayValueSearchUtil.findCell(
                selectionLayer, configRegistry,
                getSelectedCells(selectionLayer), valueToMatch,
                (Comparator<String>) getComparator(), isCaseSensitive(),
View Full Code Here


        ILayer contextLayer = getContextLayer();
        if (!(contextLayer instanceof SelectionLayer)) {
            throw new RuntimeException(
                    "For the GridSearchStrategy to work it needs the selectionLayer to be passed as the contextLayer."); //$NON-NLS-1$
        }
        SelectionLayer selectionLayer = (SelectionLayer) contextLayer;
        PositionCoordinate selectionAnchor = selectionLayer
                .getSelectionAnchor();
        boolean hadSelectionAnchor = selectionAnchor.columnPosition >= 0
                && selectionAnchor.rowPosition >= 0;
        if (!hadSelectionAnchor) {
            selectionAnchor.columnPosition = 0;
            selectionAnchor.rowPosition = 0;
        }

        // Pick a first and second dimension based on whether it's a column or
        // row-first search.
        int firstDimPosition;
        int firstDimCount;
        int secondDimPosition;
        int secondDimCount;
        if (columnFirst) {
            firstDimPosition = selectionAnchor.columnPosition;
            firstDimCount = selectionLayer.getColumnCount();
            secondDimPosition = selectionAnchor.rowPosition;
            secondDimCount = selectionLayer.getRowCount();
        } else {
            firstDimPosition = selectionAnchor.rowPosition;
            firstDimCount = selectionLayer.getRowCount();
            secondDimPosition = selectionAnchor.columnPosition;
            secondDimCount = selectionLayer.getColumnCount();
        }

        // Pick start and end values depending on the direction of the search.
        int direction = searchDirection.equals(ISearchDirection.SEARCH_FORWARD) ? 1
                : -1;
View Full Code Here

        DataLayer bodyDataLayer = new DataLayer(bodyDataProvider);
        ColumnReorderLayer columnReorderLayer = new ColumnReorderLayer(
                bodyDataLayer);
        ColumnHideShowLayer columnHideShowLayer = new ColumnHideShowLayer(
                columnReorderLayer);
        SelectionLayer selectionLayer = new SelectionLayer(columnHideShowLayer);
        ViewportLayer viewportLayer = new ViewportLayer(selectionLayer);

        // build the column header layer
        IDataProvider columnHeaderDataProvider = new DefaultColumnHeaderDataProvider(
                propertyNames, propertyToLabelMap);
View Full Code Here

        // the ViewportLayer
        // directly as body layer is also working.
        IDataProvider bodyDataProvider = new DefaultBodyDataProvider<Person>(
                PersonService.getPersons(10), propertyNames);
        DataLayer bodyDataLayer = new DataLayer(bodyDataProvider);
        SelectionLayer selectionLayer = new SelectionLayer(bodyDataLayer);
        ViewportLayer viewportLayer = new ViewportLayer(selectionLayer);

        // build the column header layer
        IDataProvider columnHeaderDataProvider = new DefaultColumnHeaderDataProvider(
                propertyNames, propertyToLabelMap);
View Full Code Here

            // layer for event handling of GlazedLists and PropertyChanges
            GlazedListsEventLayer<T> glazedListsEventLayer = new GlazedListsEventLayer<T>(
                    bodyDataLayer, filterList);

            this.selectionLayer = new SelectionLayer(glazedListsEventLayer);
            ViewportLayer viewportLayer = new ViewportLayer(getSelectionLayer());

            setUnderlyingLayer(viewportLayer);
        }
View Full Code Here

        propertyToLabelMap.put("birthday", "Birthday");

        IDataProvider bodyDataProvider = new DefaultBodyDataProvider<Person>(
                PersonService.getPersons(10), propertyNames);
        DataLayer bodyDataLayer = new DataLayer(bodyDataProvider);
        SelectionLayer selectionLayer = new SelectionLayer(bodyDataLayer);
        ViewportLayer viewportLayer = new ViewportLayer(selectionLayer);

        viewportLayer.setRegionName(GridRegion.BODY);

        // add the ExportCommandHandler to the ViewportLayer in order to make
View Full Code Here

        DataLayer bodyDataLayer = new DataLayer(bodyDataProvider);
        ColumnReorderLayer columnReorderLayer = new ColumnReorderLayer(
                bodyDataLayer);
        ColumnHideShowLayer columnHideShowLayer = new ColumnHideShowLayer(
                columnReorderLayer);
        final SelectionLayer selectionLayer = new SelectionLayer(
                columnHideShowLayer);
        final ViewportLayer viewportLayer = new ViewportLayer(selectionLayer);

        final FreezeLayer freezeLayer = new FreezeLayer(selectionLayer);
        final CompositeFreezeLayer compositeFreezeLayer = new CompositeFreezeLayer(
View Full Code Here

        final List<Person> data = PersonService.getPersons(10);

        IRowDataProvider<Person> bodyDataProvider = new ListDataProvider<Person>(
                data, columnPropertyAccessor);
        final DataLayer bodyDataLayer = new DataLayer(bodyDataProvider);
        final SelectionLayer selectionLayer = new SelectionLayer(bodyDataLayer);
        ViewportLayer viewportLayer = new ViewportLayer(selectionLayer);

        ILayer rowHeaderLayer = new RowHeaderLayer(
                new DefaultRowHeaderDataLayer(new DefaultRowHeaderDataProvider(
                        bodyDataProvider)), viewportLayer, selectionLayer);
View Full Code Here

            // layer for event handling of GlazedLists and PropertyChanges
            GlazedListsEventLayer<T> glazedListsEventLayer = new GlazedListsEventLayer<T>(
                    bodyDataLayer, sortedList);

            this.selectionLayer = new SelectionLayer(glazedListsEventLayer);

            // add a tree layer to visualise the grouping
            TreeLayer treeLayer = new TreeLayer(selectionLayer,
                    bodyDataLayer.getTreeRowModel());
View Full Code Here

        final List<Person> data = PersonService.getPersons(10);

        IDataProvider bodyDataProvider = new ListDataProvider<Person>(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);
View Full Code Here

TOP

Related Classes of org.eclipse.nebula.widgets.nattable.selection.SelectionLayer

Copyright © 2018 www.massapicom. 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.