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

Need new tree visible property in Node that consider Scene and Stage visibility

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 8, 9
    • Fix Version/s: 9
    • Component/s: javafx
    • Labels:
      None

      Description

      Currently there is Node.treeVisible property which is true iff the node and all its parents up to the scene root are visible. It may be useful to have an extended version that would take scene and stage visibility into account.

      Use cases:
      * WebView needs to stop animations inside web page when it is not shown;
      * Jasper wanted to know when some node became visible in a tab.

      Considerations:
      * This is too expensive to calculate for all nodes by default. So the simplest way to provide it would be a special binding implementation or a util class. Where you create a instance and pass in the node you are interested in. It can then register listeners all the way up the tree and listen to what it needs.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ckyang Chien Yang (Inactive)
                Reporter:
                peterz Peter Zhelezniakov (Inactive)
              • Votes:
                1 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported: