diff --git a/.gitignore b/.gitignore index d7fd86e..3aab14a 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,5 @@ health_data_export/target/generated-sources/ health_data_export/target/maven_archiver/ health_data_export/target/maven-status/ health_data_export/target/test-classes/ +health_data_export/tmp +health_data_export/HealthTool.app diff --git a/health_data_export/.gitignore b/health_data_export/.gitignore index b83d222..206dd4a 100644 --- a/health_data_export/.gitignore +++ b/health_data_export/.gitignore @@ -1 +1,4 @@ /target/ +/tmp/ +/HealthTool.app/ +/HealthTool-1.1.dmg diff --git a/health_data_export/dependency-reduced-pom.xml b/health_data_export/dependency-reduced-pom.xml index 4c3a813..bf69cc0 100644 --- a/health_data_export/dependency-reduced-pom.xml +++ b/health_data_export/dependency-reduced-pom.xml @@ -1,99 +1,99 @@ - - - 4.0.0 - health_data_export - health_data_export - 7 - - src - - - src - - **/*.java - - - - - - - org.eclipse.cbi.maven.plugins - eclipse-dmg-packager - 1.3.0 - - - - - - maven-compiler-plugin - 3.8.1 - - 8 - 8 - - - - org.eclipse.cbi.maven.plugins - eclipse-dmg-packager - 1.3.0 - - - org.openjfx - javafx-maven-plugin - 0.0.5 - - health_data_export/application.SuperMain - - - - maven-eclipse-plugin - 2.9 - - true - false - - - - maven-shade-plugin - 2.3 - - - package - - shade - - - - - application.SuperMain - - - - - - - - - - - eclipse cbi - https://repo.eclipse.org/content/repositories/cbi-releases - - - - - eclipse cbi - https://repo.eclipse.org/content/repositories/cbi-releases - - - - - org.openjfx - javafx - 11 - pom - compile - - - - + + + 4.0.0 + health_data_export + health_data_export + 7 + + src + + + src + + **/*.java + + + + + + + org.eclipse.cbi.maven.plugins + eclipse-dmg-packager + 1.3.0 + + + + + + maven-compiler-plugin + 3.8.1 + + 8 + 8 + + + + org.eclipse.cbi.maven.plugins + eclipse-dmg-packager + 1.3.0 + + + org.openjfx + javafx-maven-plugin + 0.0.5 + + health_data_export/application.SuperMain + + + + maven-eclipse-plugin + 2.9 + + true + false + + + + maven-shade-plugin + 2.3 + + + package + + shade + + + + + application.SuperMain + + + + + + + + + + + eclipse cbi + https://repo.eclipse.org/content/repositories/cbi-releases + + + + + eclipse cbi + https://repo.eclipse.org/content/repositories/cbi-releases + + + + + org.openjfx + javafx + 11 + pom + compile + + + + diff --git a/health_data_export/health_data_export-7.jar b/health_data_export/health_data_export-7.jar new file mode 100644 index 0000000..15c0a33 Binary files /dev/null and b/health_data_export/health_data_export-7.jar differ diff --git a/health_data_export/macos.entitlements b/health_data_export/macos.entitlements new file mode 100644 index 0000000..0e0df6c --- /dev/null +++ b/health_data_export/macos.entitlements @@ -0,0 +1,16 @@ + + + + + com.apple.security.cs.allow-jit + + com.apple.security.cs.allow-unsigned-executable-memory + + com.apple.security.cs.disable-executable-page-protection + + com.apple.security.cs.disable-library-validation + + com.apple.security.cs.allow-dyld-environment-variables + + + diff --git a/health_data_export/res/application/RI_Logo_blau_en_short_mac.icns b/health_data_export/res/application/RI_Logo_blau_en_short_mac.icns new file mode 100644 index 0000000..219a63b Binary files /dev/null and b/health_data_export/res/application/RI_Logo_blau_en_short_mac.icns differ diff --git a/health_data_export/res/application/style.css b/health_data_export/res/application/style.css index 2c8ae30..fc57b05 100644 --- a/health_data_export/res/application/style.css +++ b/health_data_export/res/application/style.css @@ -150,7 +150,7 @@ -fx-padding: 5; } -#openFileInFileBrowser { +#copyToClipboard { -fx-background-color: #bebebe; -fx-padding: 5; } diff --git a/health_data_export/src/application/UICoordinator.java b/health_data_export/src/application/UICoordinator.java index d14fe65..a439185 100644 --- a/health_data_export/src/application/UICoordinator.java +++ b/health_data_export/src/application/UICoordinator.java @@ -54,6 +54,7 @@ import javafx.scene.control.TextArea; import javafx.scene.control.Tooltip; import javafx.scene.image.Image; import javafx.scene.image.ImageView; +import javafx.scene.input.Clipboard; import javafx.scene.input.ClipboardContent; import javafx.scene.input.DataFormat; import javafx.scene.input.DragEvent; @@ -70,6 +71,7 @@ import javafx.scene.paint.Color; import javafx.scene.shape.Line; import javafx.stage.DirectoryChooser; import javafx.stage.Stage; +import javafx.util.Duration; /** * Main class of the application. Changes the views, commands the work and @@ -1105,6 +1107,9 @@ public class UICoordinator implements ChangeListener ComboBox levelThree = getComboBox(comboContainer); ComboBox levelFour = getComboBox(comboContainer); levelOne.setStyle("-fx-font-family :\"Arial\""); + levelTwo.setStyle("-fx-font-family :\"Arial\""); + levelThree.setStyle("-fx-font-family :\"Arial\""); + levelFour.setStyle("-fx-font-family :\"Arial\""); levelOne.setItems(getOccupationList("")); levelOne.setDisable(false); @@ -1459,20 +1464,30 @@ public class UICoordinator implements ChangeListener clipboardFiles.add(fileForSaving); // copy filepath to clipboard - BorderPane showInFileBrowser = new BorderPane(); - showInFileBrowser.setId("openFileInFileBrowser"); - Label openInFileBrowserText = new Label(Text.OPEN_FILE_IN_BROWSER); - showInFileBrowser.setCenter(openInFileBrowserText); - showInFileBrowser.setLeft(new ImageView( + BorderPane copyToClipboard = new BorderPane(); + copyToClipboard.setId("copyToClipboard"); + Label clipBoardText = new Label(Text.COPY_FILE_PATH); + copyToClipboard.setCenter(clipBoardText); + copyToClipboard.setLeft(new ImageView( new Image(this.getClass(). getResourceAsStream("filepath.png"),64.0,64.0, true, true))); - showInFileBrowser.setOnMouseClicked(new EventHandler() + copyToClipboard.setOnMouseClicked(new EventHandler() { @Override public void handle(MouseEvent arg0) - { - hostServices.showDocument(fileForSaving.getParent()); - + { + final Clipboard clipboard = Clipboard.getSystemClipboard(); + final ClipboardContent content = new ClipboardContent(); + content.putString(fileForSaving.getAbsolutePath()); + clipboard.setContent(content); + + Point2D p = clipBoardText.localToScreen(clipBoardText.getLayoutBounds().getCenterX(), + clipBoardText.getLayoutBounds().getCenterY()); + Tooltip copied = new Tooltip(Text.FILE_PATH_IN_CLIPBOARD); + clipBoardText.setTooltip(copied); + copied.show(clipBoardText, p.getX(), p.getY()); + copied.setHideDelay(Duration.seconds(5)); + copied.autoHideProperty().set(true); } }); @@ -1518,16 +1533,17 @@ public class UICoordinator implements ChangeListener } }); - HBox.setHgrow(showInFileBrowser, Priority.ALWAYS); + HBox.setHgrow(copyToClipboard, Priority.ALWAYS); HBox.setHgrow(dragToNextcloud, Priority.ALWAYS); HBox.setHgrow(goToNextcloud, Priority.ALWAYS); nextcloudHelp.getChildren().add(dragToNextcloud); - nextcloudHelp.getChildren().add(showInFileBrowser); + nextcloudHelp.getChildren().add(copyToClipboard); container.getChildren().add(nextcloudHelp); TextArea copyable = new TextArea(String.format(Text.F_RAW_UPLOAD_DATA, fileForSaving.getAbsolutePath(),Text.NEXTCLOUD_ADDRESS)); copyable.setEditable(false); copyable.setWrapText(true); + copyable.setStyle("-fx-font-family :\"Arial\""); copyable.setId("buttonProblems"); copyable.setFocusTraversable(false); copyable.setPrefHeight(70); diff --git a/health_data_export/src/application/res/Text.java b/health_data_export/src/application/res/Text.java index 499c7ec..a613647 100644 --- a/health_data_export/src/application/res/Text.java +++ b/health_data_export/src/application/res/Text.java @@ -137,7 +137,7 @@ public class Text + "\nClick here to copy server adress to clipboard!)"; public static final String SERVER_ADDRESS_IN_CLIPBOARD = "Server address was saved in clipboard"; public static final String FILE_PATH_IN_CLIPBOARD = "Filepath was saved in clipboard"; - public static final String OPEN_FILE_IN_BROWSER = "Open file in filebrowser!"; + public static final String COPY_FILE_PATH = "Copy filepath to clipboard!"; public static final String F_RAW_UPLOAD_DATA = "The buttons aren't working for you? Then you might need the following information:\nSaved Data: %s\nNextcloud server: %s"; public static final String DRAG_FILE = "Drag me to nextcloud server!"; public static final String DRAG_IN_ACTION = "Started dragging the file"; diff --git a/health_data_export/target/health_data_export-7.jar b/health_data_export/target/health_data_export-7.jar index d5a97ad..911eef9 100644 Binary files a/health_data_export/target/health_data_export-7.jar and b/health_data_export/target/health_data_export-7.jar differ diff --git a/health_data_export/target/maven-archiver/pom.properties b/health_data_export/target/maven-archiver/pom.properties deleted file mode 100644 index 1bade82..0000000 --- a/health_data_export/target/maven-archiver/pom.properties +++ /dev/null @@ -1,5 +0,0 @@ -#Generated by Maven -#Fri May 21 10:51:02 CEST 2021 -groupId=health_data_export -artifactId=health_data_export -version=7 diff --git a/health_data_export/target/original-health_data_export-7.jar b/health_data_export/target/original-health_data_export-7.jar deleted file mode 100644 index 9c1f8d1..0000000 Binary files a/health_data_export/target/original-health_data_export-7.jar and /dev/null differ