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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 9
    • 8, 9
    • javafx
    • None

      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.

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

              Created:
              Updated:
              Resolved:
              Imported: