示例#1
0
 /**
  *
  * @param _itemToDeselect
  */
 @Override
 public void deselectItem(IVItem _itemToDeselect) {
     if (_itemToDeselect == null) {
         return;
     }
     _itemToDeselect.deselectBorder();
     if (observeSelectionChanges.isBeingObserved()) {
         observeSelectionChanges.change(this);
     }
 }
示例#2
0
 /**
  *
  * @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);
     }
 }
示例#3
0
 /**
  *
  * @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);
     }
 }
示例#4
0
 @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);
     }
 }
示例#5
0
 /**
  *
  * @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);
     }
 }