diff --git a/common.gradle b/common.gradle index 9bfb8c65..1ec2195b 100644 --- a/common.gradle +++ b/common.gradle @@ -7,7 +7,7 @@ apply plugin: 'maven-publish' String mavenGroupId = 'org.cirdles' -String mavenVersion = '2.0.6' +String mavenVersion = '2.0.7' [compileJava, compileTestJava]*.options*.encoding = 'UTF-8' diff --git a/squidApp/src/main/java/org/cirdles/squid/gui/ProjectManagerController.java b/squidApp/src/main/java/org/cirdles/squid/gui/ProjectManagerController.java index 958a023e..3d38214a 100644 --- a/squidApp/src/main/java/org/cirdles/squid/gui/ProjectManagerController.java +++ b/squidApp/src/main/java/org/cirdles/squid/gui/ProjectManagerController.java @@ -51,6 +51,7 @@ */ public class ProjectManagerController implements Initializable { + public Label parametersModelLabel; @FXML private TextField originalPrawnFileName; @FXML @@ -230,6 +231,8 @@ private void setUpParametersModelsComboBoxes() throws SquidException { } else { specifyDefaultCommonPbLabel.setVisible(false); commonPbModelComboBox.setVisible(false); + parametersModelLabel.setVisible(false); + useCommonPbModelForUnknownsCheckBox.setVisible(false); } } diff --git a/squidApp/src/main/java/org/cirdles/squid/gui/TaskEditorController.java b/squidApp/src/main/java/org/cirdles/squid/gui/TaskEditorController.java index 0e8abe4b..2abb37d8 100644 --- a/squidApp/src/main/java/org/cirdles/squid/gui/TaskEditorController.java +++ b/squidApp/src/main/java/org/cirdles/squid/gui/TaskEditorController.java @@ -79,11 +79,13 @@ public class TaskEditorController implements Initializable { private static final Label instructions = new Label(" Choose numerator and denominator"); private static final Button addBtn = new Button("Add ratio"); private static final HBox addBtnHBox = new HBox(addBtn); + private static final Button closeBtn = new Button("Close"); + private static final HBox closeBtnHBox = new HBox(closeBtn); private static final Label numLabel = new Label(""); private static final Label divLabel = new Label("/"); private static final Label denLabel = new Label(""); private static final HBox infoLabelHBox = new HBox(numLabel, divLabel, denLabel); - private static final VBox addInfo = new VBox(infoLabelHBox, addBtnHBox); + private static final VBox addInfo = new VBox(infoLabelHBox, addBtnHBox, closeBtnHBox); private static final VBox menuVBox = new VBox(instructions, numDemHBox, addInfo); private static final Map tooltipsMap = new HashMap<>(); private static final ToggleGroup numTG = new ToggleGroup(); @@ -93,6 +95,7 @@ public class TaskEditorController implements Initializable { private static Map namedExpressionsMap = new TreeMap<>(String.CASE_INSENSITIVE_ORDER); private static boolean amGeochronMode; private final List undoMassesList = new ArrayList<>(); + public Text pinkMassesWarningText; EventHandler mouseEnteredExpressionEventHandler = new EventHandler() { @Override public void handle(MouseEvent event) { @@ -317,7 +320,21 @@ public void initialize(URL url, ResourceBundle rb) { updateAddButton(); }); -// updateAddButton(); + closeBtnHBox.setAlignment(Pos.CENTER); + closeBtn.setStyle( + "-fx-padding: 5 22 5 22;\n" + + " -fx-border-color: #e2e2e2;" + + " -fx-border-width: 2;" + + " -fx-background-radius: 0;" + + " -fx-background-color: #FB6D42;" + + " -fx-font-family: SansSerif;" + + " -fx-font-size: 11pt;" + + " -fx-text-fill: whitesmoke;" + + " -fx-background-insets: 0 0 0 0, 0, 1, 2;"); + + closeBtn.setOnMouseClicked((event) -> { + ADD_RATIOS_STAGE.hide(); + }); numLabel.setStyle("-fx-font-family: SansSerif bold;-fx-font-size: 18"); divLabel.setStyle("-fx-font-family: SansSerif bold;-fx-font-size: 18"); @@ -378,6 +395,10 @@ public void changed(ObservableValue ob, Toggle o, Toggle n) { } amGeochronMode = taskEditor.getTaskType().compareTo(TaskTypeEnum.GEOCHRON) == 0; + if (taskEditor.getTaskType().equals(TaskTypeEnum.GENERAL)) { + pinkMassesWarningText.setText(""); + } + updateAddButton(); initTaskDesign(); @@ -822,6 +843,7 @@ private ContextMenu createChooseMassesContextMenu() { @FXML private void updateCurrentTaskWithThisTaskAction() throws SquidException { + ADD_RATIOS_STAGE.hide(); if (squidProject.getTask().getTaskType().equals(taskEditor.getTaskType())) { // check the mass count boolean valid = (squidProject.getTask().getSquidSpeciesModelList().size() @@ -864,6 +886,7 @@ private void updateCurrentTaskWithThisTaskAction() throws SquidException { @FXML private void saveThisTaskAsXMLFileAction() { + ADD_RATIOS_STAGE.hide(); try { TaskInterface task = new Task(); task.updateTaskFromTaskDesign(taskEditor, true); @@ -877,6 +900,7 @@ private void saveThisTaskAsXMLFileAction() { @FXML private void viewCurrentTaskAction() { + ADD_RATIOS_STAGE.hide(); MenuItem menuItemTaskManager = ((MenuBar) SquidUI.primaryStage.getScene() .getRoot().getChildrenUnmodifiable().get(0)).getMenus().get(2).getItems().get(0); menuItemTaskManager.fire(); diff --git a/squidApp/src/main/resources/org/cirdles/squid/gui/ProjectManager.fxml b/squidApp/src/main/resources/org/cirdles/squid/gui/ProjectManager.fxml index e3ec8ec4..6ca21b44 100644 --- a/squidApp/src/main/resources/org/cirdles/squid/gui/ProjectManager.fxml +++ b/squidApp/src/main/resources/org/cirdles/squid/gui/ProjectManager.fxml @@ -203,8 +203,8 @@ -