API REVIEW: BaseObservableList
richard.bair at oracle.com
Fri Jan 18 13:42:58 PST 2013
>>> Following methods were part of IterableChangeBuilder in the original discussion. Now they will be part of BaseObservableList and can be used for creating a Change and firing it, so you don't need to create subclasses of ListChangeListener.Change yourself.
>>> protected final void nextUpdate(int pos)
>>> protected final void nextSet(int idx, E old)
>>> protected final void nextReplace(int from, int to, ArrayList removed)
>>> protected final void nextRemove(int idx, List removed)
>>> protected final void nextRemove(int idx, E removed)
>>> protected final void nextPermutation(int from, int to, int perm)
>>> protected final void nextAdd(int from, int to)
>>> protected final void endChange()
>>> protected final void beginChange()
>>> All next* methods need to be enclosed in beginChange() / endChange() pair. The calls can be also nested and after the outermost endChange() call, callListeners() will be called with the newly created Change.
>> It seems odd that these are on the base class itself. I don't remember the previous conversation so maybe I said something different before :-). Steve, I'm wondering what you think on this point?
> I don't think we discussed this before. The other option is to have this as part of ListChangeBuilder, which would be public (I planned to have it package private) and call the methods on the builder instead.
> So instead of
> we'd get
I like having the changes grouped together like this. Can you get a web rev (or diff) up on the JIRA issue so we have documented what it is we've concluded here?
More information about the openjfx-dev