Package javafx.scene.control

Examples of javafx.scene.control.Button


 
  @Test
  public void multiplePanes() {
    final Pane pane = new FlowPane();
    pane.setPrefSize(100, 100);
    final Button btnRunTask = new Button("Run Task");
   
    JuFxUtils.startApplication()
      .title("TaskExecutor")
      .pane(pane)
      .start(new ApplicationInitializer() {
        @Override
        public void init(final Stage primaryStage) {
          btnRunTask.setOnAction(new EventHandler<ActionEvent>() {
            @Override
            public void handle(ActionEvent ev) {
              Pane pane = createExecutorPane(Long.toString(System.currentTimeMillis()));
              Stage dialog = new Stage();
              dialog.initOwner(primaryStage);
View Full Code Here


    final BackgroundLoader backgroundLoader = new BackgroundLoader();
   
    final BorderPane pane = new BorderPane();
    pane.setPrefSize(100, 100);
   
    final Button btnRunTask = new Button("Run Task");
    btnRunTask.setOnAction(new EventHandler<ActionEvent>() {
      @Override
      public void handle(ActionEvent ev) {
        MyTask task = new MyTask("Task " + System.currentTimeMillis(), System.currentTimeMillis() % 2 == 0);
        backgroundLoader.execute(task, new BackgroundLoaderCallbackAdapter() {
          @Override
View Full Code Here

        final Indicator indicator = new Indicator();
        indicator.setResult(Indicator.Result.INDETERMINDED);
        indicator.setPrefSize(300, 100);

        Button passButton = new Button("PASS");
        passButton.setOnAction((ActionEvent t) -> {
            indicator.setPass(Boolean.TRUE);
        });
        Button indetermindedButton = new Button("INDETERMINDED");
        indetermindedButton.setOnAction((ActionEvent t) -> {
            indicator.setResult(Indicator.Result.INDETERMINDED);
        });
        Button failButton = new Button("FAIL");
        failButton.setOnAction((ActionEvent t) -> {
            indicator.setPass(Boolean.FALSE);
        });
       
        HBox box = new HBox(passButton, indetermindedButton, failButton);
       
View Full Code Here

        return createIconButton(icon, "");
    }

    public static Button createIconButton(AwesomeIcon icon, String text) {
        Label label = createIconLabel(icon, DEFAULT_ICON_SIZE);
        Button button = new Button(text);
        button.setGraphic(label);
        return button;
    }
View Full Code Here

        return button;
    }

    public static Button createIconButton(AwesomeIcon icon, String text, String iconSize, String fontSize, ContentDisplay contentDisplay) {
        Label label = createIconLabel(icon, iconSize);
        Button button = new Button(text);
        button.setStyle("-fx-font-size: " + fontSize);
        button.setGraphic(label);
        button.setContentDisplay(contentDisplay);
        return button;
    }
View Full Code Here

        VBox root = new VBox();

        Label githubLabel = AwesomeDude.createIconLabel(AwesomeIcon.GITHUB);
        Label ambulanceLabel = AwesomeDude.createIconLabel(AwesomeIcon.AMBULANCE, "60.0");
        Button starButton = AwesomeDude.createIconButton(AwesomeIcon.STAR, "Nice!", "48.0", "20.0", ContentDisplay.TOP);
        Button cloudButton = AwesomeDude.createIconButton(AwesomeIcon.CLOUD, "Download");
        ToggleButton toggleButton = AwesomeDude.createIconToggleButton(AwesomeIcon.LOCK, "Lock", "60.0", ContentDisplay.TOP);

        root.getChildren().addAll(createMenubar(), githubLabel, ambulanceLabel, starButton, cloudButton, toggleButton);

        Scene scene = new Scene(root, 500, 500);
View Full Code Here

        settingsTitle.setFont(Font.font("Arial", 18));
        settingsGamepad.setFont(Font.font("Arial", 13));
        settingsConnection.setFont(Font.font("Arial", 13));
       
        gamepadSelect = new ComboBox();
        connectButton = new Button("Connect");
       
        connectButton.setOnAction(new EventHandler<ActionEvent>() {
            @Override public void handle(ActionEvent e) {
                if(socketThread != null) {
                    if(socketThread.isAlive()) {
View Full Code Here

    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 {
View Full Code Here

    mainContainer.getChildren().add(problemPane);
   
  }
 
  private Button makeLoadTestCaseButton() {
    Button b = new Button("Load data");
    b.setOnAction(new EventHandler<ActionEvent>() {
      @Override
      public void handle(ActionEvent event) {
        FileChooser fc = new FileChooser();
        fc.setTitle("Open problem file...");
        fc.getExtensionFilters().add(new ExtensionFilter("CGP " + gui.getExperiment().getProblem() + " files", "*" + ((TestCaseProblem<?>) gui.getExperiment().getProblem()).getFileExtension()));
View Full Code Here

    });
    return b;
  }

  private Button makeTestCaseButton() {
    Button b = new Button("Show data");
    b.setOnAction(new EventHandler<ActionEvent>() {
      @Override
      public void handle(ActionEvent event) {
        testCaseTable.show();
      }
    });
View Full Code Here

TOP

Related Classes of javafx.scene.control.Button

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.