Skip to content

Commit c1a5a53

Browse files
authored
Merge pull request #771 from bowring/joinfix
Joinfix
2 parents b809835 + b168b5d commit c1a5a53

File tree

12 files changed

+65
-34
lines changed

12 files changed

+65
-34
lines changed

common.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ apply plugin: 'maven-publish'
77

88

99
String mavenGroupId = 'org.cirdles'
10-
String mavenVersion = '2.0.6'
10+
String mavenVersion = '2.0.7'
1111

1212
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
1313

squidApp/src/main/java/org/cirdles/squid/gui/ProjectManagerController.java

+3
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
*/
5252
public class ProjectManagerController implements Initializable {
5353

54+
public Label parametersModelLabel;
5455
@FXML
5556
private TextField originalPrawnFileName;
5657
@FXML
@@ -230,6 +231,8 @@ private void setUpParametersModelsComboBoxes() throws SquidException {
230231
} else {
231232
specifyDefaultCommonPbLabel.setVisible(false);
232233
commonPbModelComboBox.setVisible(false);
234+
parametersModelLabel.setVisible(false);
235+
useCommonPbModelForUnknownsCheckBox.setVisible(false);
233236
}
234237
}
235238

squidApp/src/main/java/org/cirdles/squid/gui/TaskEditorController.java

