From 89761a5209ff1cb7d0d945b8efc175c25364060a Mon Sep 17 00:00:00 2001 From: stephane <stephane.dervaux@inrae.fr> Date: Wed, 27 Nov 2024 10:38:39 +0100 Subject: [PATCH 1/2] change ucum tooltips --- .../inra/po2vocabmanager/utils/UITools.java | 28 +++++++++++++++---- .../ontoView/OntologyOverviewController.java | 27 ++++++++++++++++-- 2 files changed, 47 insertions(+), 8 deletions(-) diff --git a/src/main/java/fr/inra/po2vocabmanager/utils/UITools.java b/src/main/java/fr/inra/po2vocabmanager/utils/UITools.java index 6e910325..d4ed78b1 100644 --- a/src/main/java/fr/inra/po2vocabmanager/utils/UITools.java +++ b/src/main/java/fr/inra/po2vocabmanager/utils/UITools.java @@ -358,15 +358,33 @@ public class UITools { b.getChildren().addAll(unitValue, paneShow); editValue.getDialogPane().setContent(b); Hyperlink linkToUCUM = new Hyperlink(); - linkToUCUM.setText("UCUM Code"); + linkToUCUM.setText("here"); linkToUCUM.setOnAction(actionEvent -> MainApp.openBrowser("http://unitsofmeasure.org/ucum.html")); - + Hyperlink linkToUcumSem = new Hyperlink(); + linkToUcumSem.setText("here"); + linkToUcumSem.setOnAction(actionEvent -> MainApp.openBrowser("https://finto.fi/ucum/en/")); TextFlow unitInfo = new TextFlow(); - unitInfo.getChildren().add(new Text("Only ")); + unitInfo.getChildren().add(new Text("Only Ucum code available ")); unitInfo.getChildren().add(linkToUCUM); - unitInfo.getChildren().add(new Text(" can be used in the text field.\ne.g. [degF]/min -> °F/min\n um.s-1.d-1 -> µm/s/d\n\nIf the unit is not available in UCUM or if you want to add precision, you can annotate your unit with { }\ne.g. {CBU}/g -> CBU/g\n kg{total} -> kg(total)\n %{vol} -> %(vol))\n\nFor a quantity without unit, use only bracket annotation like {total}, {anyYouWant}")); - + unitInfo.getChildren().add(new Text(" or ")); + unitInfo.getChildren().add(linkToUcumSem); + unitInfo.getChildren().add(new Text(" can be used in the text field.\n" + + "To choose a prefix, click on \"Show prefix code\"\n" + + " e.g. prefix for \"micro\" is u\n\n" + + "To display the existing codes, click on \"Show units code\"\n" + + " e.g. code for \"degree Celsius\" is Cel\n\n" + + "Exponents are written directly as numbers following the unit.\n" + + " e.g. m2 for square meter\n" + + " m3 for cubic meter\n\n" + + "Care must also be taken to combine units correctly\n" + + " e.g. m/s or m.s-1 are valid entries.\n\n" + + "If there is no entry in the field \"unit\", then the value is typed as a string of characters (qualitative value).\n\n" + + "For numeric values that have no unit or dimensionless numbers, use an annotation between curly braces (e.g. {dimensionless} or {one}).\nThis entry will be interpreted as a vector of dimension 1.\n\n" + + "If you want to add any details, you can annotate your unit with curly braces { }\n" + + " e.g. kg{total} --> kg(total) will be displayed in the field \"unit\"\n\n" + + "Also, please use curly braces if your unit is not a valid SI unit, or if you do not wish any conversion.\n" + + "There must be no spaces in the content entered between curly braces.")); editValue.getDialogPane().setExpandableContent(unitInfo); diff --git a/src/main/java/fr/inra/po2vocabmanager/view/ontoView/OntologyOverviewController.java b/src/main/java/fr/inra/po2vocabmanager/view/ontoView/OntologyOverviewController.java index 9d1f2776..d8141d12 100644 --- a/src/main/java/fr/inra/po2vocabmanager/view/ontoView/OntologyOverviewController.java +++ b/src/main/java/fr/inra/po2vocabmanager/view/ontoView/OntologyOverviewController.java @@ -247,14 +247,35 @@ TableView<SimpleStringProperty> tableClose; b.getChildren().addAll(unitValue, paneShow); editValue.getDialogPane().setContent(b); Hyperlink linkToUCUM = new Hyperlink(); - linkToUCUM.setText("UCUM Code"); + linkToUCUM.setText("here"); linkToUCUM.setOnAction(actionEvent -> MainApp.openBrowser("http://unitsofmeasure.org/ucum.html")); + Hyperlink linkToUcumSem = new Hyperlink(); + linkToUcumSem.setText("here"); + linkToUcumSem.setOnAction(actionEvent -> MainApp.openBrowser("https://finto.fi/ucum/en/")); + TextFlow unitInfo = new TextFlow(); - unitInfo.getChildren().add(new Text("Only ")); + unitInfo.getChildren().add(new Text("Only Ucum code available ")); unitInfo.getChildren().add(linkToUCUM); - unitInfo.getChildren().add(new Text(" can be used in the text field.\ne.g. [degF]/min -> °F/min\n um.s-1.d-1 -> µm/s/d\n\nIf the unit is not available in UCUM, you can annotate your unit with { }\ne.g. {CBU}/g -> CBU/g\n kg{total} -> kg(total)\n %{vol} -> %(vol)\n\nFor a quantity without unit, use only bracket annotation like {total}, {anyYouWant}")); + unitInfo.getChildren().add(new Text(" or ")); + unitInfo.getChildren().add(linkToUcumSem); + unitInfo.getChildren().add(new Text(" can be used in the text field.\n" + + "To choose a prefix, click on \"Show prefix code\"\n" + + " e.g. prefix for \"micro\" is u\n\n" + + "To display the existing codes, click on \"Show units code\"\n" + + " e.g. code for \"degree Celsius\" is Cel\n\n" + + "Exponents are written directly as numbers following the unit.\n" + + " e.g. m2 for square meter\n" + + " m3 for cubic meter\n\n" + + "Care must also be taken to combine units correctly\n" + + " e.g. m/s or m.s-1 are valid entries.\n\n" + + "If there is no entry in the field \"unit\", then the value is typed as a string of characters (qualitative value).\n\n" + + "For numeric values that have no unit or dimensionless numbers, use an annotation between curly braces (e.g. {dimensionless} or {one}).\nThis entry will be interpreted as a vector of dimension 1.\n\n" + + "If you want to add any details, you can annotate your unit with curly braces { }\n" + + " e.g. kg{total} --> kg(total) will be displayed in the field \"unit\"\n\n" + + "Also, please use curly braces if your unit is not a valid SI unit, or if you do not wish any conversion.\n" + + "There must be no spaces in the content entered between curly braces.")); editValue.getDialogPane().setExpandableContent(unitInfo); -- GitLab From 84797d4b32b7c5205cdd89419155a74624390c25 Mon Sep 17 00:00:00 2001 From: stephane <stephane.dervaux@inrae.fr> Date: Wed, 27 Nov 2024 10:39:39 +0100 Subject: [PATCH 2/2] add changelog --- src/main/resources/resources/changelog.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/resources/resources/changelog.txt b/src/main/resources/resources/changelog.txt index 5b84b9c2..6526a710 100644 --- a/src/main/resources/resources/changelog.txt +++ b/src/main/resources/resources/changelog.txt @@ -1,5 +1,6 @@ ------------------ NEXT --------------------- * Enhancement (PO2-Tools/po2manager#86) : Ajout de la gestion des contraintes shacl sur les ontologies + * Enhancement (PO2-Tools/po2manager#87) : Amélioration des instructions pour la saisie des unités ------------------ V1.8.6.5 --------------------- * Bug Fix (PO2-Tools/po2manager#109) : L'arbre des concepts n'est pas toujours à jours après des copies / déplacements de concepts -- GitLab