Open in filebrowser exchanged for copy filepath
prepared for mac build
This commit is contained in:
@@ -6,3 +6,5 @@ health_data_export/target/generated-sources/
|
|||||||
health_data_export/target/maven_archiver/
|
health_data_export/target/maven_archiver/
|
||||||
health_data_export/target/maven-status/
|
health_data_export/target/maven-status/
|
||||||
health_data_export/target/test-classes/
|
health_data_export/target/test-classes/
|
||||||
|
health_data_export/tmp
|
||||||
|
health_data_export/HealthTool.app
|
||||||
|
|||||||
@@ -1 +1,4 @@
|
|||||||
/target/
|
/target/
|
||||||
|
/tmp/
|
||||||
|
/HealthTool.app/
|
||||||
|
/HealthTool-1.1.dmg
|
||||||
|
|||||||
Binary file not shown.
@@ -0,0 +1,16 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>com.apple.security.cs.allow-jit</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.security.cs.disable-executable-page-protection</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.security.cs.disable-library-validation</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
Binary file not shown.
@@ -150,7 +150,7 @@
|
|||||||
-fx-padding: 5;
|
-fx-padding: 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
#openFileInFileBrowser {
|
#copyToClipboard {
|
||||||
-fx-background-color: #bebebe;
|
-fx-background-color: #bebebe;
|
||||||
-fx-padding: 5;
|
-fx-padding: 5;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,6 +54,7 @@ import javafx.scene.control.TextArea;
|
|||||||
import javafx.scene.control.Tooltip;
|
import javafx.scene.control.Tooltip;
|
||||||
import javafx.scene.image.Image;
|
import javafx.scene.image.Image;
|
||||||
import javafx.scene.image.ImageView;
|
import javafx.scene.image.ImageView;
|
||||||
|
import javafx.scene.input.Clipboard;
|
||||||
import javafx.scene.input.ClipboardContent;
|
import javafx.scene.input.ClipboardContent;
|
||||||
import javafx.scene.input.DataFormat;
|
import javafx.scene.input.DataFormat;
|
||||||
import javafx.scene.input.DragEvent;
|
import javafx.scene.input.DragEvent;
|
||||||
@@ -70,6 +71,7 @@ import javafx.scene.paint.Color;
|
|||||||
import javafx.scene.shape.Line;
|
import javafx.scene.shape.Line;
|
||||||
import javafx.stage.DirectoryChooser;
|
import javafx.stage.DirectoryChooser;
|
||||||
import javafx.stage.Stage;
|
import javafx.stage.Stage;
|
||||||
|
import javafx.util.Duration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Main class of the application. Changes the views, commands the work and
|
* Main class of the application. Changes the views, commands the work and
|
||||||
@@ -1105,6 +1107,9 @@ public class UICoordinator implements ChangeListener<Boolean>
|
|||||||
ComboBox<String> levelThree = getComboBox(comboContainer);
|
ComboBox<String> levelThree = getComboBox(comboContainer);
|
||||||
ComboBox<String> levelFour = getComboBox(comboContainer);
|
ComboBox<String> levelFour = getComboBox(comboContainer);
|
||||||
levelOne.setStyle("-fx-font-family :\"Arial\"");
|
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.setItems(getOccupationList(""));
|
||||||
levelOne.setDisable(false);
|
levelOne.setDisable(false);
|
||||||
@@ -1459,20 +1464,30 @@ public class UICoordinator implements ChangeListener<Boolean>
|
|||||||
clipboardFiles.add(fileForSaving);
|
clipboardFiles.add(fileForSaving);
|
||||||
|
|
||||||
// copy filepath to clipboard
|
// copy filepath to clipboard
|
||||||
BorderPane showInFileBrowser = new BorderPane();
|
BorderPane copyToClipboard = new BorderPane();
|
||||||
showInFileBrowser.setId("openFileInFileBrowser");
|
copyToClipboard.setId("copyToClipboard");
|
||||||
Label openInFileBrowserText = new Label(Text.OPEN_FILE_IN_BROWSER);
|
Label clipBoardText = new Label(Text.COPY_FILE_PATH);
|
||||||
showInFileBrowser.setCenter(openInFileBrowserText);
|
copyToClipboard.setCenter(clipBoardText);
|
||||||
showInFileBrowser.setLeft(new ImageView(
|
copyToClipboard.setLeft(new ImageView(
|
||||||
new Image(this.getClass().
|
new Image(this.getClass().
|
||||||
getResourceAsStream("filepath.png"),64.0,64.0, true, true)));
|
getResourceAsStream("filepath.png"),64.0,64.0, true, true)));
|
||||||
showInFileBrowser.setOnMouseClicked(new EventHandler<MouseEvent>()
|
copyToClipboard.setOnMouseClicked(new EventHandler<MouseEvent>()
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public void handle(MouseEvent arg0)
|
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<Boolean>
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
HBox.setHgrow(showInFileBrowser, Priority.ALWAYS);
|
HBox.setHgrow(copyToClipboard, Priority.ALWAYS);
|
||||||
HBox.setHgrow(dragToNextcloud, Priority.ALWAYS);
|
HBox.setHgrow(dragToNextcloud, Priority.ALWAYS);
|
||||||
HBox.setHgrow(goToNextcloud, Priority.ALWAYS);
|
HBox.setHgrow(goToNextcloud, Priority.ALWAYS);
|
||||||
nextcloudHelp.getChildren().add(dragToNextcloud);
|
nextcloudHelp.getChildren().add(dragToNextcloud);
|
||||||
nextcloudHelp.getChildren().add(showInFileBrowser);
|
nextcloudHelp.getChildren().add(copyToClipboard);
|
||||||
container.getChildren().add(nextcloudHelp);
|
container.getChildren().add(nextcloudHelp);
|
||||||
|
|
||||||
TextArea copyable = new TextArea(String.format(Text.F_RAW_UPLOAD_DATA, fileForSaving.getAbsolutePath(),Text.NEXTCLOUD_ADDRESS));
|
TextArea copyable = new TextArea(String.format(Text.F_RAW_UPLOAD_DATA, fileForSaving.getAbsolutePath(),Text.NEXTCLOUD_ADDRESS));
|
||||||
copyable.setEditable(false);
|
copyable.setEditable(false);
|
||||||
copyable.setWrapText(true);
|
copyable.setWrapText(true);
|
||||||
|
copyable.setStyle("-fx-font-family :\"Arial\"");
|
||||||
copyable.setId("buttonProblems");
|
copyable.setId("buttonProblems");
|
||||||
copyable.setFocusTraversable(false);
|
copyable.setFocusTraversable(false);
|
||||||
copyable.setPrefHeight(70);
|
copyable.setPrefHeight(70);
|
||||||
|
|||||||
@@ -137,7 +137,7 @@ public class Text
|
|||||||
+ "\nClick here to copy server adress to clipboard!)";
|
+ "\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 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 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 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_FILE = "Drag me to nextcloud server!";
|
||||||
public static final String DRAG_IN_ACTION = "Started dragging the file";
|
public static final String DRAG_IN_ACTION = "Started dragging the file";
|
||||||
|
|||||||
Binary file not shown.
@@ -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
|
|
||||||
Binary file not shown.
Reference in New Issue
Block a user