Package javafx.scene.control

Examples of javafx.scene.control.RadioButton


        grid.setHgap(2);
        grid.setVgap(10);
        grid.setPadding(new Insets(10, 25, 10, 25));
       
        ToggleGroup group = new ToggleGroup();
        goToNumber = new RadioButton("Go To Number:");
        goToNumber.setSelected(true);
        goToNumber.setToggleGroup(group);
        goToTime = new RadioButton("Go To Time:");
        goToTime.setToggleGroup(group);
       
        keyField = new TextField();
        hField = new TextField("00");
        mField = new TextField("00");
View Full Code Here


    VBox box = new VBox();

    toggleGroupValue = new ToggleGroupValue<>();
    int idx = 0;
    for (int i = 0; i < 3; i++) {
      RadioButton lButton = new RadioButton("" + idx);
      lButton.setId("button" + idx);
      toggleGroupValue.add(lButton, "value" + idx);
      toggles.add(lButton);
      box.getChildren().add(lButton);
      idx++;
    }
    for (int i = 0; i < 3; i++) {
      ToggleButton lButton = new ToggleButton("" + idx);
      lButton.setId("button" + idx);
      toggleGroupValue.add(lButton, "value" + idx);
      toggles.add(lButton);
      box.getChildren().add(lButton);
      idx++;
    }
View Full Code Here

            VBox vbox = new VBox();
            vbox.setStyle("-fx-background-color:#757575; -fx-text-fill:#eaeaea");
            vbox.setPadding(new Insets(10));
            vbox.setSpacing(7);
           
            RadioButton rbUseTextArea = new RadioButton("Text Area");
            rbUseTextArea.setToggleGroup(OGroup);

            RadioButton rbUseFileSource = new RadioButton("File (drag and drop)");
            rbUseFileSource.setSelected(true);
            rbUseFileSource.setToggleGroup(OGroup);
            addBlueTitle(vbox, "Transform Settings");
            vbox.getChildren().add(new Separator());
            addTitle(vbox, "Source");
            vbox.getChildren().add(rbUseTextArea);
            vbox.getChildren().add(rbUseFileSource);
            vbox.getChildren().add(new Separator());
           
               rbUseTextArea.setOnMouseClicked(new EventHandler<MouseEvent>() {
                    @Override
                    public void handle(MouseEvent e) {
                        row2.setMinHeight(60);
                        row2.setMaxHeight(250);
                        textVBox.setMaxHeight(USE_COMPUTED_SIZE);
                        //textVBox.setStyle("-fx-background-color:blue;");
                        row2.setPrefHeight(USE_COMPUTED_SIZE);
                        locationField.setEditable(false);
                        locationField.setStyle("-fx-background-color:#757575; -fx-text-fill:#f1f1f1; border-width:1");                       
                        textArea.prefHeightProperty().bind(textVBox.prefHeightProperty());
                        useTextArea = true;
                    }
                });
              
                rbUseFileSource.setOnMouseClicked(new EventHandler<MouseEvent>() {
                    @Override
                    public void handle(MouseEvent e) {
                        textVBox.setMaxHeight(0);
                        row2.setMinHeight(0);
                        row2.setMaxHeight(0);
                        locationField.setEditable(true);
                        locationField.setStyle("-fx-background-color:#454545; -fx-text-fill:#f1f1f1; border-width:1");
                        useTextArea = false;
                    }
                });
           
            addTitle(vbox, "Font");

            RadioButton rb1 = new RadioButton("Monospaced");
            rb1.setUserData("");
            rb1.setToggleGroup(fontGroup);

            RadioButton rb2 = new RadioButton("Source Code Pro");
            rb2.setUserData("scp");
            rb2.setSelected(true);
            rb2.setToggleGroup(fontGroup);

            vbox.getChildren().add(rb1);
            vbox.getChildren().add(rb2);
            vbox.getChildren().add(new Separator());
           
            addTitle(vbox, "Color Theme");
            RadioButton crb1 = new RadioButton("Solarized-Dark");
            crb1.setUserData("dark");
            crb1.setToggleGroup(colorGroup);
            crb1.setSelected(true);

            RadioButton crb2 = new RadioButton("Solarized-Light");
            crb2.setUserData("light");
            crb2.setToggleGroup(colorGroup);
           
            RadioButton crb5 = new RadioButton("GitHub (Light)");
            crb5.setUserData("github");
            crb5.setToggleGroup(colorGroup);
           
            RadioButton crb6 = new RadioButton("GitHub (Blue)");
            crb6.setUserData("github-blue");
            crb6.setToggleGroup(colorGroup);

            RadioButton crb3 = new RadioButton("RoboTicket");
            crb3.setUserData("roboticket-grey");
            crb3.setToggleGroup(colorGroup);
           
            RadioButton crb4 = new RadioButton("Tomorrow-Night");
            crb4.setUserData("tomorrow-night");
            crb4.setToggleGroup(colorGroup);
           
            RadioButton crb7 = new RadioButton("PG-Light");

            crb7.setUserData("pg-light");
            crb7.setToggleGroup(colorGroup);
           

            crb1.setStyle("-fx-background-color:#757575; -fx-text-fill:#eaeaea;");

            vbox.getChildren().add(crb1);
            vbox.getChildren().add(crb2);
            vbox.getChildren().add(crb5);
            vbox.getChildren().add(crb6);
            vbox.getChildren().add(crb7);
            vbox.getChildren().add(crb3);
            vbox.getChildren().add(crb4);
            vbox.getChildren().add(new Separator());
           
