Exemplo n.º 1
0
 /**
  *
  * @param _itemToSelect
  */
 @Override
 public void selectItem(IVItem _itemToSelect) {
     if (_itemToSelect == null) {
         return;
     }
     selectedItem = _itemToSelect;
     _itemToSelect.selectBorder();
     if (observeSelectionChanges.isBeingObserved()) {
         observeSelectionChanges.change(this);
     }
 }
Exemplo n.º 2
0
 /**
  *
  * @param _itemsToSelect
  */
 @Override
 public void selectItems(IVItem[] _itemsToSelect) {
     if (_itemsToSelect == null) {
         return;
     }
     for (int i = 0; i < _itemsToSelect.length; i++) {
         IVItem item = _itemsToSelect[i];
         if (item != null) {
             item.selectBorder();
         }
     }
     if (observeSelectionChanges.isBeingObserved()) {
         observeSelectionChanges.change(this);
     }
 }
Exemplo n.º 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);
     }
 }
Exemplo n.º 4
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);
     }
 }