示例#1
0
    /**
     *
     * @param _toItem
     */
    @Override
    public void deselectFromSelectedItemTo(IVItem _toItem) {
        IVItem[] _items = items;
        if (_toItem == null || _items == null) {
            return;
        }
        IVItem _selectedItem = selectedItem;
        int i = 0;
        for (; i < _items.length; i++) {
            if (_items[i] == _toItem || _items[i] == _selectedItem) {
                break;
            }
        }

        if (i < _items.length) {
            _items[i].deselectBorder();

        }
        for (i++; i < _items.length; i++) {
            if (_items[i] == _toItem || _items[i] == selectedItem) {
                break;
            }
            _items[i].deselectBorder();
        }
        if (observeSelectionChanges.isBeingObserved()) {
            observeSelectionChanges.change(this);
        }
    }
示例#2
0
 /**
  *
  * @param _itemToDeselect
  */
 @Override
 public void deselectItem(IVItem _itemToDeselect) {
     if (_itemToDeselect == null) {
         return;
     }
     _itemToDeselect.deselectBorder();
     if (observeSelectionChanges.isBeingObserved()) {
         observeSelectionChanges.change(this);
     }
 }
示例#3
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);
     }
 }
示例#4
0
 @Override
 public void selectAllItems() {
      IVItem[] _items = items;
     if (_items == null) {
         return;
     }
     for (int i = 0; i < _items.length; i++) {
         if (_items[i] != null) {
             _items[i].selectBorder();
         }
     }
     if (observeSelectionChanges.isBeingObserved()) {
         observeSelectionChanges.change(this);
     }
 }
示例#5
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);
     }
 }
示例#6
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);
     }
 }
示例#7
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);
     }
 }
示例#8
0
 /**
  *
  * @param _observer
  */
 public void releaseSelectionChanges(AObserver _observer) {
     observeSelectionChanges.release(_observer);
 }
示例#9
0
 /**
  *
  * @param _observer
  */
 public void observeSelectionChanges(AObserver _observer) {
     observeSelectionChanges.bind(_observer);
 }