Package org.eclipse.nebula.widgets.nattable.columnChooser

Examples of org.eclipse.nebula.widgets.nattable.columnChooser.ColumnEntry


        entriesFixture = ColumnEntriesFixture.getEntriesWithOddIndexes();
    }

    @Test
    public void find() throws Exception {
        ColumnEntry found = ColumnChooserUtils.find(entriesFixture, 5);
        assertEquals("Index5", found.getLabel());
    }
View Full Code Here


        switch (node.getType()) {
            case CATEGORY:
                return node.getData();
            case COLUMN:
                int index = Integer.parseInt(node.getData());
                ColumnEntry columnEntry = ColumnChooserUtils.find(
                        hiddenEntries, index);
                if (ObjectUtils.isNull(columnEntry)) {
                    System.err
                            .println("Column index " + index + " is present " + //$NON-NLS-1$ //$NON-NLS-2$
                                    "in the Column Categories model, " + //$NON-NLS-1$
                                    "but not in the underlying data"); //$NON-NLS-1$
                    return String.valueOf(index);
                }
                return columnEntry.getLabel();
            default:
                return Messages.getString("Unknown"); //$NON-NLS-1$
        }
    }
View Full Code Here

                    if (firstPositionInGroup == 0) {
                        return;
                    }

                    // Column entry
                    ColumnEntry columnEntry = getColumnEntryForPosition(
                            selectedTree, firstPositionInGroup);
                    int columnEntryIndex = columnEntry.getIndex();

                    // Previous column entry
                    ColumnEntry previousColumnEntry = getColumnEntryForPosition(
                            selectedTree, firstPositionInGroup - 1);
                    int previousColumnEntryIndex = previousColumnEntry
                            .getIndex();

                    if (columnGroupMoved) {
                        // If the previous entry is a column group - move above
                        // it.
View Full Code Here

                    int lastListIndex = groupedPositions.size() - 1;
                    int lastPositionInGroup = groupedPositions
                            .get(lastListIndex);

                    // Column entry
                    ColumnEntry columnEntry = getColumnEntryForPosition(
                            selectedTree, lastPositionInGroup);
                    int columnEntryIndex = columnEntry.getIndex();

                    // Next Column Entry
                    ColumnEntry nextColumnEntry = getColumnEntryForPosition(
                            selectedTree, lastPositionInGroup + 1);

                    // Next column entry will be null the last leaf in the tree
                    // is selected
                    if (nextColumnEntry == null) {
                        return;
                    }
                    int nextColumnEntryIndex = nextColumnEntry.getIndex();

                    if (columnGroupMoved) {
                        // If the next entry is a column group - move past it.
                        if (columnGroupModel != null
                                && columnGroupModel
View Full Code Here

                boolean markSelected = true;
                Collection<TreeItem> nestedLeaves = ArrayUtil.asCollection(leaf
                        .getItems());

                for (TreeItem nestedLeaf : nestedLeaves) {
                    ColumnEntry columnEntry = getColumnEntryInLeaf(nestedLeaf);
                    if (!columnEntryIndexes.contains(columnEntry.getIndex())) {
                        markSelected = false;
                    }
                }
                if (markSelected) {
                    selectedLeaves.add(leaf);
View Full Code Here

import org.eclipse.nebula.widgets.nattable.columnChooser.ColumnEntry;

public class ColumnEntriesFixture {

    public static List<ColumnEntry> getEntriesWithOddIndexes() {
        return Arrays.asList(new ColumnEntry("Index1", 1, 2), new ColumnEntry(
                "Index3", 3, 6), new ColumnEntry("Index5", 5, 3),
                new ColumnEntry("Index7", 7, 4),
                new ColumnEntry("Index9", 9, 5));
    }
View Full Code Here

                new ColumnEntry("Index7", 7, 4),
                new ColumnEntry("Index9", 9, 5));
    }

    public static List<ColumnEntry> getEntriesWithEvenIndexes() {
        return Arrays.asList(new ColumnEntry("Index2", 2, 2), new ColumnEntry(
                "Index4", 4, 6), new ColumnEntry("Index6", 6, 3),
                new ColumnEntry("Index8", 8, 4), new ColumnEntry("Index10", 10,
                        5));
    }
View Full Code Here

TOP

Related Classes of org.eclipse.nebula.widgets.nattable.columnChooser.ColumnEntry

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.