/** * * @param _itemToDeselect */ @Override public void deselectItem(IVItem _itemToDeselect) { if (_itemToDeselect == null) { return; } _itemToDeselect.deselectBorder(); if (observeSelectionChanges.isBeingObserved()) { observeSelectionChanges.change(this); } }
/** * * @param _itemsToDeselect */ @Override public void deselectItems(IVItem[] _itemsToDeselect) { if (_itemsToDeselect == null) { return; } for (int i = 0; i < _itemsToDeselect.length; i++) { IVItem item = _itemsToDeselect[i]; if (item != null) { item.deselectBorder(); } } if (observeSelectionChanges.isBeingObserved()) { observeSelectionChanges.change(this); } }
/** * * @param _itemToSelect */ @Override public void selectOneItem(IVItem _itemToSelect) { if (_itemToSelect == null) { return; } deselectAllItems(); IVItem _selectedItem = selectedItem; if (_selectedItem != null) { _selectedItem.deselectBorder(); } selectedItem = _itemToSelect; _itemToSelect.selectBorder(); if (observeSelectionChanges.isBeingObserved()) { observeSelectionChanges.change(this); } }
@Override public void deselectAllItems() { IVItem[] _items = items; if (_items == null) { return; } selectedItem = null; for (int i = 0; i < _items.length; i++) { IVItem item = _items[i]; if (item != null) { item.deselectBorder(); } } if (observeSelectionChanges.isBeingObserved()) { observeSelectionChanges.change(this); } }
/** * * @param _itemsToToggle */ @Override public void toggleItems(IVItem[] _itemsToToggle) { if (_itemsToToggle == null) { return; } for (int i = 0; i < _itemsToToggle.length; i++) { IVItem item = _itemsToToggle[i]; if (item != null) { if (item.isSelected()) { item.deselectBorder(); } else { item.selectBorder(); } } } if (observeSelectionChanges.isBeingObserved()) { observeSelectionChanges.change(this); } }