/** * Propagates the <code>SelectionChangeEvent</code> as is (i.e. whithout * modifying its source) to the listeners. * * @param evt * the propagated <code>BeanChangeEvent</code> */ public void fireSelectionChange(SelectionChangeEvent evt) { if (listeners != null) { int[] oldSelection = evt.getOldSelection(); int[] newSelection = evt.getNewSelection(); if (oldSelection == null && newSelection == null) { return; } if (oldSelection != null && newSelection != null && Arrays.equals(oldSelection, newSelection)) { return; } for (ISelectionChangeListener listener : listeners) { if (inhibitedListeners == null || !inhibitedListeners.contains(listener)) { listener.selectionChange(evt); } } } }
public void run() { ICollectionConnector connector = (ICollectionConnector) evt .getSource(); int[] oldSelection = evt.getOldSelection(); int[] newSelection = evt.getNewSelection(); if (oldSelection != null) { for (int i : oldSelection) { if (newSelection == null || Arrays.binarySearch(newSelection, i) < 0) { selectionModel .removeSelectionPath(getTreePathForConnector(connector .getChildConnector(i))); } } } if (newSelection != null) { for (int i : newSelection) { if (oldSelection == null || Arrays.binarySearch(oldSelection, i) < 0) { selectionModel .addSelectionPath(getTreePathForConnector(connector .getChildConnector(i))); } } } } });
@Override public void run() { ICollectionConnector connector = (ICollectionConnector) evt .getSource(); int[] oldSelection = evt.getOldSelection(); int[] newSelection = evt.getNewSelection(); if (oldSelection != null) { for (int i : oldSelection) { if (newSelection == null || Arrays.binarySearch(newSelection, i) < 0) { selectionModel .removeSelectionPath(getTreePathForConnector(connector .getChildConnector(i))); } } } if (newSelection != null) { for (int i : newSelection) { if (oldSelection == null || Arrays.binarySearch(oldSelection, i) < 0) { selectionModel .addSelectionPath(getTreePathForConnector(connector .getChildConnector(i))); } } } } });
/** * {@inheritDoc} */ public void selectionChange(SelectionChangeEvent evt) { ICollectionConnector connector = (ICollectionConnector) evt.getSource(); int[] oldSelection = evt.getOldSelection(); int[] newSelection = evt.getNewSelection(); if (oldSelection != null) { for (int i : oldSelection) { if (newSelection == null || Arrays.binarySearch(newSelection, i) < 0) { selectionModel .removeSelectionPath(getTreePathForConnector(connector .getChildConnector(i))); } } } if (newSelection != null) { for (int i : newSelection) { if (oldSelection == null || Arrays.binarySearch(oldSelection, i) < 0) { selectionModel.addSelectionPath(getTreePathForConnector(connector .getChildConnector(i))); } } } }
/** * {@inheritDoc} */ public void selectionChange(SelectionChangeEvent evt) { ICollectionConnector connector = (ICollectionConnector) evt.getSource(); int[] oldSelection = evt.getOldSelection(); int[] newSelection = evt.getNewSelection(); if (oldSelection != null) { for (int i : oldSelection) { if (newSelection == null || Arrays.binarySearch(newSelection, i) < 0) { selectionModel .removeSelectionPath(getTreePathForConnector(connector .getChildConnector(i))); } } } if (newSelection != null) { for (int i : newSelection) { if (oldSelection == null || Arrays.binarySearch(oldSelection, i) < 0) { selectionModel.addSelectionPath(getTreePathForConnector(connector .getChildConnector(i))); } } } }
/** * {@inheritDoc} */ public void selectionChange(SelectionChangeEvent evt) { ICollectionConnector connector = (ICollectionConnector) evt.getSource(); int[] oldSelection = evt.getOldSelection(); int[] newSelection = evt.getNewSelection(); if (oldSelection != null) { for (int i : oldSelection) { if (newSelection == null || Arrays.binarySearch(newSelection, i) < 0) { selectionModel .removeSelectionPath(getTreePathForConnector(connector .getChildConnector(i))); } } } if (newSelection != null) { for (int i : newSelection) { if (oldSelection == null || Arrays.binarySearch(oldSelection, i) < 0) { selectionModel.addSelectionPath(getTreePathForConnector(connector .getChildConnector(i))); } } } }