diff --git a/build.gradle b/build.gradle index 21b2084f..f8cf019a 100644 --- a/build.gradle +++ b/build.gradle @@ -65,18 +65,18 @@ subprojects { implementation 'com.fatboyindustrial.gson-javatime-serialisers:gson-javatime-serialisers:1.1.2' implementation 'com.github.ben-manes.caffeine:caffeine:3.1.8' implementation 'com.github.mizosoft.methanol:methanol:1.7.0' - implementation 'com.google.code.gson:gson:2.10.1' + implementation 'com.google.code.gson:gson:2.11.0' implementation 'com.google.inject:guice:7.0.0' implementation 'com.jfoenix:jfoenix:9.0.10' implementation 'com.squareup.okhttp3:logging-interceptor:3.14.4' - implementation 'com.squareup.retrofit2:converter-gson:2.9.0' - implementation 'com.squareup.retrofit2:retrofit:2.9.0' + implementation 'com.squareup.retrofit2:converter-gson:2.11.0' + implementation 'com.squareup.retrofit2:retrofit:2.11.0' implementation 'com.typesafe:config:1.4.3' implementation 'de.jensd:fontawesomefx-commons:11.0' implementation 'de.jensd:fontawesomefx-materialicons:2.2.0-11' implementation 'eu.hansolo:Medusa:16.0.0' //1.7 implementation 'io.reactivex.rxjava3:rxjava:3.1.8' - implementation 'jakarta.activation:jakarta.activation-api:2.1.2' + implementation 'jakarta.activation:jakarta.activation-api:2.1.3' implementation 'javax.inject:javax.inject:1' implementation 'javax.servlet:javax.servlet-api:4.0.1' implementation 'org.controlsfx:controlsfx:11.2.1' @@ -90,7 +90,7 @@ subprojects { implementation 'org.mbari.vcr4j:vcr4j-remote:5.3.0' // implementation 'org.mbari.vcr4j:vcr4j-sharktopoda-client:5.3.0' // implementation 'org.mbari.vcr4j:vcr4j-sharktopoda:5.3.0' - implementation 'org.mbari:mbarix4j:2.0.5.jre11' + implementation 'org.mbari:mbarix4j:2.0.7' implementation 'org.slf4j:slf4j-api:2.0.12' implementation 'org.slf4j:slf4j-jdk14:2.0.12' implementation 'org.slf4j:slf4j-jdk-platform-logging:2.0.12' diff --git a/org.mbari.vars.ui.demos/build.gradle b/org.mbari.vars.ui.demos/build.gradle index 44626cfd..44a2635d 100644 --- a/org.mbari.vars.ui.demos/build.gradle +++ b/org.mbari.vars.ui.demos/build.gradle @@ -8,6 +8,7 @@ dependencies { implementation project(':org.mbari.vars.core') + implementation 'com.google.code.gson:gson' implementation 'com.google.inject:guice' implementation 'com.jfoenix:jfoenix' implementation 'com.typesafe:config' @@ -17,8 +18,8 @@ dependencies { implementation 'org.kordamp.ikonli:ikonli-material-pack' implementation 'org.mbari:mbarix4j' implementation 'org.mbari.vcr4j:vcr4j-core' - implementation 'org.mbari.vcr4j:vcr4j-sharktopoda' - implementation 'org.mbari.vcr4j:vcr4j-sharktopoda-client' +// implementation 'org.mbari.vcr4j:vcr4j-sharktopoda' +// implementation 'org.mbari.vcr4j:vcr4j-sharktopoda-client' implementation 'org.slf4j:slf4j-api' implementation('eu.hansolo:Medusa') { diff --git a/org.mbari.vars.ui.demos/src/main/java/org/mbari/vars/ui/demos/mediaplayers/sharktopoda/SharktopodaControlPaneDemo.java b/org.mbari.vars.ui.demos/src/main/java/org/mbari/vars/ui/demos/mediaplayers/sharktopoda/SharktopodaControlPaneDemo.java index 3acf54a6..547fa2ea 100644 --- a/org.mbari.vars.ui.demos/src/main/java/org/mbari/vars/ui/demos/mediaplayers/sharktopoda/SharktopodaControlPaneDemo.java +++ b/org.mbari.vars.ui.demos/src/main/java/org/mbari/vars/ui/demos/mediaplayers/sharktopoda/SharktopodaControlPaneDemo.java @@ -6,7 +6,7 @@ import javafx.scene.layout.Pane; import javafx.stage.Stage; import org.mbari.vars.ui.Initializer; -import org.mbari.vars.ui.mediaplayers.sharktopoda.SharktoptodaControlPane; +//import org.mbari.vars.ui.mediaplayers.sharktopoda.SharktoptodaControlPane; /** * @author Brian Schlining @@ -20,13 +20,13 @@ public static void main(String[] args) { @Override public void start(Stage primaryStage) throws Exception { - Pane pane = new SharktoptodaControlPane(Initializer.getToolBox()); - Scene scene = new Scene(pane); - primaryStage.setScene(scene); - primaryStage.setOnCloseRequest(e -> { - Platform.exit(); - System.exit(0); - }); +// Pane pane = new SharktoptodaControlPane(Initializer.getToolBox()); +// Scene scene = new Scene(pane); +// primaryStage.setScene(scene); +// primaryStage.setOnCloseRequest(e -> { +// Platform.exit(); +// System.exit(0); +// }); primaryStage.show(); } } diff --git a/org.mbari.vars.ui/src/main/java/org/mbari/vars/ui/javafx/buttons/DeleteSelectedAnnotationsBC.java b/org.mbari.vars.ui/src/main/java/org/mbari/vars/ui/javafx/buttons/DeleteSelectedAnnotationsBC.java index eb7d0e7e..76d7b89b 100644 --- a/org.mbari.vars.ui/src/main/java/org/mbari/vars/ui/javafx/buttons/DeleteSelectedAnnotationsBC.java +++ b/org.mbari.vars.ui/src/main/java/org/mbari/vars/ui/javafx/buttons/DeleteSelectedAnnotationsBC.java @@ -52,6 +52,7 @@ public void init() { button.setText(null); button.setGraphic(deleteIcon); button.setDisable(true); + button.getStyleClass().add("cancel-button"); toolBox.getEventBus() .toObserverable() diff --git a/org.mbari.vars.ui/src/main/java/org/mbari/vars/ui/javafx/cbpanel/ConceptButtonPanesController.java b/org.mbari.vars.ui/src/main/java/org/mbari/vars/ui/javafx/cbpanel/ConceptButtonPanesController.java index 0af95847..37747b61 100644 --- a/org.mbari.vars.ui/src/main/java/org/mbari/vars/ui/javafx/cbpanel/ConceptButtonPanesController.java +++ b/org.mbari.vars.ui/src/main/java/org/mbari/vars/ui/javafx/cbpanel/ConceptButtonPanesController.java @@ -71,6 +71,7 @@ public BorderPane getRoot() { root = new BorderPane(); root.setCenter(getTabPane()); root.setRight(getControlPane()); + } return root; } @@ -113,6 +114,7 @@ private VBox getControlPane() { // The Panes created by ConceptButtonPaneController contain the controller as UserData getTabPane().getTabs() .stream() + .peek(tab -> tab.setClosable(false)) .map(Tab::getContent) .filter(n -> n.getUserData() instanceof ConceptButtonPaneController) .map(n -> (ConceptButtonPaneController) n.getUserData()) @@ -124,6 +126,7 @@ private VBox getControlPane() { Text overviewIcon = Icons.VIEW_COLUMN.standardSize(); String overviewLabel = i18n.getString("cppanel.tabpane.overview.label"); Tab overviewTab = new Tab(overviewLabel, new ScrollPane(overviewController.getRoot())); + overviewTab.setClosable(false); overviewButton.setGraphic(overviewIcon); overviewButton.setTooltip(new Tooltip(i18n.getString("cppanel.tabpane.overview.tooltip"))); overviewButton.setOnAction(e -> { @@ -141,6 +144,7 @@ private VBox getControlPane() { Text timelineIcon = Icons.TIMELINE.standardSize(); String timelineLabel = i18n.getString("cppanel.tabpane.timeline.label"); Tab timelineTab = new Tab(timelineLabel, timelineController.getRoot()); + timelineTab.setClosable(false); timelineButton.setGraphic(timelineIcon); timelineButton.setTooltip(new Tooltip(i18n.getString("cppanel.tabpane.timeline.tooltip"))); timelineButton.setOnAction(e -> { @@ -171,6 +175,7 @@ private TabPane getTabPane() { private void loadTabsFromPreferences() { Platform.runLater(() -> getTabPane().getTabs().clear()); Optional tabsPrefsOpt = getTabsPreferences(); + lockProperty.set(true); if (tabsPrefsOpt.isPresent()) { Preferences tabsPrefs = tabsPrefsOpt.get(); @@ -185,7 +190,7 @@ private void loadTabsFromPreferences() { toolBox, tabsPrefs.node(tabName)); controller.setLocked(lockProperty.get()); Tab tab = new Tab(name, controller.getPane()); - tab.setClosable(true); + tab.setClosable(false); tab.setOnClosed(e -> removeTab(tab)); getTabPane().getTabs().add(tab); }); @@ -255,6 +260,8 @@ private void removeTab(Tab tab) { } } + + private void addTab() { User user = toolBox.getData().getUser(); if (user == null) { @@ -308,7 +315,7 @@ private void addTab() { newTabPrefs); dropPanel.setLocked(lockProperty.get()); Tab tab = new Tab(tabName, dropPanel.getPane()); - tab.setClosable(true); + tab.setClosable(false); tab.setOnClosed(e -> removeTab(tab)); getTabPane().getTabs().add(tab); getTabPane().getSelectionModel().select(tab); diff --git a/org.mbari.vars.ui/src/main/java/org/mbari/vars/ui/javafx/prefs/PreferencesPaneController.java b/org.mbari.vars.ui/src/main/java/org/mbari/vars/ui/javafx/prefs/PreferencesPaneController.java index c0cfcac7..09ec9611 100644 --- a/org.mbari.vars.ui/src/main/java/org/mbari/vars/ui/javafx/prefs/PreferencesPaneController.java +++ b/org.mbari.vars.ui/src/main/java/org/mbari/vars/ui/javafx/prefs/PreferencesPaneController.java @@ -1,5 +1,6 @@ package org.mbari.vars.ui.javafx.prefs; +import javafx.geometry.Insets; import javafx.scene.control.Tab; import javafx.scene.control.TabPane; import org.mbari.vars.ui.UIToolBox; @@ -44,6 +45,7 @@ private void addTab(SettingsPane controller) { tab.setClosable(false); tab.setContent(controller.getPane()); root.getTabs().add(tab); + controller.getPane().setPadding(new Insets(20)); prefs.add(controller); } diff --git a/org.mbari.vars.ui/src/main/java/org/mbari/vars/ui/javafx/roweditor/AnnotationEditorPaneController.java b/org.mbari.vars.ui/src/main/java/org/mbari/vars/ui/javafx/roweditor/AnnotationEditorPaneController.java index 43e39682..ff9c1de2 100644 --- a/org.mbari.vars.ui/src/main/java/org/mbari/vars/ui/javafx/roweditor/AnnotationEditorPaneController.java +++ b/org.mbari.vars.ui/src/main/java/org/mbari/vars/ui/javafx/roweditor/AnnotationEditorPaneController.java @@ -111,6 +111,7 @@ void initialize() { removeButton.setText(null); removeButton.setGraphic(deleteIcon); removeButton.setDisable(true); + removeButton.getStyleClass().add("cancel-button"); removeButton.defaultButtonProperty().bind(removeButton.focusedProperty()); // Enter triggers button Text editIcon = Icons.EDIT.standardSize(); @@ -125,6 +126,7 @@ void initialize() { addButton.setText(null); addButton.setGraphic(addIcon); addButton.setDisable(true); + addButton.getStyleClass().add("ok-button"); addButton.defaultButtonProperty().bind(addButton.focusedProperty()); // Enter triggers button // Enable buttons based on state diff --git a/org.mbari.vars.ui/src/main/java/org/mbari/vars/ui/javafx/roweditor/AssociationEditorPaneController.java b/org.mbari.vars.ui/src/main/java/org/mbari/vars/ui/javafx/roweditor/AssociationEditorPaneController.java index 2aeefb4b..7ee9c4c4 100644 --- a/org.mbari.vars.ui/src/main/java/org/mbari/vars/ui/javafx/roweditor/AssociationEditorPaneController.java +++ b/org.mbari.vars.ui/src/main/java/org/mbari/vars/ui/javafx/roweditor/AssociationEditorPaneController.java @@ -149,10 +149,12 @@ void initialize() { Text addIcon = Icons.ADD.standardSize(); addButton.setText(null); addButton.setGraphic(addIcon); + addButton.getStyleClass().add("ok-button"); //addButton.defaultButtonProperty().bind(addButton.focusedProperty()); // Enter triggers button Text cancelIcon = Icons.CANCEL.standardSize(); cancelButton.setText(null); cancelButton.setGraphic(cancelIcon); + cancelButton.getStyleClass().add("cancel-button"); //cancelButton.defaultButtonProperty().bind(cancelButton.focusedProperty()); // Enter triggers button linkNameTextField.setDisable(true); diff --git a/org.mbari.vars.ui/src/main/java/org/mbari/vars/ui/mediaplayers/vcr/VcrControlPaneController.java b/org.mbari.vars.ui/src/main/java/org/mbari/vars/ui/mediaplayers/vcr/VcrControlPaneController.java index c908b782..2a96fcc7 100644 --- a/org.mbari.vars.ui/src/main/java/org/mbari/vars/ui/mediaplayers/vcr/VcrControlPaneController.java +++ b/org.mbari.vars.ui/src/main/java/org/mbari/vars/ui/mediaplayers/vcr/VcrControlPaneController.java @@ -14,10 +14,10 @@ import javafx.fxml.FXMLLoader; import javafx.scene.control.Button; import javafx.scene.control.Label; +import javafx.scene.control.Slider; import javafx.scene.layout.AnchorPane; import javafx.scene.text.Text; import org.mbari.vars.ui.javafx.Icons; -import org.mbari.vars.ui.javafx.controls.JFXSlider; import org.mbari.vcr4j.VideoController; import org.mbari.vcr4j.VideoError; import org.mbari.vcr4j.VideoState; @@ -70,7 +70,7 @@ public class VcrControlPaneController { private Button ejectButton; @FXML - private JFXSlider speedSlider; + private Slider speedSlider; private Disposable stateDisposable; diff --git a/org.mbari.vars.ui/src/main/java/org/mbari/vars/ui/swing/annotable/Colors.java b/org.mbari.vars.ui/src/main/java/org/mbari/vars/ui/swing/annotable/Colors.java index 219e018b..4f9015bd 100644 --- a/org.mbari.vars.ui/src/main/java/org/mbari/vars/ui/swing/annotable/Colors.java +++ b/org.mbari.vars.ui/src/main/java/org/mbari/vars/ui/swing/annotable/Colors.java @@ -5,6 +5,8 @@ public enum Colors { ATTENTION(Color.decode("#FFB74D")), + ACTION_ADD(Color.decode("#00AB5F")), + ACTION_DELETE(Color.decode("#D32F2F")), CONCURRENT(Color.decode("#FDD835")), DEFAULT(Color.decode("#2b3940")), DEFAULT_DARKER(Color.decode("#222d33")), diff --git a/org.mbari.vars.ui/src/main/resources/css/annotation.css b/org.mbari.vars.ui/src/main/resources/css/annotation.css index 3cd2df11..fe6e91ed 100644 --- a/org.mbari.vars.ui/src/main/resources/css/annotation.css +++ b/org.mbari.vars.ui/src/main/resources/css/annotation.css @@ -16,8 +16,8 @@ -selected-color: #F0544C; -selected-text: #FFFFFF; - -cancel-color: #FF6663; - -accept-color: #DDF093; + -cancel-color: #C92A2A; + -accept-color: #2B8A3E; -fx-base: -default-color; -fx-background: -default-color; @@ -79,6 +79,11 @@ -fx-border-color: -default-color; -fx-border-radius: 1; } +.check-box { + -fx-background-color: -default-color; + -fx-text-fill: -default-text; +} + .combo-box { -fx-background-color: -default-color; -fx-text-fill: -default-text; @@ -243,6 +248,9 @@ -fx-background-radius: 0; -fx-background-color: -default-color; -fx-border-width: 2px; + -fx-font-size: 16px; + -fx-border-color: -default-color -default-color -default-color -default-color; + -fx-border-radius: 2; } .tab:hover { -fx-background-color: -hover-color; @@ -252,6 +260,7 @@ -fx-background-color: -default-color; -fx-border-color: -selected-color -selected-color -default-color -selected-color; -fx-border-radius: 2; + -fx-text-fill: -selected-text; } .tab-close-button { -fx-background-color: -default-text; @@ -392,10 +401,12 @@ -fx-fill: -default-color; } -.ok-button { - -fx-text-fill: -accept-color; +.ok-button:hover { + /*-fx-text-fill: -accept-color;*/ + -fx-background-color: -accept-color; } -.cancel-button { - -fx-text-fill: -cancel-color; +.cancel-button:hover { + /*-fx-text-fill: -cancel-color;*/ + -fx-background-color: -cancel-color; } diff --git a/org.mbari.vars.ui/src/main/resources/fxml/AssociationSelectionPane.fxml b/org.mbari.vars.ui/src/main/resources/fxml/AssociationSelectionPane.fxml index 8d9dfeb5..1c48ac7e 100644 --- a/org.mbari.vars.ui/src/main/resources/fxml/AssociationSelectionPane.fxml +++ b/org.mbari.vars.ui/src/main/resources/fxml/AssociationSelectionPane.fxml @@ -1,12 +1,13 @@ - - + + + @@ -21,12 +22,12 @@ diff --git a/org.mbari.vars.ui/src/main/resources/fxml/DetailEditorPane.fxml b/org.mbari.vars.ui/src/main/resources/fxml/DetailEditorPane.fxml index e5f94a4d..b47a4133 100644 --- a/org.mbari.vars.ui/src/main/resources/fxml/DetailEditorPane.fxml +++ b/org.mbari.vars.ui/src/main/resources/fxml/DetailEditorPane.fxml @@ -1,13 +1,13 @@ - - + + @@ -31,17 +31,17 @@ - + - - + + - - + + - + diff --git a/org.mbari.vars.ui/src/main/resources/fxml/VcrControlPane.fxml b/org.mbari.vars.ui/src/main/resources/fxml/VcrControlPane.fxml index d7b27866..445b440f 100644 --- a/org.mbari.vars.ui/src/main/resources/fxml/VcrControlPane.fxml +++ b/org.mbari.vars.ui/src/main/resources/fxml/VcrControlPane.fxml @@ -4,9 +4,9 @@ - +