Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8142400

Improve Timeline javadoc with regards to KeyFrame ordering

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P4 P4
    • tbd
    • None
    • javafx

      The Timeline javadoc does not say much about KeyFrame ordering. In particular I recommend improving the Timeline constructor doc to explicitly state whether we are required to specify the KeyEvents in timed order or whether random order is allowed.

      Say I have a timeline which moves two cars A and B around the scene. It might be helpful for me to order the KeyEvents so that all the KeyEvents relating to car A are specified first, before all the KeyEvents of car B. This would make the code more readable, since you can read what car A does and then read what car B does. However, the docs does not say if creating such an unordered timeline is allowed.

      The javadoc does say
      "A Timeline, defined by one or more KeyFrames, processes individual KeyFrame sequentially, in the order specified by KeyFrame.time."
      which I personally doubt many developers will understand without looking at the Timeline code.

            nlisker Nir Lisker
            risaksen Randahl Isaksen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: