use of org.eclipse.nebula.widgets.nattable.hierarchical.command.HierarchicalTreeExpandCollapseCommand in project nebula.widgets.nattable by eclipse.
the class HierarchicalTreeExpandCollapseAction method run.
@Override
public void run(NatTable natTable, MouseEvent event) {
int c = natTable.getColumnPositionByX(event.x);
int r = natTable.getRowPositionByY(event.y);
ILayerCell cell = natTable.getCellByPosition(c, r);
int rowIndex = cell.getLayer().getRowIndexByPosition(cell.getOriginRowPosition());
int columnIndex = cell.getLayer().getColumnIndexByPosition(cell.getOriginColumnPosition());
HierarchicalTreeExpandCollapseCommand command = new HierarchicalTreeExpandCollapseCommand(rowIndex, columnIndex, this.toLevel);
natTable.doCommand(command);
}
Aggregations