Package org.eclipse.nebula.widgets.nattable.group.ColumnGroupModel

Examples of org.eclipse.nebula.widgets.nattable.group.ColumnGroupModel.ColumnGroup.removeColumn()


                        .getColumnGroupByIndex(fromColumnIndex);

                // If 'from' index not already present in the 'to' group
                if (fromColumnGroup != toColumnGroup) {
                    if (fromColumnGroup != null) {
                        fromColumnGroup.removeColumn(fromColumnIndex);
                    }
                    model.addColumnsIndexesToGroup(toGroupName, fromColumnIndex);
                }
            }
            return true;
View Full Code Here


                        .getColumnIndexByPosition(fromColumnPosition.intValue());
                ColumnGroup fromColumnGroup = model
                        .getColumnGroupByIndex(fromColumnIndex);

                if (fromColumnGroup != null
                        && !fromColumnGroup.removeColumn(fromColumnIndex)) {
                    return false;
                }
            }
            return true;
        }
View Full Code Here

        } else {
            if (columnGroupSize - 1 <= 0) {
                toColumnPositions.remove(columnGroupName);
            }
        }
        columnGroup.removeColumn(columnIndex);
    }

    private void handleRemoveColumnGroupCommand(int columnIndex) {
        ColumnGroup columnGroup = model.getColumnGroupByIndex(columnIndex);
        model.removeColumnGroup(columnGroup);
View Full Code Here

    }

    @Test
    public void shouldDragFirstCellRightAndAddColumnToGroup() {
        ColumnGroup columnGroup = modelFixture.getColumnGroupByIndex(0);
        columnGroup.removeColumn(0);
        assertEquals(1, getColumnIndexesInGroup(1).size());

        modelFixture.insertColumnIndexes(ColumnGroupModelFixture.TEST_GROUP_1,
                2);
        assertEquals(2, getColumnIndexesInGroup(1).size());
View Full Code Here

    public void removeColumnFromGroup() {
        ColumnGroup columnGroup = model.getColumnGroupByIndex(12);
        List<Integer> columnIndexesInGroup = columnGroup.getMembers();

        Assert.assertTrue(columnIndexesInGroup.contains(12));
        Assert.assertTrue(columnGroup.removeColumn(12));

        columnGroup = model.getColumnGroupByIndex(13);
        columnIndexesInGroup = columnGroup.getMembers();
        Assert.assertEquals(1, columnIndexesInGroup.size());
        Assert.assertTrue(columnGroup.removeColumn(13));
View Full Code Here

        Assert.assertTrue(columnGroup.removeColumn(12));

        columnGroup = model.getColumnGroupByIndex(13);
        columnIndexesInGroup = columnGroup.getMembers();
        Assert.assertEquals(1, columnIndexesInGroup.size());
        Assert.assertTrue(columnGroup.removeColumn(13));

        Assert.assertFalse(model.isPartOfAGroup(12));
    }

    @Test
View Full Code Here

    @Test
    public void shouldNotRemoveFromAnUnbreakableGroup() throws Exception {
        ColumnGroup columnGroup = model.getColumnGroupByIndex(7);
        columnGroup.setUnbreakable(true);
        Assert.assertFalse(columnGroup.removeColumn(7));
    }

    @Test
    public void getAllIndexesInGroups() throws Exception {
        List<Integer> indexes = model.getAllIndexesInGroups();
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.