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

Label does not reflect opacity during animation

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P4 P4
    • None
    • fx2.0
    • javafx

      Animating the opacity property of Label does not result in smooth changes from fully transparent to fully opaque as expected. I think maybe the skin has not bound its Text node's opacity to the opacity property of the Label.

      The bug is easily illustrated, if you create two labels and have them animate with this timeline:

      titleTimeline = new Timeline(
      new KeyFrame(
      Duration.ZERO,
      new KeyValue(title.scaleXProperty(), 0.5),
      new KeyValue(title.scaleYProperty(), 0.5),
      new KeyValue(title.opacityProperty(), 0),
      new KeyValue(fakeTitle.scaleXProperty(), 1),
      new KeyValue(fakeTitle.scaleYProperty(), 1),
      new KeyValue(fakeTitle.opacityProperty(), 1)
      ),
      new KeyFrame(
      Duration.millis(1000),
      new KeyValue(title.scaleXProperty(), 1),
      new KeyValue(title.scaleYProperty(), 1),
      new KeyValue(title.opacityProperty(), 1),
      new KeyValue(fakeTitle.scaleXProperty(), 2),
      new KeyValue(fakeTitle.scaleYProperty(), 2),
      new KeyValue(fakeTitle.opacityProperty(), 0)
      )
      );

            leifs Leif Samuelsson (Inactive)
            risaksen Randahl Isaksen
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: