/** * Utility implementation to factorize method support. This should only be * used by subclasses which implement {@code IConnectorSelector}. * * @param listener * the listener to add. */ protected void implAddConnectorSelectionListener( IItemSelectionListener listener) { if (itemSelectionSupport == null) { itemSelectionSupport = new ItemSelectionSupport(); } itemSelectionSupport.addItemSelectionListener(listener); }
/** * Utility implementation to factorize method support. This should only be * used by subclasses which implement {@code IConnectorSelector}. * * @param listener * the listener to remove. */ protected void implRemoveConnectorSelectionListener( IItemSelectionListener listener) { if (itemSelectionSupport != null) { itemSelectionSupport.removeConnectorSelectionListener(listener); } }
/** * Utility implementation to factorize method support. This should only be * used by subclasses which implement {@code IItemSelectable}. * * @param evt * the item selection event to propagate. */ protected void implFireSelectedItemChange(ItemSelectionEvent evt) { selectedItem = evt.getSelectedItem(); if (itemSelectionSupport != null && (evt.getSource() == this || isTrackingChildrenSelection())) { itemSelectionSupport.fireSelectedConnectorChange(evt); } IValueConnector parentConnector = getParentConnector(); while (parentConnector != null && !(parentConnector instanceof IItemSelectable)) { parentConnector = parentConnector.getParentConnector(); } if (parentConnector != null) { ((IItemSelectable) parentConnector).fireSelectedItemChange(evt); } }