/** * Closes dialog box when the OK button is pressed and calls the algorithm. * * @param event Event that triggers function. */ public void actionPerformed(ActionEvent event) { String command = event.getActionCommand(); Object source = event.getSource(); if (command.equals("OK")) { if (setVariables()) { callAlgorithm(); } } else if (command.equals("Script")) { callAlgorithm(); } else if (command.equals("Cancel")) { dispose(); } else if (source == blueSmoothBox) { if (blueSmoothBox.isSelected()) { interpolationLabel.setEnabled(true); interpolationText.setEnabled(true); } else { interpolationLabel.setEnabled(false); interpolationText.setEnabled(false); } } else { super.actionPerformed(event); } }
/** * Closes dialog box when the OK button is pressed, sets variables and calls algorithm. * * @param event Event that triggers function. */ public void actionPerformed(ActionEvent event) { String command = event.getActionCommand(); Object source = event.getSource(); if (command.equals("OK")) { if (setVariables()) { callAlgorithm(); } } else if (command.equals("Cancel")) { dispose(); } else if (command.equals("Help")) { // MipavUtil.showHelp(""); } else if (source.equals(doRicianCheckBox)) { if (doRicianCheckBox.isSelected()) { labelDegree.setEnabled(true); textDegree.setEnabled(true); } else { labelDegree.setEnabled(false); textDegree.setEnabled(false); } } else { // else if (source == thresholdCheckbox) super.actionPerformed(event); } }
/** * Closes dialog box when the OK button is pressed and calls the algorithm. * * @param event Event that triggers function */ public void actionPerformed(ActionEvent event) { String command = event.getActionCommand(); if (command.equals("OK")) { if (setVariables()) { callAlgorithm(); } } else if (command.equals("Cancel")) { dispose(); } else if (command.equals("Help")) { // MipavUtil.showHelp(""); } else { super.actionPerformed(event); } }