Package javafx.scene

Examples of javafx.scene.Parent


    public static void arrowIndication(@Nonnull Node node) {

        Arrow pos = Arrow.LEFT;

        Parent parent = node.getParent();
        if (parent == null || !(parent instanceof Pane)) {
            return;
        }

        ImageView imm = new ImageView(getImage("arrow_right_24.png"));
View Full Code Here


        launch(args);
    }

    @Override
    public void start(Stage stage) throws Exception {
        Parent root = FXMLLoader.load(getClass().getResource("/fxml/MainWindow.fxml"));

        Scene scene = new Scene(root);
        scene.getStylesheets().add("/styles/Default.css");

        stage.setTitle("Base64 Decoder");
View Full Code Here

   * Gets the root the node.
   * @param node Node to get root of
   * @return Stage of the node or null if it isn't displayed on a stage
   */
  public static Parent getRoot(Node node) {
    Parent parent = node.getParent();
    while (parent.getParent() != null) {
      parent = parent.getParent();
    }
    return parent;
  }
View Full Code Here

  public void start(final Stage stage) throws Exception {
    initGui(stage);
  }

  private void initGui(final Stage stage) throws IOException {
    Parent root = FXMLLoader.load(getClass().getResource(VIEW_GAME));
    Scene scene = SceneBuilder.create().root(root).width(500).height(530)
        .fill(Color.GRAY).build();
    scene.getStylesheets().add(STYLESHEET_FILE);
    stage.setScene(scene);
    stage.setTitle("hasCode.com - Java FX 2 Ball Game Tutorial");
View Full Code Here

*/
public class CreateLeagueSceneBuilderTest {

    @Test
    public void buildCreateLeagueSceneTest() {
        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

    table.setItems(orderRows);
  }
 
  public void showView(Stage primaryStage) {
    if(dialogStage==null) {
      Parent root = (Parent) TestApplication.loader.load("/search.fxml");
      Scene scene = new Scene(root, 768, 480);
      dialogStage = new Stage();
      dialogStage.initOwner(primaryStage);
      dialogStage.initModality(Modality.WINDOW_MODAL);
      dialogStage.setScene(scene);
View Full Code Here

public class MainApp extends Application {

    @Override
    public void start(Stage stage) throws Exception {
        Parent root = FXMLLoader.load(getClass().getResource("/fxml/Scene.fxml"));
       
        Scene scene = new Scene(root);
        scene.getStylesheets().add("/styles/Styles.css");
       
        stage.setTitle("RESTClient JFX");
View Full Code Here

    } catch (IOException e) {
      throw new DskRuntimeException("fxmlの指定が不正です", e);
    } finally {
      IoTools.close(is);
    }
    Parent root = loader.getRoot();
    Scene scene = new Scene(root);
    return scene;
  }
View Full Code Here

            throw new IllegalStateException("Cannot load " + getFXMLName(), ex);
        }
    }

    public Parent getView() {
        Parent parent = loader.getRoot();
        return parent;
    }
View Full Code Here

        setupStages(this);
    }

    // Runs in JavaFX Application Thread.
    public void setupStages(Stage primaryStage) {
        Parent sceneRootNode = getRootNode();
        Scene scene = new Scene(sceneRootNode);
        primaryStage.setScene(scene);
    }
View Full Code Here

TOP

Related Classes of javafx.scene.Parent

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.