Search in sources :

Example 6 with HideColumnPositionsEvent

use of org.eclipse.nebula.widgets.nattable.hideshow.event.HideColumnPositionsEvent in project nebula.widgets.nattable by eclipse.

the class ColumnHideShowLayer method hideColumnPositions.

@Override
public void hideColumnPositions(Collection<Integer> columnPositions) {
    Set<Integer> columnIndexes = new HashSet<Integer>();
    for (Integer columnPosition : columnPositions) {
        columnIndexes.add(getColumnIndexByPosition(columnPosition));
    }
    this.hiddenColumnIndexes.addAll(columnIndexes);
    invalidateCache();
    fireLayerEvent(new HideColumnPositionsEvent(this, columnPositions));
}
Also used : HideColumnPositionsEvent(org.eclipse.nebula.widgets.nattable.hideshow.event.HideColumnPositionsEvent) HashSet(java.util.HashSet)

Aggregations

HideColumnPositionsEvent (org.eclipse.nebula.widgets.nattable.hideshow.event.HideColumnPositionsEvent)6 Test (org.junit.Test)4 ArrayList (java.util.ArrayList)3 Range (org.eclipse.nebula.widgets.nattable.coordinate.Range)2 ColumnHideCommand (org.eclipse.nebula.widgets.nattable.hideshow.command.ColumnHideCommand)2 NatTableFixture (org.eclipse.nebula.widgets.nattable.test.fixture.NatTableFixture)2 LayerListenerFixture (org.eclipse.nebula.widgets.nattable.test.fixture.layer.LayerListenerFixture)2 HashSet (java.util.HashSet)1 NatTable (org.eclipse.nebula.widgets.nattable.NatTable)1 ColumnGroupModel (org.eclipse.nebula.widgets.nattable.group.ColumnGroupModel)1 ColumnGroup (org.eclipse.nebula.widgets.nattable.group.ColumnGroupModel.ColumnGroup)1 ShowColumnPositionsEvent (org.eclipse.nebula.widgets.nattable.hideshow.event.ShowColumnPositionsEvent)1 ILayerEvent (org.eclipse.nebula.widgets.nattable.layer.event.ILayerEvent)1 StructuralDiff (org.eclipse.nebula.widgets.nattable.layer.event.StructuralDiff)1