//            for (Node n : vbox.getChildren()){
//                n.setStyle("-fx-background-color:#757575; -fx-text-fill:#eaeaea;");
//            }
           
            //
            addTitle(vbox, "Language");
            RadioButton drb1 = new RadioButton("Auto");
            drb1.setUserData("");
            drb1.setToggleGroup(docGroup);
            drb1.setSelected(true);

            RadioButton drb2 = new RadioButton("XSLT");
            drb2.setUserData("xslt");
            drb2.setToggleGroup(docGroup);

            RadioButton drb3 = new RadioButton("XQuery/XPath");
            drb3.setUserData("xquery");
            drb3.setToggleGroup(docGroup);
           
            RadioButton drb4 = new RadioButton("XML Schema");
            drb4.setUserData("xsd");
            drb4.setToggleGroup(docGroup);
           
            RadioButton drb5 = new RadioButton("XProc");
            drb5.setUserData("xproc");
            drb5.setToggleGroup(docGroup);
           
            RadioButton drb6 = new RadioButton("Schematron");
            drb6.setUserData("schematron");
            drb6.setToggleGroup(docGroup);
           
            RadioButton drb7 = new RadioButton("DeltaXML");
            drb7.setUserData("deltaxml");
            drb7.setToggleGroup(docGroup);
           
            vbox.getChildren().add(drb1);
            vbox.getChildren().add(drb2);
            vbox.getChildren().add(drb3);
            vbox.getChildren().add(drb4);
            vbox.getChildren().add(drb5);
            vbox.getChildren().add(drb6);
            vbox.getChildren().add(drb7);
            vbox.getChildren().add(new Separator());

            addTitle(vbox, "XSLT Project");
            RadioButton tocrb1 = new RadioButton("Yes");
            tocrb1.setUserData("yes");
            tocrb1.setToggleGroup(tocGroup);

            RadioButton tocrb2 = new RadioButton("No");
            tocrb2.setUserData("no");
            tocrb2.setToggleGroup(tocGroup);
            tocrb2.setSelected(true);
            vbox.getChildren().add(tocrb1);
            vbox.getChildren().add(tocrb2);
           
            for (Node n : vbox.getChildren()){
                n.setStyle("-fx-background-color:#757575; -fx-text-fill:#eaeaea;");
View Full Code Here

            VBox vbox = new VBox();
            vbox.setStyle("-fx-background-color:#757575; -fx-text-fill:#eaeaea");
            vbox.setPadding(new Insets(10));
            vbox.setSpacing(7);           
           
            RadioButton trb1 = new RadioButton("On");
            trb1.setUserData("yes");
            trb1.setToggleGroup(trimGroup);
            trb1.setSelected(true);

            RadioButton trb2 = new RadioButton("Off");
            trb2.setUserData("no");
            trb2.setToggleGroup(trimGroup);
            addBlueTitle(vbox, "XML/XSLT Formatting");
            vbox.getChildren().add(new Separator());
            addTitle(vbox, "Auto-Trim");
            vbox.getChildren().add(trb1);
            vbox.getChildren().add(trb2);
            vbox.getChildren().add(new Separator());
           
            addTitle(vbox, "Indent (Chars)");
            RadioButton irb1 = new RadioButton("-1 (No alignment)");
            irb1.setUserData("-1");
            irb1.setToggleGroup(indentGroup);

            RadioButton irb2 = new RadioButton("0");
            irb2.setUserData("0");
            irb2.setToggleGroup(indentGroup);

            RadioButton irb3 = new RadioButton("2");
            irb3.setUserData("2");
            irb3.setSelected(true);           
            irb3.setToggleGroup(indentGroup);
           
            RadioButton irb4 = new RadioButton("3");
            irb4.setUserData("3");
            irb4.setToggleGroup(indentGroup);
            vbox.getChildren().add(irb1);
            vbox.getChildren().add(irb2);
            vbox.getChildren().add(irb3);
            vbox.getChildren().add(irb4);
            vbox.getChildren().add(new Separator());
           
            RadioButton nrb1 = new RadioButton("On");
            nrb1.setUserData("yes");
            nrb1.setToggleGroup(NLGroup);

            RadioButton nrb2 = new RadioButton("Off");
            nrb2.setSelected(true);
            nrb2.setUserData("no");
            nrb2.setToggleGroup(NLGroup);
           
            addTitle(vbox, "Force NewLines");
            vbox.getChildren().add(nrb1);
            vbox.getChildren().add(nrb2);
            vbox.getChildren().add(new Separator());
           
            RadioButton mrb1 = new RadioButton("On");
            mrb1.setUserData("yes");
            mrb1.setToggleGroup(MCGroup);
           
            RadioButton mrb2 = new RadioButton("Off");
            mrb2.setSelected(true);
            mrb2.setUserData("no");
            mrb2.setToggleGroup(MCGroup);
           
            addTitle(vbox, "Indent Mixed-Content");
            vbox.getChildren().add(mrb1);
            vbox.getChildren().add(mrb2);
            vbox.getChildren().add(new Separator());
View Full Code Here

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

* Time: 16:53
*/
public class CustomTypeNodeFactory implements NodeFactory<ElementController> {

    public Node createNode(ElementController controller) throws NodeCreationException {
        return new RadioButton("Custom type with class annotation");
    }
View Full Code Here

    GridPane gp = new GridPane();
    gp.setVgap(8);
    gp.setHgap(10);
    gp.addRow(0, new Label("First Name"), new Label(":"), new TextField());
    gp.addRow(1, new Label("Last Name"), new Label(":"), new TextField());
    gp.addRow(2, new Label("Gender"), new Label(":"), new RadioButton("Male"));
    gp.addRow(3, new Label(""), new Label(""), new RadioButton("Female"));
    gp.addRow(4, new Label("Subjects"), new Label(":"), new CheckBox("Maths"), new CheckBox("Social"));
    gp.addRow(5, new Label(""), new Label(""), new CheckBox("Science"), new CheckBox("Biology"));

    HBox formButtonBox = new HBox();
    formButtonBox.setSpacing(10);
View Full Code Here

        Tab tabE = new Tab();
        tabE.setText("RadioButtons");
        VBox radioButtonBox = new VBox();
        radioButtonBox.setSpacing(10);
        radioButtonBox.setPadding(new Insets(10));
        RadioButton raBu1 = new RadioButton("Normal");
        radioButtonBox.getChildren().add(raBu1);
        RadioButton raBu2 = new RadioButton("Normal");
        raBu2.setDisable(true);
        radioButtonBox.getChildren().add(raBu2);
        RadioButton raBu3 = new RadioButton("Selected");
        raBu3.setSelected(true);
        radioButtonBox.getChildren().add(raBu3);
        RadioButton raBu4 = new RadioButton("Selected");
        raBu4.setDisable(true);
        raBu4.setSelected(true);
        radioButtonBox.getChildren().add(raBu4);
        tabE.setContent(radioButtonBox);
        buttonTabPane.getTabs().add(tabE);

        Tab tabF = new Tab();
View Full Code Here

        box1.setSelected(true);
        grid.add(box1, 0, 0, 3, 1);

        Label labelTime = new Label("Zeitoptionen:");
        ToggleGroup group = new ToggleGroup();
        RadioButton radioButtonDigital = new RadioButton("Digital");
        radioButtonDigital.setToggleGroup(group);
        radioButtonDigital.setSelected(true);
        RadioButton radioButtonAnalog = new RadioButton("Analog");
        radioButtonAnalog.setToggleGroup(group);
        grid.addRow(2, labelTime, radioButtonDigital, radioButtonAnalog);
        GridPane.setHalignment(labelTime, HPos.RIGHT);
        GridPane.setMargin(radioButtonAnalog, new Insets(0, 0, 0, 20));

        CheckBox box2 = new CheckBox("Uhrzeit mit Sekunden anzeigen");
View Full Code Here

        grid.add(tb5, 2, 2);
        CheckBox cb5 = new CheckBox("CheckBox");
        cb5.setIndeterminate(true);
        AquaFx.createCheckBoxStyler().setSizeVariant(ControlSizeVariant.REGULAR).style(cb5);
        grid.add(cb5, 3, 2);
        RadioButton rb5 = new RadioButton("RadioButton");
        AquaFx.createRadioButtonStyler().setSizeVariant(ControlSizeVariant.REGULAR).style(rb5);
        grid.add(rb5, 4, 2);
        TextField tf5 = new TextField("TextField");
        AquaFx.createTextFieldStyler().setSizeVariant(ControlSizeVariant.REGULAR).style(tf5);
        grid.add(tf5, 5, 2);
        ComboBox<String> ecombo5 = new ComboBox<String>();
        ecombo5.setItems(items);
        ecombo5.setEditable(true);
        ecombo5.setPromptText("select");
        AquaFx.createComboBoxStyler().setSizeVariant(ControlSizeVariant.REGULAR).style(ecombo5);
        grid.add(ecombo5, 6, 2);
        ComboBox<String> combo5 = new ComboBox<String>();
        combo5.setItems(items);
        combo5.setPromptText("select");
        AquaFx.createComboBoxStyler().setSizeVariant(ControlSizeVariant.REGULAR).style(combo5);
        grid.add(combo5, 7, 2);
        ChoiceBox<String> choice5 = new ChoiceBox<String>();
        choice5.setItems(items);
        choice5.getSelectionModel().selectFirst();
        AquaFx.createChoiceBoxStyler().setSizeVariant(ControlSizeVariant.REGULAR).style(choice5);
        grid.add(choice5, 8, 2);

        Label labelb6 = new Label("small:");
        AquaFx.createLabelStyler().setSizeVariant(ControlSizeVariant.SMALL).style(labelb6);
        grid.add(labelb6, 0, 3);
        Button b6 = new Button("Button");
        AquaFx.createButtonStyler().setSizeVariant(ControlSizeVariant.SMALL).style(b6);
        grid.add(b6, 1, 3);
        ToggleButton tb6 = new ToggleButton("ToggleButton");
        AquaFx.createToggleButtonStyler().setSizeVariant(ControlSizeVariant.SMALL).style(tb6);
        grid.add(tb6, 2, 3);
        CheckBox cb6 = new CheckBox("CheckBox");
        cb6.setSelected(true);
        // cb6.setDisable(true);
        AquaFx.createCheckBoxStyler().setSizeVariant(ControlSizeVariant.SMALL).style(cb6);
        grid.add(cb6, 3, 3);
        RadioButton rb6 = new RadioButton("RadioButton");
        AquaFx.createRadioButtonStyler().setSizeVariant(ControlSizeVariant.SMALL).style(rb6);
        grid.add(rb6, 4, 3);
        TextField tf6 = new TextField("TextField");
        AquaFx.createTextFieldStyler().setSizeVariant(ControlSizeVariant.SMALL).style(tf6);
        grid.add(tf6, 5, 3);
        ComboBox<String> ecombo6 = new ComboBox<String>();
        ecombo6.setItems(items);
        ecombo6.setEditable(true);
        ecombo6.setPromptText("select");
        AquaFx.createComboBoxStyler().setSizeVariant(ControlSizeVariant.SMALL).style(ecombo6);
        grid.add(ecombo6, 6, 3);
        ComboBox<String> combo6 = new ComboBox<String>();
        combo6.setItems(items);
        combo6.setPromptText("select");
        AquaFx.createComboBoxStyler().setSizeVariant(ControlSizeVariant.SMALL).style(combo6);
        grid.add(combo6, 7, 3);
        ChoiceBox<String> choice6 = new ChoiceBox<String>();
        choice6.setItems(items);
        choice6.getSelectionModel().selectFirst();
        AquaFx.createChoiceBoxStyler().setSizeVariant(ControlSizeVariant.SMALL).style(choice6);
        grid.add(choice6, 8, 3);

        Label labelb7 = new Label("mini:");
        AquaFx.createLabelStyler().setSizeVariant(ControlSizeVariant.MINI).style(labelb7);
        grid.add(labelb7, 0, 4);
        Button b7 = new Button("Button");
        AquaFx.createButtonStyler().setSizeVariant(ControlSizeVariant.MINI).style(b7);
        grid.add(b7, 1, 4);
        ToggleButton tb7 = new ToggleButton("ToggleButton");
        AquaFx.createToggleButtonStyler().setSizeVariant(ControlSizeVariant.MINI).style(tb7);
        grid.add(tb7, 2, 4);
        CheckBox cb7 = new CheckBox("CheckBox");
        cb7.setIndeterminate(true);
        // cb7.setDisable(true);
        AquaFx.createCheckBoxStyler().setSizeVariant(ControlSizeVariant.MINI).style(cb7);
        grid.add(cb7, 3, 4);
        RadioButton rb7 = new RadioButton("RadioButton");
        AquaFx.createRadioButtonStyler().setSizeVariant(ControlSizeVariant.MINI).style(rb7);
        grid.add(rb7, 4, 4);
        TextField tf7 = new TextField("TextField");
        AquaFx.createTextFieldStyler().setSizeVariant(ControlSizeVariant.MINI).style(tf7);
        grid.add(tf7, 5, 4);
View Full Code Here

TOP

Related Classes of javafx.scene.control.RadioButton

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.