Skip to content

Commit

Permalink
173, #174 - removed jfoenix
Browse files Browse the repository at this point in the history
  • Loading branch information
hohonuuli committed Jul 1, 2024
1 parent 27f0221 commit c4aaa01
Show file tree
Hide file tree
Showing 14 changed files with 71 additions and 42 deletions.
10 changes: 5 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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'
Expand Down
5 changes: 3 additions & 2 deletions org.mbari.vars.ui.demos/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ public void init() {
button.setText(null);
button.setGraphic(deleteIcon);
button.setDisable(true);
button.getStyleClass().add("cancel-button");

toolBox.getEventBus()
.toObserverable()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ public BorderPane getRoot() {
root = new BorderPane();
root.setCenter(getTabPane());
root.setRight(getControlPane());

}
return root;
}
Expand Down Expand Up @@ -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())
Expand All @@ -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 -> {
Expand All @@ -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 -> {
Expand Down Expand Up @@ -171,6 +175,7 @@ private TabPane getTabPane() {
private void loadTabsFromPreferences() {
Platform.runLater(() -> getTabPane().getTabs().clear());
Optional<Preferences> tabsPrefsOpt = getTabsPreferences();
lockProperty.set(true);
if (tabsPrefsOpt.isPresent()) {
Preferences tabsPrefs = tabsPrefsOpt.get();

Expand All @@ -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);
});
Expand Down Expand Up @@ -255,6 +260,8 @@ private void removeTab(Tab tab) {
}
}



private void addTab() {
User user = toolBox.getData().getUser();
if (user == null) {
Expand Down Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -70,7 +70,7 @@ public class VcrControlPaneController {
private Button ejectButton;

@FXML
private JFXSlider speedSlider;
private Slider speedSlider;


private Disposable stateDisposable;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")),
Expand Down
23 changes: 17 additions & 6 deletions org.mbari.vars.ui/src/main/resources/css/annotation.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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;
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>

<?import com.jfoenix.controls.JFXComboBox?>
<?import com.jfoenix.controls.JFXTextField?>

<?import javafx.scene.control.Label?>
<?import javafx.scene.layout.ColumnConstraints?>
<?import javafx.scene.layout.GridPane?>
<?import javafx.scene.layout.RowConstraints?>

<?import javafx.scene.control.TextField?>
<?import javafx.scene.control.ComboBox?>
<GridPane fx:id="root" hgap="10.0" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefWidth="500" vgap="10.0" xmlns="http://javafx.com/javafx/9" xmlns:fx="http://javafx.com/fxml/1" fx:controller="org.mbari.vars.ui.javafx.abpanel.AssocSelectionDialogController">
<columnConstraints>
<ColumnConstraints hgrow="NEVER" minWidth="40.0"/>
Expand All @@ -21,12 +22,12 @@
</rowConstraints>
<children>
<Label text="%abpane.selection" GridPane.rowIndex="1"/>
<JFXTextField fx:id="searchTextField" promptText="%abpane.search" GridPane.columnSpan="2"/>
<JFXComboBox fx:id="assocComboBox" GridPane.columnIndex="1" GridPane.hgrow="ALWAYS" GridPane.rowIndex="1"/>
<TextField fx:id="searchTextField" promptText="%abpane.search" GridPane.columnSpan="2"/>
<ComboBox fx:id="assocComboBox" GridPane.columnIndex="1" GridPane.hgrow="ALWAYS" GridPane.rowIndex="1"/>
<Label text="%abpane.toconcept" GridPane.rowIndex="2"/>
<JFXComboBox fx:id="toConceptComboBox" GridPane.columnIndex="1" GridPane.hgrow="ALWAYS" GridPane.rowIndex="2"/>
<ComboBox fx:id="toConceptComboBox" GridPane.columnIndex="1" GridPane.hgrow="ALWAYS" GridPane.rowIndex="2"/>
<Label text="%abpane.linkvalue" GridPane.rowIndex="3"/>
<JFXTextField fx:id="linkValueTextField" GridPane.columnIndex="1" GridPane.rowIndex="3"/>
<JFXTextField fx:id="nicknameTextField" promptText="%abpane.nickname" GridPane.columnSpan="2" GridPane.rowIndex="4"/>
<TextField fx:id="linkValueTextField" GridPane.columnIndex="1" GridPane.rowIndex="3"/>
<TextField fx:id="nicknameTextField" promptText="%abpane.nickname" GridPane.columnSpan="2" GridPane.rowIndex="4"/>
</children>
</GridPane>
16 changes: 8 additions & 8 deletions org.mbari.vars.ui/src/main/resources/fxml/DetailEditorPane.fxml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>

<?import com.jfoenix.controls.JFXComboBox?>
<?import com.jfoenix.controls.JFXTextField?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.layout.ColumnConstraints?>
<?import javafx.scene.layout.GridPane?>
<?import javafx.scene.layout.RowConstraints?>

<?import javafx.scene.control.ComboBox?>
<?import javafx.scene.control.TextField?>
<GridPane fx:id="root" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" xmlns="http://javafx.com/javafx/10.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="org.mbari.vars.ui.javafx.shared.DetailEditorPaneController">
<columnConstraints>
<ColumnConstraints fillWidth="false" hgrow="NEVER" />
Expand All @@ -31,17 +31,17 @@
<GridPane.margin>
<Insets right="5.0" />
</GridPane.margin></Label>
<JFXTextField fx:id="linkNameTextField" minWidth="400.0" GridPane.columnIndex="1">
<TextField fx:id="linkNameTextField" minWidth="400.0" GridPane.columnIndex="1">
<GridPane.margin>
<Insets bottom="5.0" />
</GridPane.margin></JFXTextField>
<JFXComboBox fx:id="toConceptComboBox" minWidth="400.0" GridPane.columnIndex="1" GridPane.rowIndex="1">
</GridPane.margin></TextField>
<ComboBox fx:id="toConceptComboBox" minWidth="400.0" GridPane.columnIndex="1" GridPane.rowIndex="1">
<GridPane.margin>
<Insets bottom="5.0" />
</GridPane.margin></JFXComboBox>
<JFXTextField fx:id="linkValueTextField" minWidth="400.0" GridPane.columnIndex="1" GridPane.rowIndex="2">
</GridPane.margin></ComboBox>
<TextField fx:id="linkValueTextField" minWidth="400.0" GridPane.columnIndex="1" GridPane.rowIndex="2">
<GridPane.margin>
<Insets bottom="5.0" />
</GridPane.margin></JFXTextField>
</GridPane.margin></TextField>
</children>
</GridPane>
4 changes: 2 additions & 2 deletions org.mbari.vars.ui/src/main/resources/fxml/VcrControlPane.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
<?import javafx.scene.control.Label?>
<?import javafx.scene.layout.AnchorPane?>

<?import javafx.scene.control.Slider?>
<?import javafx.scene.control.Button?>
<?import org.mbari.vars.ui.javafx.controls.JFXSlider?>
<?import javafx.scene.control.Slider?>
<AnchorPane fx:id="root" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="80.0" prefWidth="440.0" stylesheets="@../styles/vcr.css" xmlns="http://javafx.com/javafx/9" xmlns:fx="http://javafx.com/fxml/1" fx:controller="org.mbari.vars.ui.mediaplayers.vcr.VcrControlPaneController">
<children>
<Label styleClass="timecode" fx:id="timecodeLabel" layoutX="14.0" layoutY="10.0" prefHeight="17.0" prefWidth="166.0" text="--:--:--:--" />
Expand All @@ -18,6 +18,6 @@
<Button fx:id="stopButton" layoutX="308.0" layoutY="40.0" />
<Button fx:id="rewindButton" layoutX="249.0" layoutY="40.0" />
<Button fx:id="ejectButton" layoutX="190.0" layoutY="40.0" />
<JFXSlider fx:id="speedSlider" layoutX="14.0" layoutY="46.0" max="255.0" prefHeight="16.0" prefWidth="166.0" showTickLabels="true" showTickMarks="true" />
<Slider fx:id="speedSlider" layoutX="14.0" layoutY="46.0" max="255.0" prefHeight="16.0" prefWidth="166.0" showTickLabels="true" showTickMarks="true" />
</children>
</AnchorPane>

0 comments on commit c4aaa01

Please sign in to comment.