Package javafx.scene

Examples of javafx.scene.Node


        final Parent root = new CreateLeagueSceneBuilder().buildScene();
        Assert.assertNotNull(root);
        final ObservableList<Node> children = root.getChildrenUnmodifiable();
        // two VBoxes
        Assert.assertEquals(2, children.size());
        final Node tfMatchday = root.lookup("#idTfMatchday");
        Assert.assertNotNull(tfMatchday);
        final TextField matchday = (TextField) tfMatchday;
        final String date = "04.06.2012";
        matchday.setText(date);
        Assert.assertEquals(date, matchday.getText());
View Full Code Here


                World.TILE_WIDTH, World.TILE_HEIGHT);
        Point2D point = new Point2D(bounds.getMinX(), bounds.getMinY());
        if (bounds.intersects(checkBounds)) {
          if (!visibleNodes.containsKey(point)) {
            Tile tile = world.getTile(parentOffsetX + x, parentOffsetY + y);
            Node node = resourceLoader.createResource(tile);
            if (node != null) {
              node.setLayoutX(point.getX());
              node.setLayoutY(point.getY());
              visibleNodes.put(point, node);
              visibleNodesToAdd.add(node);
            }
          }
        } else {
View Full Code Here

      TileNode tileNode = new TileNode(tile);
      for (GameObject gameObject : tile.getObjects()) {
        tileNode.getChildren().add(createResource(gameObject));
      }

      Node landBorder = createLandBorder(tile.getX(), tile.getY(), tile.getLand());
      if (landBorder != null) {
        tileNode.getChildren().add(landBorder);
      }

      return tileNode;
View Full Code Here

        return new HasLabelMatcher( stringMatcher );
    }

    public static Node nodeLabeledBy(String labelQuery)
    {
        Node foundNode = GuiTest.find(labelQuery);

        checkArgument(foundNode instanceof Label);
        Label label = ( Label )foundNode;
        Node labelFor = label.getLabelFor();
        checkNotNull(labelFor);
        return labelFor;
    }
View Full Code Here

        return labelFor;
    }

    public static Node  nodeLabeledBy(Label label)
    {
        Node labelFor = label.getLabelFor();
        checkNotNull(labelFor);
        return labelFor;
    }
View Full Code Here

    /**
     * @param tableSelector Ein CSS-Selektor oder Label.     //TODO translate to englisch
     * @return Die TableView, sofern sie anhand des Selektors gefunden wurde.
     */
    static TableView<?> getTableView(String tableSelector) {
        Node node = find(tableSelector);
        if (!(node instanceof TableView)) {
            throw new NoNodesFoundException(tableSelector + " selected " + node +
                " which is not a TableView!");
        }
        return (TableView<?>) node;
View Full Code Here

        current = ((Parent) current.get(1)).getChildrenUnmodifiable();
        while (!(current.get(0) instanceof TableRow)) {
            current = ((Parent) current.get(0)).getChildrenUnmodifiable();
        }

        Node node = current.get(row);
        if (node instanceof TableRow) {
            return (TableRow<?>) node;
        }
        else {
            throw new RuntimeException("Expected Group with only TableRows as children");
View Full Code Here

        List<Node> current = row(tableSelector, row).getChildrenUnmodifiable();
        while (current.size() == 1 && !(current.get(0) instanceof TableCell)) {
            current = ((Parent) current.get(0)).getChildrenUnmodifiable();
        }

        Node node = current.get(column);
        if (node instanceof TableCell) {
            return (TableCell<?, ?>) node;
        }
        else {
            throw new RuntimeException("Expected TableRowSkin with only TableCells as children");
View Full Code Here

    public static void clearTextIn(TextInputControl textInputControl) {
        textInputControl.clear();
    }

    public static void clearTextIn(String textInputQuery) {
        Node node = find(textInputQuery);
        if (!(node instanceof TextInputControl)) {
            throw new NoNodesFoundException(textInputQuery + " selected " + node +
                " which is not a TextInputControl!");
        }
View Full Code Here

          .stream()
          .anyMatch(rowData -> rowValue.equals(rowData) || rowValue.equals(rowData.toString()));
    }

    static ListView<?> getListView(String listSelector) {
        Node node = find(listSelector);
        if (!(node instanceof ListView)) {
            throw new NoNodesFoundException(listSelector + " selected " + node +
                " which is not a ListView!");
        }
        return (ListView<?>) node;
View Full Code Here

TOP

Related Classes of javafx.scene.Node

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.