List of usage examples for javafx.scene.control RadioButton getText
public final String getText()
From source file:dpfmanager.shell.interfaces.gui.component.dessign.DessignView.java
@FXML protected void deleteButtonClicked(ActionEvent event) throws Exception { RadioButton radio = getSelectedConfig(); if (radio != null) { if (!radio.getText().equals(bundle.getString("default"))) { AlertMessage am = new AlertMessage(AlertMessage.Type.CONFIRMATION, bundle.getString("deleteConfirmation").replace("%1", radio.getText()), bundle.getString("deleteInfo")); am.setTitle(bundle.getString("deleteTitle")); getContext().send(BasicConfig.MODULE_MESSAGE, am); } else {// w ww .j a va 2 s .c o m getContext().send(BasicConfig.MODULE_MESSAGE, new AlertMessage(AlertMessage.Type.ALERT, bundle.getString("alertDefaultConfigDelete"))); } } else { getContext().send(BasicConfig.MODULE_MESSAGE, new AlertMessage(AlertMessage.Type.ALERT, bundle.getString("alertConfigFile"))); } }
From source file:dpfmanager.shell.interfaces.gui.component.dessign.DessignController.java
public void mainCheckFiles() { if (!getView().isAvailable()) { getContext().send(BasicConfig.MODULE_MESSAGE, new AlertMessage(AlertMessage.Type.ERROR, getBundle().getString("alertConformances"), new UiMessage(UiMessage.Type.SHOW), GuiConfig.PERSPECTIVE_INTEROPERABILITY)); return;//from w w w. j a va 2 s. c o m } String input = ""; List<String> treeSelected = getView().getTreeSelectedItems(); if (treeSelected != null) { // Tree view if (treeSelected.isEmpty()) { getContext().send(BasicConfig.MODULE_MESSAGE, new AlertMessage(AlertMessage.Type.ALERT, getBundle().getString("alertFile"))); return; } else { for (String sel : treeSelected) { input += sel + ";"; } input = input.substring(0, input.length() - 1); } } else { // Input text if (getView().getInputText().getText().isEmpty() || getView().getInputText().getText().equals(getBundle().getString("inputText")) || getView().getInputText().getText().equals(getBundle().getString("selectFolder"))) { getContext().send(BasicConfig.MODULE_MESSAGE, new AlertMessage(AlertMessage.Type.ALERT, getBundle().getString("alertFile"))); return; } else { input = getView().getInputText().getText(); } } RadioButton radio = getView().getSelectedConfig(); if (radio == null) { getContext().send(BasicConfig.MODULE_MESSAGE, new AlertMessage(AlertMessage.Type.ALERT, getBundle().getString("alertConfigFile"))); return; } // Send to conformance checker module String path = ""; if (!radio.getText().equals(getBundle().getString("default"))) { path = getFileByPath(radio.getText()).getAbsolutePath(); } int recursive = getView().getRecursive(); ArrayMessage am = new ArrayMessage(); am.add(GuiConfig.COMPONENT_BAR, new WidgetMessage(WidgetMessage.Action.SHOW, WidgetMessage.Target.TASKS)); am.add(BasicConfig.MODULE_CONFORMANCE, new ConformanceMessage(input, path, recursive)); getContext().send(GuiConfig.COMPONENT_BAR, am); }
From source file:dpfmanager.shell.interfaces.gui.component.dessign.DessignView.java
@Override public Node handleMessageOnFX(DpfMessage message) { if (message != null && message.isTypeOf(AlertMessage.class)) { AlertMessage am = message.getTypedMessage(AlertMessage.class); RadioButton radio = getSelectedConfig(); if (radio != null && am.hasResult() && am.getResult()) { getController().performDeleteConfigAction(radio.getText()); }/*from ww w.j ava 2 s . com*/ } else if (message != null && message.isTypeOf(UiMessage.class)) { UiMessage uiMessage = message.getTypedMessage(UiMessage.class); if (uiMessage.isShow()) { if (!first) { readAvailableConformances(); addConfigFiles(); } else { first = false; showLoadingConfig(); } } } else if (message != null && message.isTypeOf(DessignMessage.class)) { if (first) { first = false; } else { readAvailableConformances(); addConfigFiles(); } } return null; }