/** If the specified item is selected, it is deselected. * If it is not selected, it is selected. Other items in the tree * that are selected are not affected, and retain their selected state. */ public void toggleItemSelection(Treeitem item) { if (item.isSelected()) removeItemFromSelection(item); else addItemToSelection(item); }
addItemToSelection(item); if (_model instanceof TreeSelectableModel) ((TreeSelectableModel) _model).addSelectionPath(getTreeitemPath(this, item));
if (!model.isSelectionEmpty() && getSelectedCount() != model.getSelectionCount() && model.isPathSelected(path = getPath0(parent, i))) addItemToSelection(ti);