javafx.scene.control.RadioButton Java Examples

The following examples show how to use javafx.scene.control.RadioButton. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: NodePropertiesSample.java    From marathonv5 with Apache License 2.0 6 votes vote down vote up
private RadioButton createRadioButton(final Node rect, String name, final boolean toFront, ToggleGroup tg) {
    final RadioButton radioButton = new RadioButton(name);
    radioButton.setToggleGroup(tg);
    radioButton.selectedProperty().addListener(new InvalidationListener() {
        public void invalidated(Observable ov) {
            if (radioButton.isSelected()) {
                if (toFront) {
                    rect.toFront();
                } else {
                    rect.toBack();
                }
            }
        }
    });

    return radioButton;
}
 
Example #2
Source File: ConvolutionKernelManagerController.java    From MyBox with Apache License 2.0 6 votes vote down vote up
private void checkEdges() {
    try {
        if (isSettingValues) {
            return;
        }
        edge_Op = ConvolutionKernel.Edge_Op.COPY;
        RadioButton selected = (RadioButton) edgesGroup.getSelectedToggle();
        if (selected == null) {
            return;
        }
        if (!message("KeepValues").equals(selected.getText())) {
            edge_Op = ConvolutionKernel.Edge_Op.FILL_ZERO;
        }
    } catch (Exception e) {
        logger.error(e.toString());
    }
}
 
Example #3
Source File: ConvolutionKernelManagerController.java    From MyBox with Apache License 2.0 6 votes vote down vote up
private void checkType() {
    try {
        type = ConvolutionKernel.Convolution_Type.NONE;
        grayCheck.setDisable(true);
        RadioButton selected = (RadioButton) typeGroup.getSelectedToggle();
        if (selected == null) {
            return;
        }
        if (message("Blur").equals(selected.getText())) {
            type = ConvolutionKernel.Convolution_Type.BLUR;

        } else if (message("Sharpen").equals(selected.getText())) {
            type = ConvolutionKernel.Convolution_Type.SHARPNEN;

        } else if (message("Emboss").equals(selected.getText())) {
            type = ConvolutionKernel.Convolution_Type.EMBOSS;
            grayCheck.setDisable(false);

        } else if (message("EdgeDetection").equals(selected.getText())) {
            type = ConvolutionKernel.Convolution_Type.EDGE_DETECTION;

        }
    } catch (Exception e) {
        logger.error(e.toString());
    }
}
 
Example #4
Source File: RadioButtons.java    From marathonv5 with Apache License 2.0 6 votes vote down vote up
public RadioButtons() {
    super(400,100);
    ToggleGroup tg = new ToggleGroup();
    VBox vbox = new VBox();
    vbox.setSpacing(5);
    RadioButton rb1 = new RadioButton("Hello");
    rb1.setToggleGroup(tg);

    RadioButton rb2 = new RadioButton("Bye");
    rb2.setToggleGroup(tg);
    rb2.setSelected(true);

    RadioButton rb3 = new RadioButton("Disabled");
    rb3.setToggleGroup(tg);
    rb3.setSelected(false);
    rb3.setDisable(true);

    vbox.getChildren().add(rb1);
    vbox.getChildren().add(rb2);
    vbox.getChildren().add(rb3);
    getChildren().add(vbox);
}
 
Example #5
Source File: SimpleRadioButtonControl.java    From PreferencesFX with Apache License 2.0 6 votes vote down vote up
/**
 * This method creates radio buttons and adds them to radioButtons
 * and is used when the itemsProperty on the field changes.
 */
private void createRadioButtons() {
  node.getChildren().clear();
  radioButtons.clear();

  for (int i = 0; i < field.getItems().size(); i++) {
    RadioButton rb = new RadioButton();

    rb.setText(field.getItems().get(i).toString());
    rb.setToggleGroup(toggleGroup);

    radioButtons.add(rb);
  }

  if (field.getSelection() != null) {
    radioButtons.get(field.getItems().indexOf(field.getSelection())).setSelected(true);
  }

  node.getChildren().addAll(radioButtons);
}
 
