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

[CSS, SceneGraph] Node lookup with TabPane

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 8u20
    • Fix Version/s: 8u40
    • Component/s: javafx
    • Labels:
      None
    • Environment:

      java version "1.8.0_20-ea"
      Java(TM) SE Runtime Environment (build 1.8.0_20-ea-b17)
      Java HotSpot(TM) 64-Bit Server VM (build 25.20-b17, mixed mode)

      Description

      Looking up a node with TabPane.lookupAll does not return any result.
      This seems to be the caused by the children not being filled with the content nodes of the single tabs.
      Maybe this is affects more nodes eg. like Accordion?

      Test:
        public void testLookup() throws Exception {
          TabPane tabPane = new TabPane();
          Tab tab1 = new Tab("tab1");
          tabPane.getTabs().add(tab1);

          StackPane content = new StackPane();
          TextField nodeWithId = new TextField();
          nodeWithId.setId("test");
          content.getChildren().add(nodeWithId);
          tab1.setContent(content);
          assertSame(nodeWithId, content.lookup("#test"));
          Set<Node> idNodes = tabPane.lookupAll("#test");
          assertEquals(1, idNodes.size());
          assertSame(nodeWithId, tabPane.lookup("#test"));
        }

        Attachments

          Activity

            People

            Assignee:
            dgrieve David Grieve
            Reporter:
            duke J. Duke (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported: