int c = natTable.getColumnPositionByX(event.x);
int r = natTable.getRowPositionByY(event.y);
ILayerCell cell = natTable.getCellByPosition(c, r);
int index = cell.getLayer()
.getRowIndexByPosition(cell.getRowPosition());
TreeExpandCollapseCommand command = new TreeExpandCollapseCommand(index);
natTable.doCommand(command);
}