diff --git a/TripoliApp/src/main/java/org/cirdles/tripoli/gui/AnalysisManagerController.java b/TripoliApp/src/main/java/org/cirdles/tripoli/gui/AnalysisManagerController.java index 3ce44177..f0ff8c40 100644 --- a/TripoliApp/src/main/java/org/cirdles/tripoli/gui/AnalysisManagerController.java +++ b/TripoliApp/src/main/java/org/cirdles/tripoli/gui/AnalysisManagerController.java @@ -26,6 +26,7 @@ import javafx.scene.text.FontWeight; import javafx.scene.text.Text; import javafx.scene.text.TextFlow; +import org.cirdles.tripoli.constants.TripoliConstants; import org.cirdles.tripoli.expressions.species.IsotopicRatio; import org.cirdles.tripoli.expressions.species.SpeciesRecordInterface; import org.cirdles.tripoli.expressions.userFunctions.UserFunction; @@ -36,6 +37,7 @@ import org.cirdles.tripoli.gui.dialogs.TripoliMessageDialog; import org.cirdles.tripoli.sessions.analysis.Analysis; import org.cirdles.tripoli.sessions.analysis.AnalysisInterface; +import org.cirdles.tripoli.sessions.analysis.AnalysisStatsRecord; import org.cirdles.tripoli.sessions.analysis.massSpectrometerModels.dataModels.dataLiteOne.initializers.AllBlockInitForDataLiteOne; import org.cirdles.tripoli.sessions.analysis.massSpectrometerModels.dataModels.mcmc.initializers.AllBlockInitForMCMC; import org.cirdles.tripoli.sessions.analysis.massSpectrometerModels.dataSourceProcessors.MassSpecOutputBlockRecordFull; @@ -43,6 +45,8 @@ import org.cirdles.tripoli.sessions.analysis.methods.AnalysisMethod; import org.cirdles.tripoli.sessions.analysis.methods.baseline.BaselineCell; import org.cirdles.tripoli.sessions.analysis.methods.sequence.SequenceCell; +import org.cirdles.tripoli.sessions.analysis.outputs.etRedux.ETReduxFraction; +import org.cirdles.tripoli.sessions.analysis.outputs.etRedux.MeasuredRatioModel; import org.cirdles.tripoli.utilities.exceptions.TripoliException; import org.cirdles.tripoli.utilities.stateUtilities.TripoliPersistentState; @@ -54,13 +58,13 @@ import java.util.*; import java.util.stream.Collectors; +import static java.lang.StrictMath.exp; import static org.cirdles.tripoli.constants.TripoliConstants.MISSING_STRING_FIELD; import static org.cirdles.tripoli.constants.TripoliConstants.TRIPOLI_RATIO_FLIPPER_URL; import static org.cirdles.tripoli.gui.constants.ConstantsTripoliApp.*; import static org.cirdles.tripoli.gui.dialogs.TripoliMessageDialog.showChoiceDialog; import static org.cirdles.tripoli.gui.utilities.UIUtilities.showTab; -import static org.cirdles.tripoli.gui.utilities.fileUtilities.FileHandlerUtil.selectDataFile; -import static org.cirdles.tripoli.gui.utilities.fileUtilities.FileHandlerUtil.selectMethodFile; +import static org.cirdles.tripoli.gui.utilities.fileUtilities.FileHandlerUtil.*; import static org.cirdles.tripoli.sessions.analysis.Analysis.*; import static org.cirdles.tripoli.sessions.analysis.methods.AnalysisMethod.compareAnalysisMethodToDataFileSpecs; @@ -97,6 +101,10 @@ public class AnalysisManagerController implements Initializable, AnalysisManager public Tab selectColumnsToPlot; public VBox ratiosVBox; public VBox functionsVBox; + public TextField fractionNameTextField; + public ScrollPane ratiosScrollPane; + public ScrollPane functionsScrollPane; + public Button exportToETReduxButton; @FXML private GridPane analysisManagerGridPane; @FXML @@ -241,11 +249,12 @@ public void initialize(URL location, ResourceBundle resources) { OGTripoliViewController.analysis = analysis; analysisManagerGridPane.setStyle("-fx-background-color: " + convertColorToHex(TRIPOLI_ANALYSIS_YELLOW)); - populateAnalysisManagerGridPane(analysis.getAnalysisCaseNumber()); +// populateAnalysisManagerGridPane(analysis.getAnalysisCaseNumber()); setupListeners(); try { previewAndSculptDataAction(); + populateAnalysisManagerGridPane(analysis.getAnalysisCaseNumber()); } catch (TripoliException e) { // throw new RuntimeException(e); } @@ -269,6 +278,10 @@ private void setupListeners() { assert null != analysis; analysis.setAnalysisSampleName(newValue.isBlank() ? MISSING_STRING_FIELD : newValue); }); + fractionNameTextField.textProperty().addListener((observable, oldValue, newValue) -> { + assert null != analysis; + analysis.setAnalysisFractionName(newValue.isBlank() ? MISSING_STRING_FIELD : newValue); + }); sampleDescriptionTextField.textProperty().addListener((observable, oldValue, newValue) -> { assert null != analysis; analysis.setAnalysisSampleDescription(newValue.isBlank() ? MISSING_STRING_FIELD : newValue); @@ -288,6 +301,9 @@ private void populateAnalysisManagerGridPane(int caseNumber) { sampleNameTextField.setEditable(analysis.isMutable()); sampleNameTextField.setText(analysis.getAnalysisSampleName()); + fractionNameTextField.setEditable(analysis.isMutable()); + fractionNameTextField.setText(analysis.getAnalysisFractionName()); + sampleDescriptionTextField.setEditable(analysis.isMutable()); sampleDescriptionTextField.setText(analysis.getAnalysisSampleDescription()); @@ -454,6 +470,9 @@ private void populateAnalysisMethodColumnsSelectorPane() { List ratioCheckBoxList = new ArrayList<>(); List ratioInvertedCheckBoxList = new ArrayList<>(); List functionCheckBoxList = new ArrayList<>(); + List