diff --git a/pom.xml b/pom.xml
index a27e5a7b..98c2206b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -26,7 +26,7 @@
javafx-maven-plugin
0.0.8
- eu.snik.tag.gui.Main
+ sniktag/eu.snik.tag.gui.Main
@@ -138,24 +138,24 @@
${version.javafx}
win
-
+
+
+
org.json
json
@@ -194,10 +194,10 @@
jsoup
1.17.2
-
+
diff --git a/src/main/java/eu/snik/tag/gui/ClassTable.java b/src/main/java/eu/snik/tag/gui/ClassTable.java
index 71dea458..a27a529a 100644
--- a/src/main/java/eu/snik/tag/gui/ClassTable.java
+++ b/src/main/java/eu/snik/tag/gui/ClassTable.java
@@ -96,7 +96,7 @@ private void split(Clazz splitter) {
* @param createRestorePoint callback that is run when the user changes a class.
* This is necessary because an observable list's change listeners only fire when a class is added or removed, not changed.*/
@SuppressWarnings("unchecked")
- public ClassTable(final State state, final Runnable createRestorePoint) {
+ ClassTable(final State state, final Runnable createRestorePoint) {
this.state = state;
this.createRestorePoint = createRestorePoint;
this.table = new TableView();
diff --git a/src/main/java/eu/snik/tag/gui/ClassTextPane.java b/src/main/java/eu/snik/tag/gui/ClassTextPane.java
index ce159983..73266269 100644
--- a/src/main/java/eu/snik/tag/gui/ClassTextPane.java
+++ b/src/main/java/eu/snik/tag/gui/ClassTextPane.java
@@ -73,7 +73,7 @@ public void highlightObject(Clazz old, Clazz neww) {
/** @param classes added or removed classes will automatically be shown.
* @param relationPane */
- public ClassTextPane(State state, RelationPane relationPane) {
+ ClassTextPane(State state, RelationPane relationPane) {
this.state = state;
this.setContent(flow);
this.setVbarPolicy(ScrollBarPolicy.AS_NEEDED);
diff --git a/src/main/java/eu/snik/tag/gui/Log.java b/src/main/java/eu/snik/tag/gui/Log.java
index c2667847..6a79332e 100644
--- a/src/main/java/eu/snik/tag/gui/Log.java
+++ b/src/main/java/eu/snik/tag/gui/Log.java
@@ -1,9 +1,10 @@
package eu.snik.tag.gui;
+import org.controlsfx.control.Notifications;
+
import javafx.application.Platform;
import javafx.stage.Window;
import javafx.util.Duration;
-import org.controlsfx.control.Notifications;
public final class Log {
@@ -11,6 +12,32 @@ public static void warn(String message, Window window) {
Platform.runLater(
() -> {
Notifications.create().owner(window).title("Warnung").text(message).hideAfter(Duration.seconds(10 + Math.log10(message.length()))).showWarning();
+ /*
+ VBox content = new VBox();
+ Pane backgroundPane = new Pane();
+ backgroundPane.getChildren().add(content);
+ backgroundPane.setStyle("-fx-background-color: white;");
+
+ Label messageLabel = new Label(message);
+ content.getChildren().add(messageLabel);
+
+ // Create the popup
+ Popup popup = new Popup();
+ popup.getContent().addAll(backgroundPane);
+
+ // Add a button to close the popup (optional)
+ Button closeButton = new Button("Close");
+ closeButton.setOnAction(event -> popup.hide());
+ content.getChildren().add(closeButton);
+
+ // Create a PauseTransition to hide the popup after a delay
+ PauseTransition pause = new PauseTransition(Duration.seconds(8 + Math.log10(message.length())));
+ pause.setOnFinished(e -> popup.hide());
+
+ // Show the popup and start the auto-hide timer
+ popup.show(window);
+ pause.play();
+ */
}
);
diff --git a/src/main/java/eu/snik/tag/gui/Main.java b/src/main/java/eu/snik/tag/gui/Main.java
index a5b1df9e..7f17c234 100644
--- a/src/main/java/eu/snik/tag/gui/Main.java
+++ b/src/main/java/eu/snik/tag/gui/Main.java
@@ -26,7 +26,7 @@
/** GUI entry point. Run with Maven via javafx:run. */
public class Main extends Application {
- public final State state = new State();
+ final State state = new State();
private final SplitPane textPane = new SplitPane();
@@ -38,7 +38,7 @@ public class Main extends Application {
private final ClassTable tableView = new ClassTable(state, this::createRestorePoint);
private final TripleTable tripleTable = new TripleTable(state.triples, this::createRestorePoint);
- public Stage stage;
+ Stage stage;
private Window window;
diff --git a/src/main/java/eu/snik/tag/gui/MainMenuBar.java b/src/main/java/eu/snik/tag/gui/MainMenuBar.java
index 4ff66c45..9b0c6230 100644
--- a/src/main/java/eu/snik/tag/gui/MainMenuBar.java
+++ b/src/main/java/eu/snik/tag/gui/MainMenuBar.java
@@ -307,7 +307,7 @@ static Menu helpMenu() {
return helpMenu;
}
- public static MenuBar create(Main main) {
+ static MenuBar create(Main main) {
return new MenuBar(fileMenu(main), helpMenu());
}
}
diff --git a/src/main/java/eu/snik/tag/gui/State.java b/src/main/java/eu/snik/tag/gui/State.java
index 9077f300..be0bfeb2 100644
--- a/src/main/java/eu/snik/tag/gui/State.java
+++ b/src/main/java/eu/snik/tag/gui/State.java
@@ -20,7 +20,7 @@
import org.json.JSONArray;
import org.json.JSONObject;
-public class State {
+class State {
public final StringProperty text = new SimpleStringProperty();
public final ObservableList classes = FXCollections.observableArrayList();
diff --git a/src/main/java/module-info.java b/src/main/java/module-info.java
index c92bf149..a409b52d 100644
--- a/src/main/java/module-info.java
+++ b/src/main/java/module-info.java
@@ -1,7 +1,8 @@
/** @author Konrad Höffner */
module sniktag {
- exports eu.snik.tag.gui ;
- exports eu.snik.tag ;
+ opens eu.snik.tag.gui to javafx.graphics;
+ opens eu.snik.tag to javafx.base;
+ exports eu.snik.tag;
requires java.desktop;
requires org.docx4j.openxml_objects;
@@ -14,10 +15,11 @@
requires org.apache.commons.text;
requires transitive org.apache.jena.core;
requires org.apache.jena.base;
- requires org.apache.jena.iri;
+// requires org.apache.jena.iri;
requires org.apache.jena.arq;
+ //requires javafx.controls;
requires org.controlsfx.controls;
requires transitive org.eclipse.jetty.server;
- requires javafx.base;
- requires transitive javafx.controls;
+ //requires javafx.base;
+ //requires transitive javafx.controls;
}