Example #6
Source File: VertexTypeNodeProvider.java    From constellation with Apache License 2.0 6 votes vote down vote up
private VBox addFilter() {
    filterText.setPromptText("Filter Node types");
    final ToggleGroup toggleGroup = new ToggleGroup();
    startsWithRb.setToggleGroup(toggleGroup);
    startsWithRb.setPadding(new Insets(0, 0, 0, 5));
    startsWithRb.setSelected(true);
    final RadioButton containsRadioButton = new RadioButton("Contains");
    containsRadioButton.setToggleGroup(toggleGroup);
    containsRadioButton.setPadding(new Insets(0, 0, 0, 5));

    toggleGroup.selectedToggleProperty().addListener((observable, oldValue, newValue) -> {
        populateTree();
    });

    filterText.textProperty().addListener((observable, oldValue, newValue) -> {
        populateTree();
    });

    final HBox headerBox = new HBox(new Label("Filter: "), filterText, startsWithRb, containsRadioButton);
    headerBox.setAlignment(Pos.CENTER_LEFT);
    headerBox.setPadding(new Insets(5));

    final VBox box = new VBox(schemaLabel, headerBox, treeView);
    VBox.setVgrow(treeView, Priority.ALWAYS);
    return box;
}
 
Example #7
Source File: FilesArrangeController.java    From MyBox with Apache License 2.0 6 votes vote down vote up
private void checkReplaceType() {
    RadioButton selected = (RadioButton) replaceGroup.getSelectedToggle();
    if (message("ReplaceModified").equals(selected.getText())) {
        replaceType = ReplaceType.ReplaceModified;
        AppVariables.setUserConfigValue(FileArrangeExistedKey, "ReplaceModified");
    } else if (message("NotCopy").equals(selected.getText())) {
        replaceType = ReplaceType.NotCopy;
        AppVariables.setUserConfigValue(FileArrangeExistedKey, "NotCopy");
    } else if (message("Replace").equals(selected.getText())) {
        replaceType = ReplaceType.Replace;
        AppVariables.setUserConfigValue(FileArrangeExistedKey, "Replace");
    } else if (message("Rename").equals(selected.getText())) {
        replaceType = ReplaceType.Rename;
        AppVariables.setUserConfigValue(FileArrangeExistedKey, "Rename");
    } else {
        replaceType = ReplaceType.ReplaceModified;
        AppVariables.setUserConfigValue(FileArrangeExistedKey, "ReplaceModified");
    }

}
 
Example #8
Source File: WeiboSnapController.java    From MyBox with Apache License 2.0 6 votes vote down vote up
private void checkFormat() {
    jpegBox.setDisable(true);
    jpegBox.setStyle(null);
    thresholdInput.setDisable(true);
    ditherCheck.setDisable(true);

    RadioButton selected = (RadioButton) formatGroup.getSelectedToggle();
    if (AppVariables.message("PNG").equals(selected.getText())) {
        format = PdfImageFormat.Original;
    } else if (AppVariables.message("CCITT4").equals(selected.getText())) {
        format = PdfImageFormat.Tiff;
        thresholdInput.setDisable(false);
        ditherCheck.setDisable(false);
    } else if (AppVariables.message("JpegQuailty").equals(selected.getText())) {
        format = PdfImageFormat.Jpeg;
        jpegBox.setDisable(false);
        checkJpegQuality();
    }
}
 
Example #9
Source File: WeiboSnapController.java    From MyBox with Apache License 2.0 6 votes vote down vote up
private void checkPageSize() {
        standardSizeBox.setDisable(true);
        standardDpiBox.setDisable(true);
        customWidthInput.setDisable(true);
        customHeightInput.setDisable(true);
        customWidthInput.setStyle(null);
        customHeightInput.setStyle(null);
        isImageSize = false;

        RadioButton selected = (RadioButton) sizeGroup.getSelectedToggle();
        if (AppVariables.message("ImagesSize").equals(selected.getText())) {
            isImageSize = true;
        } else if (AppVariables.message("StandardSize").equals(selected.getText())) {
            standardSizeBox.setDisable(false);
            standardDpiBox.setDisable(false);
            checkStandardValues();

        } else if (AppVariables.message("Custom").equals(selected.getText())) {
            customWidthInput.setDisable(false);
            customHeightInput.setDisable(false);
            checkCustomValues();
        }

//        AppVariables.setUserConfigValue(ImageCombineSizeKey, selected.getText());
    }
 
Example #10
Source File: FilesArchiveCompressController.java    From MyBox with Apache License 2.0 6 votes vote down vote up
protected void checkSevenCompress() {
    String selected = ((RadioButton) sevenCompressGroup.getSelectedToggle()).getText();
    switch (selected) {
        case "LZMA2":
            sevenCompress = SevenZMethod.LZMA2;
            break;
        case "COPY":
            sevenCompress = SevenZMethod.COPY;
            break;
        case "DEFLATE":
            sevenCompress = SevenZMethod.DEFLATE;
            break;
        case "BZIP2":
            sevenCompress = SevenZMethod.BZIP2;
            break;
    }
}
 
Example #11
Source File: NodePropertiesSample.java    From marathonv5 with Apache License 2.0 6 votes vote down vote up
private RadioButton createRadioButton(final Node rect, String name, final boolean toFront, ToggleGroup tg) {
    final RadioButton radioButton = new RadioButton(name);
    radioButton.setToggleGroup(tg);
    radioButton.selectedProperty().addListener(new InvalidationListener() {
        public void invalidated(Observable ov) {
            if (radioButton.isSelected()) {
                if (toFront) {
                    rect.toFront();
                } else {
                    rect.toBack();
                }
            }
        }
    });

    return radioButton;
}
 
Example #12
Source File: ImagesCombinePdfController.java    From MyBox with Apache License 2.0 6 votes vote down vote up
private void checkPageSize() {
        standardSizeBox.setDisable(true);
        standardDpiBox.setDisable(true);
        customWidthInput.setDisable(true);
        customHeightInput.setDisable(true);
        customWidthInput.setStyle(null);
        customHeightInput.setStyle(null);
        isImageSize = false;

        RadioButton selected = (RadioButton) sizeGroup.getSelectedToggle();
        if (AppVariables.message("ImagesSize").equals(selected.getText())) {
            isImageSize = true;
        } else if (AppVariables.message("StandardSize").equals(selected.getText())) {
            standardSizeBox.setDisable(false);
            standardDpiBox.setDisable(false);
            checkStandardValues();

        } else if (AppVariables.message("Custom").equals(selected.getText())) {
            customWidthInput.setDisable(false);
            customHeightInput.setDisable(false);
            checkCustomValues();
        }

//        AppVariables.setUserConfigValue(ImageCombineSizeKey, selected.getText());
    }
 
Example #13
Source File: BaseController.java    From MyBox with Apache License 2.0 6 votes vote down vote up
public void checkTargetExistType() {
    if (isSettingValues) {
        return;
    }
    if (targetAppendInput != null) {
        targetAppendInput.setStyle(null);
    }
    RadioButton selected = (RadioButton) targetExistGroup.getSelectedToggle();
    if (selected.equals(targetReplaceRadio)) {
        targetExistType = TargetExistType.Replace;

    } else if (selected.equals(targetRenameRadio)) {
        targetExistType = TargetExistType.Rename;
        if (targetAppendInput != null) {
            if (targetAppendInput.getText() == null || targetAppendInput.getText().trim().isEmpty()) {
                targetAppendInput.setStyle(badStyle);
            } else {
                setUserConfigValue("TargetExistAppend", targetAppendInput.getText().trim());
            }
        }

    } else if (selected.equals(targetSkipRadio)) {
        targetExistType = TargetExistType.Skip;
    }
    setUserConfigValue("TargetExistType", selected.getText());
}
 
Example #14
Source File: PreferenceOutputPane.java    From pdfsam with GNU Affero General Public License v3.0 6 votes vote down vote up
@Inject
public PreferenceOutputPane(@Named("smartRadio") PreferenceRadioButton smartRadio,
        @Named("compressionEnabled") PreferenceCheckBox compressionEnabled) {
    I18nContext i18n = DefaultI18nContext.getInstance();
    ToggleGroup group = new ToggleGroup();

    RadioButton manualRadio = new RadioButton(i18n.i18n("Manually selected"));
    manualRadio.setToggleGroup(group);
    manualRadio.getStyleClass().addAll(Style.VITEM.css());
    manualRadio.setId("manualRadio");

    smartRadio.getStyleClass().addAll(Style.VITEM.css());
    smartRadio.setToggleGroup(group);
    smartRadio.setGraphic(helpIcon(DefaultI18nContext.getInstance()
            .i18n("Automatically set the destination directory to the selected PDF document directory")));
    smartRadio.getStyleClass().addAll(Style.WITH_HELP.css());

    if (isNull(group.getSelectedToggle())) {
        group.selectToggle(manualRadio);
    }

    getChildren().addAll(manualRadio, smartRadio, compressionEnabled);
    getStyleClass().addAll(Style.CONTAINER.css());
}
 
Example #15
Source File: TransfersTab.java    From dm3270 with Apache License 2.0 6 votes vote down vote up
@Override
protected void setText ()
{
  RadioButton selectedFileButton = (RadioButton) grpFileName.getSelectedToggle ();
  if (selectedFileButton == null)
  {
    eraseCommand ();
    return;
  }

  RadioButton selectedSpaceUnitsButton =
      (RadioButton) grpSpaceUnits.getSelectedToggle ();
  RadioButton selectedDispositionButton =
      (RadioButton) grpDisposition.getSelectedToggle ();

  tsoCommand.txtCommand
      .setText (((TextField) selectedFileButton.getUserData ()).getText ());
  setButton ();
}
 
Example #16
Source File: ChromaticityDiagramController.java    From MyBox with Apache License 2.0 6 votes vote down vote up
private void loadTableData() {
    try {
        tableBox.getChildren().clear();
        RadioButton selected = (RadioButton) dataGroup.getSelectedToggle();
        if (message("Calculate").equals(selected.getText())) {

            tableBox.getChildren().addAll(dataToolbar, calculateBox);

        } else if (message("Input").equals(selected.getText())) {

            tableBox.getChildren().addAll(dataToolbar, inputBox);

        }

        FxmlControl.refreshStyle(tableBox);
    } catch (Exception e) {
        logger.error(e.toString());
    }
}
 
Example #17
Source File: ChromaticityBaseController.java    From MyBox with Apache License 2.0 6 votes vote down vote up
public void checkAlgorithm() {
    try {
        RadioButton selected = (RadioButton) algorithmGroup.getSelectedToggle();
        switch (selected.getText()) {
            case "Bradford":
                algorithm = ChromaticAdaptation.ChromaticAdaptationAlgorithm.Bradford;
                break;
            case "XYZ Scaling":
                algorithm = ChromaticAdaptation.ChromaticAdaptationAlgorithm.XYZScaling;
                break;
            case "Von Kries":
                algorithm = ChromaticAdaptation.ChromaticAdaptationAlgorithm.VonKries;
                break;
            default:
                algorithm = ChromaticAdaptation.ChromaticAdaptationAlgorithm.Bradford;
        }
    } catch (Exception e) {
        algorithm = ChromaticAdaptation.ChromaticAdaptationAlgorithm.Bradford;
    }
}
 
Example #18
Source File: ImagesBlendController.java    From MyBox with Apache License 2.0 6 votes vote down vote up
private void checkLocation() {
    if (foreImage == null || backImage == null) {
        return;
    }
    isSettingValues = true;
    RadioButton selected = (RadioButton) locationGroup.getSelectedToggle();
    if (AppVariables.message("FinB").equals(selected.getText())) {
        location = ImagesRelativeLocation.Foreground_In_Background;
        pointLabel.setText(AppVariables.message("ClickOnBackgournd"));
        bottomLabel.setText(AppVariables.message("BlendedSize") + ": "
                + (int) backImage.getWidth() + "*" + (int) backImage.getHeight());

    } else if (AppVariables.message("BinF").equals(selected.getText())) {
        location = ImagesRelativeLocation.Background_In_Foreground;
        pointLabel.setText(AppVariables.message("ClickOnForegournd"));
        bottomLabel.setText(AppVariables.message("BlendedSize") + ": "
                + (int) foreImage.getWidth() + "*" + (int) foreImage.getHeight());

    } else {
        return;
    }
    pointX.setText("0");
    pointY.setText("0");
    isSettingValues = false;
    checkPoint();
}
 
Example #19
Source File: RFXToggleButtonTest.java    From marathonv5 with Apache License 2.0 6 votes vote down vote up
@Test
public void getText() {
    RadioButton radioButton = (RadioButton) getPrimaryStage().getScene().getRoot().lookup(".radio-button");
    LoggingRecorder lr = new LoggingRecorder();
    List<String> text = new ArrayList<>();
    Platform.runLater(new Runnable() {
        @Override
        public void run() {
            RFXToggleButton rfxToggleButton = new RFXToggleButton(radioButton, null, null, lr);
            radioButton.setSelected(false);
            rfxToggleButton.mouseEntered(null);
            radioButton.setSelected(true);
            rfxToggleButton.mouseClicked(null);
            text.add(rfxToggleButton._getText());
        }
    });
    new Wait("Waiting for toggle button text") {
        @Override
        public boolean until() {
            return text.size() > 0;
        }
    };
    AssertJUnit.assertEquals("Hello", text.get(0));
}
 
Example #20
Source File: RadioButtonDrivenTextFieldsPane.java    From pdfsam with GNU Affero General Public License v3.0 6 votes vote down vote up
public void addRow(RadioButton radio, Region field, Text helpIcon) {
    requireNotNullArg(radio, "Cannot add a null radio");
    requireNotNullArg(field, "Cannot add a null field");
    GridPane.setValignment(radio, VPos.BOTTOM);
    GridPane.setValignment(field, VPos.BOTTOM);
    GridPane.setHalignment(radio, HPos.LEFT);
    GridPane.setHalignment(field, HPos.LEFT);
    GridPane.setFillWidth(field, true);
    field.setPrefWidth(300);
    field.setDisable(true);
    radio.selectedProperty().addListener((o, oldVal, newVal) -> {
        field.setDisable(!newVal);
        if (newVal) {
            field.requestFocus();
        }
    });
    radio.setToggleGroup(group);
    add(radio, 0, rows);
    add(field, 1, rows);
    if (nonNull(helpIcon)) {
        add(helpIcon, 2, rows);
    }
    rows++;

}
 
Example #21
Source File: FileCutController.java    From MyBox with Apache License 2.0 6 votes vote down vote up
private void checkSplitType() {
    filesNumberInput.setDisable(true);
    bytesNumberInput.setDisable(true);
    listInput.setDisable(true);
    filesNumberInput.setStyle(null);
    bytesNumberInput.setStyle(null);
    listInput.setStyle(null);

    RadioButton selected = (RadioButton) splitGroup.getSelectedToggle();
    if (AppVariables.message("SplitByFilesNumber").equals(selected.getText())) {
        splitType = FileSplitType.FilesNumber;
        filesNumberInput.setDisable(false);
        checkFilesNumber();

    } else if (AppVariables.message("SplitByBytesNumber").equals(selected.getText())) {
        splitType = FileSplitType.BytesNumber;
        bytesNumberInput.setDisable(false);
        checkBytesNumber();

    } else if (AppVariables.message("CutByStartEndByteList").equals(selected.getText())) {
        splitType = FileSplitType.StartEndList;
        listInput.setDisable(false);
        checkStartEndList();
    }
}
 
Example #22
Source File: RecordImagesInSystemClipboardController.java    From MyBox with Apache License 2.0 6 votes vote down vote up
private void checkFormat() {
    jpegBox.setDisable(true);
    jpegBox.setStyle(null);
    thresholdInput.setDisable(true);

    RadioButton selected = (RadioButton) imageTypeGroup.getSelectedToggle();
    if (AppVariables.message("PNG").equals(selected.getText())) {
        imageType = ImageType.PNG;
    } else if (AppVariables.message("CCITT4").equals(selected.getText())) {
        imageType = ImageType.TIFF;
        thresholdInput.setDisable(false);
    } else if (AppVariables.message("JpegQuailty").equals(selected.getText())) {
        imageType = ImageType.JPG;
        jpegBox.setDisable(false);
        checkJpegQuality();
    }
}
 
Example #23
Source File: RGBColorSpaceController.java    From MyBox with Apache License 2.0 6 votes vote down vote up
public void checkWhite() {
    if (isSettingValues) {
        return;
    }
    try {
        RadioButton selected = (RadioButton) wGroup.getSelectedToggle();
        if (message("StandardIlluminant").equals(selected.getText())) {
            whiteHBox.setDisable(true);
            checkIlluminant();
        } else if (message("InputWhitePoint").equals(selected.getText())) {
            currentWhiteName = null;
            whiteHBox.setDisable(false);
            checkWhiteInputs();
        }
    } catch (Exception e) {
        checkWhiteInputs();
    }
}
 
Example #24
Source File: RGBColorSpaceController.java    From MyBox with Apache License 2.0 6 votes vote down vote up
public void checkPrimaries() {
    try {
        RadioButton selected = (RadioButton) pGroup.getSelectedToggle();
        if (message("ColorSpace").equals(selected.getText())) {
            primariesBox.setDisable(true);
            whiteVBox.setDisable(true);
            checkColorSpace();
        } else if (message("InputPrimaries").equals(selected.getText())) {
            colorSpaceName = null;
            primariesBox.setDisable(false);
            whiteVBox.setDisable(false);
            checkRGBInputs();
            checkWhite();
        }
    } catch (Exception e) {
        checkRGBInputs();
    }
}
 
