Java Code Examples for javafx.scene.control.RadioButton#getText()
The following examples show how to use
javafx.scene.control.RadioButton#getText() .
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: ChromaticityBaseController.java From MyBox with Apache License 2.0 | 6 votes |
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 2
Source File: ImageConverterOptionsController.java From MyBox with Apache License 2.0 | 5 votes |
public void checkBinary() { try { if (isSettingValues || !thisPane.getChildren().contains(binaryBox)) { return; } RadioButton selected = (RadioButton) binaryGroup.getSelectedToggle(); String s = selected.getText(); if (message("Threshold").equals(s)) { attributes.setBinaryConversion(ImageAttributes.BinaryConversion.BINARY_THRESHOLD); thresholdInput.setDisable(false); checkThreshold(); } else if (message("OTSU").equals(s)) { attributes.setBinaryConversion(ImageAttributes.BinaryConversion.BINARY_OTSU); thresholdInput.setStyle(null); thresholdInput.setDisable(true); } else { attributes.setBinaryConversion(ImageAttributes.BinaryConversion.DEFAULT); thresholdInput.setStyle(null); thresholdInput.setDisable(true); } setUserConfigValue("ImageConverterBinary", s); checkDither(); } catch (Exception e) { logger.error(e.toString()); } }
Example 3
Source File: ImageManufactureBatchController.java From MyBox with Apache License 2.0 | 5 votes |
protected void checkFileType() { RadioButton selected = (RadioButton) fileTypeGroup.getSelectedToggle(); if (message("OriginalType").equals(selected.getText())) { targetFileType = null; } else { targetFileType = selected.getText(); } }
Example 4
Source File: PixelsCalculationController.java From MyBox with Apache License 2.0 | 4 votes |
private void adjustValues() { adjustLabel.setText(""); finalX = selectX; finalY = selectY; if (selectX <= 0 || selectY <= 0) { useButton.setDisable(true); targetLabel.setText(""); return; } useButton.setDisable(false); if (!sourceCheck.isSelected() || !radioCheck.isSelected() || sourceX <= 0 || sourceY <= 0) { adjustLabel.setText(""); return; } long ratioX = Math.round(selectX * 1000 / sourceX); long ratioY = Math.round(selectY * 1000 / sourceY); if (ratioX <= 0 || ratioY <= 0 || ratioX == ratioY) { return; } RadioButton selected = (RadioButton) ratioGroup.getSelectedToggle(); String s = selected.getText(); if (message("BaseOnWidth").equals(s)) { finalY = Math.round(sourceY * selectX / sourceX); } else if (message("BaseOnHeight").equals(s)) { finalX = Math.round(sourceX * selectY / sourceY); } else if (message("BaseOnLarger").equals(s)) { if (ratioX > ratioY) { finalY = Math.round(sourceY * selectX / sourceX); } else { finalX = Math.round(sourceX * selectY / sourceY); } } else if (message("BaseOnSamller").equals(s)) { if (ratioX > ratioY) { finalX = Math.round(sourceX * selectY / sourceY); } else { finalY = Math.round(sourceY * selectX / sourceX); } } else { return; } String label = AppVariables.message("AdjustedPixelsNumber") + ": " + finalX + "x" + finalY + " " + AppVariables.message("AspectRatio") + ": " + DoubleTools.scale3(1.0f * finalX / finalY); adjustLabel.setText(label); }
Example 5
Source File: ImageManufactureBatchEffectsController.java From MyBox with Apache License 2.0 | 4 votes |
private void checkEffetcsOperationType() { try { setPane.getChildren().clear(); startButton.disableProperty().unbind(); removeTmpControls(); stringBox = null; radioGroup = null; RadioButton selected = (RadioButton) effectsGroup.getSelectedToggle(); String selectedString = selected.getText(); if (message("EdgeDetection").equals(selectedString)) { effectType = OperationType.EdgeDetect; bindStart(); } else if (message("Emboss").equals(selectedString)) { effectType = OperationType.Emboss; makeEmbossBox(); } else if (message("Posterizing").equals(selectedString)) { effectType = OperationType.Quantization; makePosterizingBox(); } else if (message("Thresholding").equals(selectedString)) { effectType = OperationType.Thresholding; makeThresholdingBox(); } else if (message("Gray").equals(selectedString)) { effectType = OperationType.Gray; bindStart(); } else if (message("BlackOrWhite").equals(selectedString)) { effectType = OperationType.BlackOrWhite; makeBlackWhiteBox(); } else if (message("Sepia").equals(selectedString)) { effectType = OperationType.Sepia; makeSepiaBox(); } } catch (Exception e) { logger.error(e.toString()); } }