[JavaFX API Review] RT-29696, FX 8 3D: Change mesh arrays to observable arrays
Alexander Kouznetsov
alexander.kouznetsov at oracle.com
Mon Apr 22 15:26:37 PDT 2013
Hi All,
JIRA: https://javafx-jira.kenai.com/browse/RT-29696
Current proposal introduces new observable data category:
ObservableArray
with two implementations: ObservableIntegerArray and ObservableFloatArray.
They have their own ArrayChangeListener interface:
> /**
> * Interface that receives notifications of changes to an ObservableArray.
> */
> public interface ArrayChangeListener<T extends ObservableArray> {
>
> /**
> * Called after a change has been made to an ObservableArray.
> *
> * @param sizeChanged indicates size of array changed
> * @param from A beginning (inclusive) of an interval related to
> the change
> * @param to An end (exclusive) of an interval related to the change.
> */
> public void onChanged(T observableArray, boolean sizeChanged, int
> from, int to);
> }
TriangleMesh API simplifies to just four methods:
public ObservableFloatArray getPoints();
public ObservableFloatArray getTexCoords();
public ObservableIntegerArray getFaces();
public ObservableIntegerArray getFaceSmoothingGroups();
This change improves the API while preserving the performance as
internal data storage is primitive array and there are methods to do
bulk operations on them.
--
Best regards,
Alexander Kouznetsov
(408) 276-0387
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ArrayChangeListener.html
Url: http://mail.openjdk.java.net/pipermail/openjfx-dev/attachments/20130422/5988f290/ArrayChangeListener.html
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: TriangleMesh.html
Url: http://mail.openjdk.java.net/pipermail/openjfx-dev/attachments/20130422/5988f290/TriangleMesh.html
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ObservableArray.html
Url: http://mail.openjdk.java.net/pipermail/openjfx-dev/attachments/20130422/5988f290/ObservableArray.html
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ObservableFloatArray.html
Url: http://mail.openjdk.java.net/pipermail/openjfx-dev/attachments/20130422/5988f290/ObservableFloatArray.html
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ObservableIntegerArray.html
Url: http://mail.openjdk.java.net/pipermail/openjfx-dev/attachments/20130422/5988f290/ObservableIntegerArray.html
More information about the openjfx-dev
mailing list