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

Add a Transition.setNode method

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • fx2.0.2
    • javafx
    • None

      If you create a reusable UI parent component which is capable of animating a number of contained child components, you might add a transition property, which would allow others to choose which transition is used for animating the child components.

      This means the parent component would have to do something like
      transition.setNode(child);
      transition.play();

      Luckily, there is a setNode method found in FadeTransition, ScaleTransition, etc. However, this setNode method is not defined in the Transition superclass, so this means you end up writing ugly code like
      if(transition instanceof FadeTransition)
        ((FadeTransition) transition).setNode(child);
      else if(transition instanceof ...)
      ...

      I hereby request that the method is added to Transition (if possible) or that at least some other common interface is introduced.

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

              Created:
              Updated:
              Imported: