Package javafx.geometry

Examples of javafx.geometry.Insets


      }
    });
   
    BorderPane pane = new BorderPane();
    pane.setTop(paneInfo.getPane());
    BorderPane.setMargin(paneInfo.getPane(), new Insets(10));
   
    Pane log4jPane = Log4jAppenderController.loadPane(log4model);
   
    pane.setCenter(log4jPane);
    BorderPane.setMargin(log4jPane, new Insets(10));
       
    JuFxUtils.startApplication()
      .pane(pane)
      .title(this.getTitle())
      .start(new ApplicationInitializer() {
View Full Code Here


        pane.setAlignment(Pos.CENTER); // center element
       
        pane.setVgap(10);// vertical gap
        pane.setHgap(10);// horizontal gap
       
        pane.setPadding(new Insets(25, 25, 25, 25));
       
        // Scene
        Scene scene = new Scene(pane, 300, 275);// init scene
        // Welcome message
        Text sceneTitle = new Text("Text Twist Cheat"); // init text title
View Full Code Here

        console.appendText("Program started.\n");
    }

    private HBox addTopHBox() {
        HBox hbox = new HBox();
        hbox.setPadding(new Insets(15, 12, 15, 12));
        hbox.setSpacing(10);
        hbox.setStyle(
                "-fx-background-color:\n"
                + "linear-gradient(#e5eaeb 0%, #bac4c9 100%)\n");
View Full Code Here

        return vbox;
    }
   
    private HBox addCenterHBox() {
        HBox hbox = new HBox();
        hbox.setPadding(new Insets(15, 12, 15, 12));
        hbox.setSpacing(10);
        hbox.setStyle("-fx-background-color: #bac4c9;");
       
        // SETTINGS
        VBox settings = new VBox();     
View Full Code Here

    // acquire a reference to jcgp, for convenience
    final JCGP jcgp = gui.getExperiment();
   
    // make the overarching container
    mainContainer = new VBox(8);
    mainContainer.setPadding(new Insets(5, Constants.RESIZE_MARGIN, 0, 2));
   
    setMinWidth(Constants.SETTINGS_MIN_WIDTH);
    setPrefWidth(Constants.SETTINGS_MIN_WIDTH);
   
    // initialise all sub-divisions
View Full Code Here

    parameters.add(GUIParameter.create(jcgp.getResources().getInputsParameter(), this));
    parameters.add(GUIParameter.create(jcgp.getResources().getOutputsParameter(), this));
    parameters.add(GUIParameter.create(jcgp.getResources().getLevelsBackParameter(), this));
   
    GUIParameter<?> gp = GUIParameter.create(jcgp.getResources().getPopulationSizeParameter(), this);
    gp.setPadding(new Insets(0, 0, 10, 0));
    parameters.add(gp);
   
    parameters.add(GUIParameter.create(jcgp.getResources().getCurrentGenerationParameter(), this));
    parameters.add(GUIParameter.create(jcgp.getResources().getGenerationsParameter(), this));
    parameters.add(GUIParameter.create(jcgp.getResources().getCurrentRunParameter(), this));
   
    gp = GUIParameter.create(jcgp.getResources().getRunsParameter(), this);
    gp.setPadding(new Insets(0, 0, 10, 0));
    parameters.add(gp);
   
    parameters.add(GUIParameter.create(jcgp.getResources().getSeedParameter(), this));
    parameters.add(GUIParameter.create(jcgp.getResources().getReportIntervalParameter(), this));
   
View Full Code Here

    problemCBox.getItems().addAll(jcgp.getProblems());
    problemCBox.getSelectionModel().select(jcgp.getProblem());
    problemCBox.prefWidthProperty().bind(mainContainer.widthProperty());
   
    final VBox problemParameters = new VBox(2);
    problemParameters.setPadding(new Insets(0, 0, 4, 0));
    refreshParameters(jcgp.getProblem().getLocalParameters(), problemParameters);
   
    final HBox testCaseControlContainer = new HBox(2);
   
    final Button showTestCaseButton = makeTestCaseButton();
    final Button loadProblemDataButton = makeLoadTestCaseButton();
    HBox.setHgrow(showTestCaseButton, Priority.ALWAYS);
    showTestCaseButton.setMaxWidth(Double.MAX_VALUE);
    HBox.setHgrow(loadProblemDataButton, Priority.ALWAYS);
    loadProblemDataButton.setMaxWidth(Double.MAX_VALUE);
   
    if (jcgp.getProblem() instanceof TestCaseProblem<?>) {
      testCaseControlContainer.getChildren().addAll(showTestCaseButton, loadProblemDataButton);
      remakeTestCaseTable();
    } else {
      testCaseControlContainer.getChildren().add(loadProblemDataButton);
    }
   
    nodeFunctions = new VBox(2);
    nodeFunctions.setPadding(new Insets(0, 0, 4, 0));
    refreshFunctions();
   
    problemCBox.setOnAction(new EventHandler<ActionEvent>() {
      @Override
      public void handle(ActionEvent event) {
View Full Code Here

    step.setMaxWidth(Double.MAX_VALUE);
    HBox.setHgrow(reset, Priority.ALWAYS);
    reset.setMaxWidth(Double.MAX_VALUE);
   
    flowButtons.getChildren().addAll(runPause, step, reset);
    flowButtons.setPadding(new Insets(0, 0, 10, 0));
   
    loadParameters.setOnAction(new EventHandler<ActionEvent>() {
      @Override
      public void handle(ActionEvent event) {       
        FileChooser fc = new FileChooser();
View Full Code Here

    background.setImage(Assets.getBackground(Assets.IMAGE_SCREENS_GAME_SELECTION_BACKGROUND));

    VBox vbox = new VBox();
    vbox.setAlignment(Pos.CENTER);
    vbox.setSpacing(15);
    vbox.setPadding(new Insets(25, 25, 25, 25));

    Label label = new Label("Enter your name Player " + (position + 1));
    label.setFont(Assets.getFont(Assets.FONT_COURIERNEW_BOLD_16));
    label.setTextFill(Color.LIGHTGRAY);
View Full Code Here

    final VBox outerPane = new VBox();
    outerPane.setAlignment(Pos.CENTER);
    outerPane.setVisible(false);
    outerPane.setOpacity(0.0);
    outerPane.setPadding(new Insets(0, 15, 0, 15));
    outerPane.setSpacing(20);

    final ImageView background = new ImageView();
    background.setCursor(Cursor.HAND);
    background.setOpacity(1.0);
    background.setImage(Assets.getBackground(Assets.IMAGE_SCREENS_GAME_SELECTION_BACKGROUND));
    background.setOnMouseClicked(new EventHandler<MouseEvent>() {
      @Override
      public void handle(MouseEvent me) {
        if (!outerPane.isVisible()) {
          background.setCursor(null);
          outerPane.setVisible(true);
          fadeInSelection.play();
          fadeOutBackground.play();
        }
      }
    });

    fadeInSelection.setCycleCount(1);
    fadeInSelection.setFromValue(1.0);
    fadeInSelection.setToValue(0.3);
    fadeInSelection.setNode(background);
    fadeOutBackground.setCycleCount(1);
    fadeOutBackground.setFromValue(0.0);
    fadeOutBackground.setToValue(1.0);
    fadeOutBackground.setNode(outerPane);

    Label numberOfPlayersLabel = new Label("NUMBER OF PLAYERS");
    numberOfPlayersLabel.setFont(Assets.getFont(Assets.FONT_COURIERNEW_BOLD_16));
    numberOfPlayersLabel.setTextFill(Color.LIGHTGRAY);

    numberOfPlayers = new ToggleGroup();

    RadioButton numberOfPlayers1 = new RadioButton("1");
    numberOfPlayers1.setFont(Assets.getFont(Assets.FONT_COURIERNEW_BOLD_13));
    numberOfPlayers1.setSelected(true);
    numberOfPlayers1.setUserData(1);
    numberOfPlayers1.setToggleGroup(numberOfPlayers);
    numberOfPlayers1.setMinWidth(120);
    numberOfPlayers1.setMaxWidth(120);

    RadioButton numberOfPlayers2 = new RadioButton("2");
    numberOfPlayers2.setFont(Assets.getFont(Assets.FONT_COURIERNEW_BOLD_13));
    numberOfPlayers2.setUserData(2);
    numberOfPlayers2.setToggleGroup(numberOfPlayers);
    numberOfPlayers2.setMinWidth(120);
    numberOfPlayers2.setMaxWidth(120);

    RadioButton numberOfPlayers3 = new RadioButton("3");
    numberOfPlayers3.setFont(Assets.getFont(Assets.FONT_COURIERNEW_BOLD_13));
    numberOfPlayers3.setUserData(3);
    numberOfPlayers3.setToggleGroup(numberOfPlayers);

    HBox numberOfPlayersButtons = new HBox();
    numberOfPlayersButtons.setAlignment(Pos.CENTER);
    numberOfPlayersButtons.getChildren().addAll(numberOfPlayers1,
            numberOfPlayers2, numberOfPlayers3);

    Line horizontalLine1 = new Line();
    horizontalLine1.setEndX(480);
    horizontalLine1.setStroke(Color.GRAY);
    horizontalLine1.setStrokeWidth(2);

    Label worldCreationLabel = new Label("CREATION OF THE WORLD");
    worldCreationLabel.setFont(Assets.getFont(Assets.FONT_COURIERNEW_BOLD_16));
    worldCreationLabel.setTextFill(Color.LIGHTGRAY);

    worldCreation = new ToggleGroup();

    RadioButton worldCreation1 = new RadioButton("1");
    worldCreation1.setFont(Assets.getFont(Assets.FONT_COURIERNEW_BOLD_13));
    worldCreation1.setSelected(true);
    worldCreation1.setUserData(new FlatLandWorldGenerator(0.15));
    worldCreation1.setToggleGroup(worldCreation);
    worldCreation1.setMinWidth(120);
    worldCreation1.setMaxWidth(120);

    RadioButton worldCreation2 = new RadioButton("2");
    worldCreation2.setFont(Assets.getFont(Assets.FONT_COURIERNEW_BOLD_13));
    worldCreation2.setUserData(new FlatLandWorldGenerator(0.3));
    worldCreation2.setToggleGroup(worldCreation);
    worldCreation2.setMinWidth(120);
    worldCreation2.setMaxWidth(120);

    RadioButton worldCreation3 = new RadioButton("3");
    worldCreation3.setFont(Assets.getFont(Assets.FONT_COURIERNEW_BOLD_13));
    worldCreation3.setUserData(new FlatLandWorldGenerator(0.45));
    worldCreation3.setToggleGroup(worldCreation);
    worldCreation3.setMinWidth(120);
    worldCreation3.setMaxWidth(120);

    RadioButton worldCreation4 = new RadioButton("4");
    worldCreation4.setFont(Assets.getFont(Assets.FONT_COURIERNEW_BOLD_13));
    worldCreation4.setUserData(new FlatLandWorldGenerator(0.6));
    worldCreation4.setToggleGroup(worldCreation);
    worldCreation4.setMinWidth(120);
    worldCreation4.setMaxWidth(120);

    RadioButton worldCreation5 = new RadioButton("5");
    worldCreation5.setFont(Assets.getFont(Assets.FONT_COURIERNEW_BOLD_13));
    worldCreation5.setUserData(new FlatLandWorldGenerator(0.75));
    worldCreation5.setToggleGroup(worldCreation);

    HBox worldCreationButtons = new HBox();
    worldCreationButtons.setAlignment(Pos.CENTER);
    worldCreationButtons.getChildren().addAll(worldCreation1, worldCreation2,
            worldCreation3, worldCreation4, worldCreation5);

    Line horizontalLine2 = new Line();
    horizontalLine2.setEndX(480);
    horizontalLine2.setStroke(Color.GRAY);
    horizontalLine2.setStrokeWidth(2);

    Label gameLevelLabel = new Label("GAME LEVEL");
    gameLevelLabel.setFont(Assets.getFont(Assets.FONT_COURIERNEW_BOLD_16));
    gameLevelLabel.setTextFill(Color.LIGHTGRAY);

    gameLevel = new ToggleGroup();

    RadioButton gameLevel1 = new RadioButton("BEGINNER");
    gameLevel1.setFont(Assets.getFont(Assets.FONT_COURIERNEW_BOLD_13));
    gameLevel1.setUserData(Game.Difficulty.BEGINNER);
    gameLevel1.setToggleGroup(gameLevel);
    gameLevel1.setMinWidth(120);
    gameLevel1.setMaxWidth(120);

    RadioButton gameLevel2 = new RadioButton("NORMAL");
    gameLevel2.setFont(Assets.getFont(Assets.FONT_COURIERNEW_BOLD_13));
    gameLevel2.setSelected(true);
    gameLevel2.setUserData(Game.Difficulty.NORMAL);
    gameLevel2.setToggleGroup(gameLevel);
    gameLevel2.setMinWidth(120);
    gameLevel2.setMaxWidth(120);

    RadioButton gameLevel3 = new RadioButton("ADVANCED");
    gameLevel3.setFont(Assets.getFont(Assets.FONT_COURIERNEW_BOLD_13));
    gameLevel3.setUserData(Game.Difficulty.ADVANCED);
    gameLevel3.setToggleGroup(gameLevel);

    HBox gameLevelButtons = new HBox();
    gameLevelButtons.setAlignment(Pos.CENTER);
    gameLevelButtons.getChildren().addAll(gameLevel1, gameLevel2, gameLevel3);

    Button startNewGame = new Button("NEW GAME");
    VBox.setMargin(startNewGame, new Insets(25, 0, 0, 0));
    startNewGame.setFont(Assets.getFont(Assets.FONT_COURIERNEW_BOLD_16));
    startNewGame.setCursor(Cursor.HAND);
    startNewGame.setOnAction(new EventHandler<ActionEvent>() {
      @Override
      public void handle(ActionEvent ae) {
View Full Code Here

TOP

Related Classes of javafx.geometry.Insets

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.