/** * Before invoking the super implementation which fires the * {@code ValueChangeEvent}, this implementation reconstructs the child * connectors based on the retrieved collection. * <p> * {@inheritDoc} */ @Override public void propertyChange(PropertyChangeEvent evt) { updateChildConnectors(); super.propertyChange(evt); }
/** * Before invoking the super implementation which handles the * {@code ModelChangeEvent}, this implementation reconstructs the child * connectors based on the retrieved collection. * <p> * {@inheritDoc} */ @Override public void modelChange(ModelChangeEvent evt) { updateChildConnectors(); super.modelChange(evt); }
/** * {@inheritDoc} */ @Override public boolean areChildrenWritable() { // overridden to restore local writability condition for children (opposite // to ModelRefPropertyConnector). return isWritable(); }
/** * {@inheritDoc} */ public IValueConnector createModelConnector(String id, IModelDescriptor modelDescriptor) { return modelConnectorFactory.createModelConnector(id, modelDescriptor); }
/** * After having performed the standard (super implementation) handling of the * {@code ModelChangeEvent}, it will notify its child connectors of the * referenced model change. * <p> * {@inheritDoc} */ @Override public void modelChange(ModelChangeEvent evt) { // notify the listeners fireModelChange(getOldConnectorValue(), getConnecteeValue()); // handle the change normally super.modelChange(evt); }
/** * The referenced model of this {@code ModelRefPropertyConnector} * changed. It will notify its {@code IModelChangeListener} s (i.e. the * child property connectors) of the change. * <p> * {@inheritDoc} */ @Override public void propertyChange(PropertyChangeEvent evt) { fireModelChange(evt.getOldValue(), evt.getNewValue()); super.propertyChange(evt); }
/** * {@inheritDoc} */ public IAccessorFactory getAccessorFactory() { return modelConnectorFactory.getAccessorFactory(); }
/** * {@inheritDoc} */ @Override public void writabilityChange() { super.writabilityChange(); for (String key : getChildConnectorKeys()) { getChildConnector(key).writabilityChange(); } }
/** * {@inheritDoc} */ @Override public IValueConnector getChildConnector(int index) { return getChildConnector(computeStorageKey(index)); }
/** * {@inheritDoc} */ @Override public boolean areChildrenReadable() { return isReadable(); }
/** * {@inheritDoc} */ @Override public ModelRefPropertyConnector clone(String newConnectorId) { ModelRefPropertyConnector clonedConnector = (ModelRefPropertyConnector) super .clone(newConnectorId); clonedConnector.modelChangeSupport = null; clonedConnector.childConnectors = null; clonedConnector.childConnectorKeys = null; return clonedConnector; }
/** * Called when the underlying connectee value (the model property) changes. * This implementation notifies its {@code IValueChangeListener} s about * the change passing the new model property. * <p> * {@inheritDoc} */ @Override public void propertyChange(PropertyChangeEvent evt) { fireConnectorValueChange(); }
/** * Updates its child connectors to reflect the collection. * <p> * {@inheritDoc} */ @Override public void boundAsModel() { updateChildConnectors(); }
/** * {@inheritDoc} */ @Override public boolean isWritable() { // A model property collection connector should never be made read-only, // by its parent connector. Boolean locallyWritable = isLocallyWritable(); return locallyWritable == null || locallyWritable; }
/** * Gets the modelProvider. * * @return the modelProvider. */ @Override public IModelProvider getModelProvider() { if (getParentConnector() instanceof IModelProvider) { return (IModelProvider) getParentConnector(); } return null; }
/** * {@inheritDoc} */ @Override public IValueConnector createModelConnector(String id, IModelDescriptor modelDescriptor) { return modelConnectorFactory.createModelConnector(id, modelDescriptor, this); }
/** * {@inheritDoc} */ @Override public IAccessorFactory getAccessorFactory() { return modelConnectorFactory.getAccessorFactory(); }