Example #25
Source File: FilesCompareController.java    From MyBox with Apache License 2.0 6 votes vote down vote up
private void checkAlgorithm() {
    try {
        clear();
        String selected = ((RadioButton) algorithmGroup.getSelectedToggle()).getText();
        switch (selected) {
            case "SHA1":
                algorithm = "SHA-1";
                break;
            case "SHA256":
                algorithm = "SHA-256";
                break;
            default:
                algorithm = "MD5";
                break;
        }

    } catch (Exception e) {
        logger.error(e.toString());
    }
}
 
Example #26
Source File: MessageDigestController.java    From MyBox with Apache License 2.0 6 votes vote down vote up
private void checkInputType() {
    try {
        clear();
        String selected = ((RadioButton) inputGroup.getSelectedToggle()).getText();
        handleBox.getChildren().clear();
        if (message("File").equals(selected)) {
            handleBox.getChildren().addAll(fileBox, outputBox);
            inputType = InputType.File;

        } else {
            handleBox.getChildren().addAll(inputArea, outputBox);
            inputType = InputType.Input;
            sourceFileInput.setStyle(null);
        }

        FxmlControl.refreshStyle(thisPane);

    } catch (Exception e) {
        logger.error(e.toString());
    }
}
 
Example #27
Source File: PdfCompressImagesBatchController.java    From MyBox with Apache License 2.0 5 votes vote down vote up
protected void checkFormat() {
    jpegBox.setDisable(true);
    jpegBox.setStyle(null);
    thresholdInput.setDisable(true);

    RadioButton selected = (RadioButton) formatGroup.getSelectedToggle();
    if (AppVariables.message("CCITT4").equals(selected.getText())) {
        format = PdfImageFormat.Tiff;
        thresholdInput.setDisable(false);
    } else if (AppVariables.message("JpegQuailty").equals(selected.getText())) {
        format = PdfImageFormat.Jpeg;
        jpegBox.setDisable(false);
        checkJpegQuality();
    }
}
 
Example #28
Source File: PdfViewController.java    From MyBox with Apache License 2.0 5 votes vote down vote up
@Override
public String saveAsPrefix() {
    String name = "";
    if (sourceFile != null) {
        name = FileTools.getFilePrefix(sourceFile.getName()) + "_p" + (currentPage + 1);
    }
    if (fileTypeGroup != null) {
        name += "." + ((RadioButton) fileTypeGroup.getSelectedToggle()).getText();
    }
    return name;

}
 
Example #29
Source File: FormBuilder.java    From bisq with GNU Affero General Public License v3.0 5 votes vote down vote up
public static Tuple4<Label, TextField, RadioButton, RadioButton> addTopLabelTextFieldRadioButtonRadioButton(GridPane gridPane,
                                                                                                            int rowIndex,
                                                                                                            ToggleGroup toggleGroup,
                                                                                                            String title,
                                                                                                            String textFieldTitle,
                                                                                                            String radioButtonTitle1,
                                                                                                            String radioButtonTitle2,
                                                                                                            double top) {
    TextField textField = new BisqTextField();
    textField.setPromptText(textFieldTitle);

    RadioButton radioButton1 = new AutoTooltipRadioButton(radioButtonTitle1);
    radioButton1.setToggleGroup(toggleGroup);
    radioButton1.setPadding(new Insets(6, 0, 0, 0));

    RadioButton radioButton2 = new AutoTooltipRadioButton(radioButtonTitle2);
    radioButton2.setToggleGroup(toggleGroup);
    radioButton2.setPadding(new Insets(6, 0, 0, 0));

    HBox hBox = new HBox();
    hBox.setSpacing(10);
    hBox.getChildren().addAll(textField, radioButton1, radioButton2);

    final Tuple2<Label, VBox> labelVBoxTuple2 = addTopLabelWithVBox(gridPane, rowIndex, title, hBox, top);

    return new Tuple4<>(labelVBoxTuple2.first, textField, radioButton1, radioButton2);
}
 
Example #30
Source File: FileDecompressUnarchiveController.java    From MyBox with Apache License 2.0 5 votes vote down vote up
protected void checkArchiver() {
    archiverChoice = ((RadioButton) archiverGroup.getSelectedToggle()).getText();
    sevenZCompressPane.setVisible(archiverChoice.equalsIgnoreCase(ArchiveStreamFactory.SEVEN_Z));
    if (archiverChoice.equals(message("DetectAutomatically"))) {
        archiverChoice = "auto";
    } else if (archiverChoice.equals(message("None"))) {
        archiverChoice = "none";
    }
    readFile();
}