/** * Updates the property on the source with the specified change. * * @param source * the property source * @param list * the new list * @param diff * a diff describing the change * @noreference This method is not intended to be referenced by clients. * @since 1.6 */ public final void setList(S source, List<E> list, ListDiff<E> diff) { if (source != null && !diff.isEmpty()) { doSetList(source, list, diff); } }
/** * Updates the property on the source with the specified change. * * @param source * the property source * @param list * the new list * @param diff * a diff describing the change * @noreference This method is not intended to be referenced by clients. * @since 1.6 */ public final void setList(S source, List<E> list, ListDiff<E> diff) { if (source != null && !diff.isEmpty()) { doSetList(source, list, diff); } }
private void updateList(List<E> list, ListDiff<E> diff) { if (!diff.isEmpty()) { boolean wasUpdating = updating; updating = true; try { property.updateList(source, diff); simplePropertyModCount++; } finally { updating = wasUpdating; } notifyIfChanged(null); } }
private void updateList(List<E> list, ListDiff<E> diff) { if (!diff.isEmpty()) { boolean wasUpdating = updating; updating = true; try { property.updateList(source, diff); simplePropertyModCount++; } finally { updating = wasUpdating; } notifyIfChanged(null); } }
private void notifyIfChanged(ListDiff<E> diff) { if (hasListeners()) { List<E> oldList = cachedList; List<E> newList = cachedList = new ArrayList<E>(getList()); if (diff == null) diff = Diffs.computeListDiff(oldList, newList); if (!diff.isEmpty() || stale) { stale = false; fireListChange(diff); } } }
private void notifyIfChanged(ListDiff<E> diff) { if (hasListeners()) { List<E> oldList = cachedList; List<E> newList = cachedList = new ArrayList<E>(getList()); if (diff == null) diff = Diffs.computeListDiff(oldList, newList); if (!diff.isEmpty() || stale) { stale = false; fireListChange(diff); } } }