+26-2
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,13 @@ public class TaskEditorController implements Initializable {
7979
private static final Label instructions = new Label(" Choose numerator and denominator");
8080
private static final Button addBtn = new Button("Add ratio");
8181
private static final HBox addBtnHBox = new HBox(addBtn);
82+
private static final Button closeBtn = new Button("Close");
83+
private static final HBox closeBtnHBox = new HBox(closeBtn);
8284
private static final Label numLabel = new Label("");
8385
private static final Label divLabel = new Label("/");
8486
private static final Label denLabel = new Label("");
8587
private static final HBox infoLabelHBox = new HBox(numLabel, divLabel, denLabel);
86-
private static final VBox addInfo = new VBox(infoLabelHBox, addBtnHBox);
88+
private static final VBox addInfo = new VBox(infoLabelHBox, addBtnHBox, closeBtnHBox);
8789
private static final VBox menuVBox = new VBox(instructions, numDemHBox, addInfo);
8890
private static final Map<String, Tooltip> tooltipsMap = new HashMap<>();
8991
private static final ToggleGroup numTG = new ToggleGroup();
@@ -93,6 +95,7 @@ public class TaskEditorController implements Initializable {
9395
private static Map<String, ExpressionTreeInterface> namedExpressionsMap = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);
9496
private static boolean amGeochronMode;
9597
private final List<StackPane> undoMassesList = new ArrayList<>();
98+
public Text pinkMassesWarningText;
9699
EventHandler<MouseEvent> mouseEnteredExpressionEventHandler = new EventHandler<MouseEvent>() {
97100
@Override
98101
public void handle(MouseEvent event) {
@@ -317,7 +320,21 @@ public void initialize(URL url, ResourceBundle rb) {
317320
updateAddButton();
318321
});
319322

320-
// updateAddButton();
323+
closeBtnHBox.setAlignment(Pos.CENTER);
324+
closeBtn.setStyle(
325+
"-fx-padding: 5 22 5 22;\n"
326+
+ " -fx-border-color: #e2e2e2;"
327+
+ " -fx-border-width: 2;"
328+
+ " -fx-background-radius: 0;"
329+
+ " -fx-background-color: #FB6D42;"
330+
+ " -fx-font-family: SansSerif;"
331+
+ " -fx-font-size: 11pt;"
332+
+ " -fx-text-fill: whitesmoke;"
333+
+ " -fx-background-insets: 0 0 0 0, 0, 1, 2;");
334+
335+
closeBtn.setOnMouseClicked((event) -> {
336+
ADD_RATIOS_STAGE.hide();
337+
});
321338

322339
numLabel.setStyle("-fx-font-family: SansSerif bold;-fx-font-size: 18");
323340
divLabel.setStyle("-fx-font-family: SansSerif bold;-fx-font-size: 18");
@@ -378,6 +395,10 @@ public void changed(ObservableValue<? extends Toggle> ob, Toggle o, Toggle n) {
378395
}
379396
amGeochronMode = taskEditor.getTaskType().compareTo(TaskTypeEnum.GEOCHRON) == 0;
380397

398+
if (taskEditor.getTaskType().equals(TaskTypeEnum.GENERAL)) {
399+
pinkMassesWarningText.setText("");
400+
}
401+
381402
updateAddButton();
382403

383404
initTaskDesign();
@@ -822,6 +843,7 @@ private ContextMenu createChooseMassesContextMenu() {
822843

823844
@FXML
824845
private void updateCurrentTaskWithThisTaskAction() throws SquidException {
846+
ADD_RATIOS_STAGE.hide();
825847
if (squidProject.getTask().getTaskType().equals(taskEditor.getTaskType())) {
826848
// check the mass count
827849
boolean valid = (squidProject.getTask().getSquidSpeciesModelList().size()
@@ -864,6 +886,7 @@ private void updateCurrentTaskWithThisTaskAction() throws SquidException {
864886

865887
@FXML
866888
private void saveThisTaskAsXMLFileAction() {
889+
ADD_RATIOS_STAGE.hide();
867890
try {
868891
TaskInterface task = new Task();
869892
task.updateTaskFromTaskDesign(taskEditor, true);
@@ -877,6 +900,7 @@ private void saveThisTaskAsXMLFileAction() {
877900

878901
@FXML
879902
private void viewCurrentTaskAction() {
903+
ADD_RATIOS_STAGE.hide();
880904
MenuItem menuItemTaskManager = ((MenuBar) SquidUI.primaryStage.getScene()
881905
.getRoot().getChildrenUnmodifiable().get(0)).getMenus().get(2).getItems().get(0);
882906
menuItemTaskManager.fire();

squidApp/src/main/resources/org/cirdles/squid/gui/ProjectManager.fxml

+3-3
Original file line numberDiff line numberDiff line change
@@ -203,8 +203,8 @@
203203
</padding>
204204
</HBox>
205205

206-
<Label alignment="CENTER_RIGHT" prefHeight="24.0" prefWidth="195.0" style="-fx-font-size: 14;"
207-
text="Parameter Models:" GridPane.rowIndex="5"/>
206+
<Label fx:id="parametersModelLabel" alignment="CENTER_RIGHT" prefHeight="24.0" prefWidth="195.0"
207+
style="-fx-font-size: 14;" text="Parameter Models:" GridPane.rowIndex="5"/>
208208
<HBox prefHeight="100.0" prefWidth="200.0" spacing="10.0" GridPane.columnIndex="1"
209209
GridPane.rowIndex="6">
210210
<children>
@@ -232,4 +232,4 @@
232232
<padding>
233233
<Insets bottom="15.0" left="20.0" right="20.0" top="1.0"/>
234234
</padding>
235-
</GridPane>
235+
</GridPane>

squidApp/src/main/resources/org/cirdles/squid/gui/SquidUIController.fxml

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
<Menu fx:id="openRecentOPFileMenu" mnemonicParsing="false" text="From Recent OP File"/>
4949
</items>
5050
</Menu>
51-
<Menu mnemonicParsing="false" text="New Squid3 RATIO Project ">
51+
<Menu mnemonicParsing="false" text="New Squid3 GENERAL (Ratio) Project ">
5252
<items>
5353
<MenuItem fx:id="newSquidRatioProjectMenuItem" mnemonicParsing="false"
5454
onAction="#newSquidRatioProjectAction" text="From a single Prawn XML file"/>

squidApp/src/main/resources/org/cirdles/squid/gui/TaskEditor.fxml

+9-10
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@
2121
<?import javafx.scene.layout.*?>
2222
<?import javafx.scene.shape.Ellipse?>
2323
<?import javafx.scene.text.*?>
24-
<GridPane xmlns:fx="http://javafx.com/fxml/1" fx:id="taskManagerGridPane" hgap="15.0" minHeight="660.0"
25-
minWidth="1250.0"
24+
<GridPane xmlns:fx="http://javafx.com/fxml/1" fx:id="taskManagerGridPane" hgap="15.0" minHeight="660.0" minWidth="1250.0"
2625
prefHeight="660.0" prefWidth="1250.0" styleClass="backgroundCalamari" stylesheets="@css/projectManager.css"
2726
vgap="10.0" xmlns="http://javafx.com/javafx/17"
2827
fx:controller="org.cirdles.squid.gui.TaskEditorController">
@@ -229,9 +228,9 @@
229228
<Label style="-fx-text-fill: #3c77c9; -fx-font-weight: bold;" text="Mass Labels:" GridPane.rowIndex="6"/>
230229
<HBox alignment="CENTER_LEFT" prefHeight="50.0" GridPane.columnIndex="1" GridPane.rowIndex="6">
231230
<children>
232-
<Button fx:id="chooseMassesButton" minWidth="86.0" mnemonicParsing="false"
233-
prefHeight="27.0" prefWidth="86.0"
234-
style="-fx-padding: 0 0 0 0; -fx-font-size: 10; -fx-font-weight: bold;" text="Add Masses"/>
231+
<Button fx:id="chooseMassesButton" minWidth="86.0" mnemonicParsing="false" prefHeight="27.0"
232+
prefWidth="86.0" style="-fx-padding: 0 0 0 0; -fx-font-size: 10; -fx-font-weight: bold;"
233+
text="Add Masses"/>
235234
<ScrollPane prefHeight="50.0" prefWidth="1035.0" HBox.hgrow="ALWAYS">
236235
<content>
237236
<TextFlow fx:id="defaultMassesListTextFlow" minHeight="30.0" minWidth="997.0"
@@ -243,9 +242,9 @@
243242
<Label style="-fx-text-fill: #3c77c9; -fx-font-weight: bold;" text="Ratios:" GridPane.rowIndex="8"/>
244243
<HBox alignment="CENTER_LEFT" prefHeight="90.0" GridPane.columnIndex="1" GridPane.rowIndex="8">
245244
<children>
246-
<Button fx:id="chooseRatiosButton" minWidth="86.0" mnemonicParsing="false"
247-
prefHeight="27.0" prefWidth="86.0"
248-
style="-fx-padding: 0 0 0 0; -fx-font-size: 10; -fx-font-weight: bold;" text="Add / Restore"/>
245+
<Button fx:id="chooseRatiosButton" minWidth="86.0" mnemonicParsing="false" prefHeight="27.0"
246+
prefWidth="86.0" style="-fx-padding: 0 0 0 0; -fx-font-size: 10; -fx-font-weight: bold;"
247+
text="Add / Restore"/>
249248
<ScrollPane HBox.hgrow="ALWAYS">
250249
<content>
251250
<TextFlow fx:id="defaultRatiosListTextFlow" minHeight="35.0" minWidth="997.0"
@@ -268,7 +267,7 @@
268267
</Text>
269268
<Spinner fx:id="backgroundIndexSpinner" maxHeight="25.0" minHeight="25.0" prefHeight="25.0"
270269
prefWidth="54.0" style="-fx-scale-y: 0.9; -fx-background-color: AQUAMARINE;"/>
271-
<Text strokeType="OUTSIDE" strokeWidth="0.0" style="-fx-fill: red;"
270+
<Text fx:id="pinkMassesWarningText" strokeType="OUTSIDE" strokeWidth="0.0" style="-fx-fill: red;"
272271
text="Note: Pink masses and ratios are required. Hint: To remove mass or ratio, click its oval in the displayed list."
273272
textAlignment="RIGHT" wrappingWidth="578.55224609375">
274273
<font>
@@ -304,4 +303,4 @@
304303
<padding>
305304
<Insets bottom="15.0" left="20.0" right="20.0" top="1.0"/>
306305
</padding>
307-
</GridPane>
306+
</GridPane>

squidApp/src/main/resources/org/cirdles/squid/gui/expressions/ExpressionBuilder.fxml

+2-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
<?import javafx.scene.layout.*?>
2222
<?import javafx.scene.text.*?>
2323
<?import javafx.scene.web.WebView?>
24-
<SplitPane xmlns:fx="http://javafx.com/fxml/1" fx:id="mainPane" dividerPositions="0.25" maxHeight="-Infinity" maxWidth="-Infinity"
24+
<SplitPane xmlns:fx="http://javafx.com/fxml/1" fx:id="mainPane" dividerPositions="0.25" maxHeight="-Infinity"
25+
maxWidth="-Infinity"
2526
minHeight="660.0" minWidth="1250.0" prefHeight="660.0" prefWidth="1250.0"
2627
styleClass="backgroundCalamari" stylesheets="@../css/projectManager.css"
2728
xmlns="http://javafx.com/javafx/17"

squidCore/src/main/java/org/cirdles/squid/constants/Squid3Constants.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ public String getIsotopeCorrectionPrefixString() {
260260

261261
public enum TaskTypeEnum {
262262
GEOCHRON("GEOCHRON", "Geochron", new ArrayList<>(Arrays.asList("204", "206", "207", "208")), new ArrayList<>(Arrays.asList("204/206", "207/206", "208/206"))),
263-
GENERAL("GENERAL", "Ratio", new ArrayList<>(Arrays.asList()), new ArrayList<>(Arrays.asList()));
263+
GENERAL("GENERAL", "General (Ratio)", new ArrayList<>(Arrays.asList()), new ArrayList<>(Arrays.asList()));
264264

265265
private final String name;
266266
private final String projectName;

squidCore/src/main/java/org/cirdles/squid/prawn/RunParameterNames.java

+9-1
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,15 @@ public enum RunParameterNames implements Serializable {
280280
@XmlEnumValue("raster_time_sec")
281281
raster_time_sec("raster_time_sec"),
282282
@XmlEnumValue("raster_after_burn_time_sec")
283-
raster_after_burn_time_sec("raster_after_burn_time_sec");
283+
raster_after_burn_time_sec("raster_after_burn_time_sec"),
284+
285+
@XmlEnumValue("pressure_names")
286+
pressure_names("pressure_names"),
287+
288+
@XmlEnumValue("pressures")
289+
pressures("pressures");
290+
291+
284292

285293
private final String value;
286294

squidCore/src/main/java/org/cirdles/squid/projects/SquidProject.java

+1
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ public void createNewTask() throws SquidException {
225225
this.task = new Task(
226226
"New Task", prawnFile, prawnFileHandler.getNewReportsEngine());
227227

228+
this.task.setTaskType(projectType);
228229
this.task.setDelimiterForUnknownNames(delimiterForUnknownNames);
229230
this.task.setFilterForConcRefMatSpotNames(filterForConcRefMatSpotNames);
230231
this.task.setFilterForRefMatSpotNames(filterForRefMatSpotNames);

squidCore/src/main/java/org/cirdles/squid/tasks/Task.java

+9-9
Original file line numberDiff line numberDiff line change
@@ -650,19 +650,19 @@ private void generateSpotMetaDataFields() {
650650
@Override
651651
public void generateBuiltInExpressions() {
652652

653-
SortedSet<Expression> generateReferenceMaterialValues = updateReferenceMaterialValuesFromModel((ReferenceMaterialModel) referenceMaterialModel);
654-
taskExpressionsOrdered.addAll(generateReferenceMaterialValues);
655-
656-
SortedSet<Expression> generateConcReferenceMaterialValues = updateConcReferenceMaterialValuesFromModel((ReferenceMaterialModel) concentrationReferenceMaterialModel);
657-
taskExpressionsOrdered.addAll(generateConcReferenceMaterialValues);
658-
659-
SortedSet<Expression> generateCommonLeadParameterValues = updateCommonLeadParameterValuesFromModel(commonPbModel);
660-
taskExpressionsOrdered.addAll(generateCommonLeadParameterValues);
661-
662653
SortedSet<Expression> generatePhysicalConstantsValues = updatePhysicalConstantsParameterValuesFromModel((PhysicalConstantsModel) physicalConstantsModel);
663654
taskExpressionsOrdered.addAll(generatePhysicalConstantsValues);
664655

665656
if (taskType.equals(GEOCHRON)) {
657+
SortedSet<Expression> generateReferenceMaterialValues = updateReferenceMaterialValuesFromModel((ReferenceMaterialModel) referenceMaterialModel);
658+
taskExpressionsOrdered.addAll(generateReferenceMaterialValues);
659+
660+
SortedSet<Expression> generateConcReferenceMaterialValues = updateConcReferenceMaterialValuesFromModel((ReferenceMaterialModel) concentrationReferenceMaterialModel);
661+
taskExpressionsOrdered.addAll(generateConcReferenceMaterialValues);
662+
663+
SortedSet<Expression> generateCommonLeadParameterValues = updateCommonLeadParameterValuesFromModel(commonPbModel);
664+
taskExpressionsOrdered.addAll(generateCommonLeadParameterValues);
665+
666666
SortedSet<Expression> generatePlaceholderExpressions = generatePlaceholderExpressions(parentNuclide, isDirectAltPD());
667667
taskExpressionsOrdered.addAll(generatePlaceholderExpressions);
668668

squidCore/src/main/java/org/cirdles/squid/tasks/expressions/builtinExpressions/BuiltInExpressionsDataDictionary.java

-5
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,6 @@ public class BuiltInExpressionsDataDictionary {
2626
// ********************** REQUIRED **************************************
2727
public static final String DEFAULT_BACKGROUND_MASS_LABEL = "BKG";
2828

29-
// public static final List<String> REQUIRED_NOMINAL_MASSES
30-
// = new ArrayList<>(Arrays.asList("204", "206", "207", "208"));
31-
// public static final List<String> REQUIRED_RATIO_NAMES
32-
// = new ArrayList<>(Arrays.asList("204/206", "207/206", "208/206"));
33-
3429
// ********************** SPECIAL CONSTANTS ******************************
3530
// holding spot until models are implemented
3631
public static final String REF_238U235U_RM_MODEL_NAME = "r238_235s";

0 commit comments

Comments
 (0)