server
Clone or download
Modified Files
--- 'a/pom.xml'
+++ b/pom.xml
@@ -14,7 +14,7 @@
<maven.compiler.target>11</maven.compiler.target>
- <client.plugin.version>0.1.35</client.plugin.version>
+ <client.plugin.version>0.1.36</client.plugin.version>
<JavaFXVersion>16-ea+6</JavaFXVersion>
@@ -133,13 +133,16 @@
<artifactId>client-maven-plugin</artifactId>
<version>${client.plugin.version}</version>
<configuration>
+ <nativeImageArgs>
+ <list>--initialize-at-build-time=com.sun.org.apache.xml.internal.serializer.ToXMLStream</list>
+ <!--list>-Dsvm.targetName=android</list-->
+ </nativeImageArgs>
<bundlesList>
<list>com.sun.org.apache.xerces.internal.impl.msg.XMLMessages</list>
</bundlesList>
<reflectionList>
<list>java.util.logging.FileHandler</list>
</reflectionList>
- <nativeImageArgs>--report-unsupported-elements-at-runtime,--initialize-at-build-time=com.sun.org.apache.xml.internal.serializer.ToXMLStream,-Dsvm.targetname=android,--enable-https,--enable-http,-H:Log=registerResource</nativeImageArgs>
<mainClass>${MainClassName}</mainClass>
</configuration>
</plugin>
--- /dev/null
+++ b/src/main/java/com/stream_pi/server/window/dashboard/ClientAndProfileSelectorPane.java
@@ -0,0 +1,166 @@
+package com.stream_pi.server.window.dashboard;
+
+import com.stream_pi.server.client.Client;
+import com.stream_pi.server.client.ClientProfile;
+import com.stream_pi.server.connection.ClientConnection;
+import com.stream_pi.server.connection.ClientConnections;
+import javafx.collections.FXCollections;
+import javafx.geometry.Insets;
+import javafx.scene.CacheHint;
+import javafx.scene.control.*;
+import javafx.scene.layout.HBox;
+import javafx.scene.layout.Priority;
+import javafx.scene.layout.VBox;
+import javafx.util.Callback;
+
+public class ClientAndProfileSelectorPane extends HBox {
+
+ private DashboardInterface dashboard;
+
+ public ClientAndProfileSelectorPane(DashboardInterface dashboard)
+ {
+ this.dashboard = dashboard;
+
+ VBox.setVgrow(this, Priority.NEVER);
+ getStyleClass().add("client_and_profile_selector_pane");
+ setPadding(new Insets(10));
+ setMinHeight(90);
+
+ initUI();
+ loadData();
+
+ setCache(true);
+ setCacheHint(CacheHint.SPEED);
+ }
+
+ private ComboBox<ClientConnection> clientsComboBox;
+ private Label noClientsConnectedLabel;
+ private ComboBox<ClientProfile> clientProfilesComboBox;
+
+
+ public void initUI()
+ {
+ noClientsConnectedLabel = new Label("No Clients Connected");
+ noClientsConnectedLabel.getStyleClass().add("client_and_profile_selector_pane_no_clients_connected_label");
+ noClientsConnectedLabel.managedProperty().bind(noClientsConnectedLabel.visibleProperty());
+
+ clientsComboBox = new ComboBox<>();
+ clientsComboBox.getStyleClass().add("client_and_profile_selector_pane_client_selector_combo_box");
+ clientsComboBox.setPromptText("Choose client");
+
+ clientsComboBox.valueProperty().addListener((observableValue, oldVal, newVal) -> {
+ if(oldVal!=newVal && newVal!=null)
+ {
+ dashboard.newSelectedClientConnection(newVal);
+ clientProfilesComboBox.setItems(FXCollections.observableArrayList(newVal.getClient().getAllClientProfiles()));
+ clientProfilesComboBox.setVisible(true);
+ }
+ });
+
+ clientsComboBox.managedProperty().bind(clientsComboBox.visibleProperty());
+
+
+ Callback<ListView<ClientConnection>, ListCell<ClientConnection>> clientsComboBoxFactory = new Callback<>() {
+ @Override
+ public ListCell<ClientConnection> call(ListView<ClientConnection> clientConnectionListView) {
+
+ return new ListCell<>() {
+ @Override
+ protected void updateItem(ClientConnection clientConnection, boolean b) {
+ super.updateItem(clientConnection, b);
+
+ if(clientConnection == null)
+ {
+ setText("Choose client");
+ }
+ else
+ {
+ Client client = clientConnection.getClient();
+ setText(client.getNickName());
+ }
+ }
+ };
+ }
+ };
+ clientsComboBox.setCellFactory(clientsComboBoxFactory);
+ clientsComboBox.setButtonCell(clientsComboBoxFactory.call(null));
+
+
+
+ clientProfilesComboBox = new ComboBox<>();
+ clientProfilesComboBox.getStyleClass().add("client_and_profile_selector_pane_profile_selector_combo_box");
+ clientProfilesComboBox.setPromptText("Choose Profile");
+ clientProfilesComboBox.valueProperty().addListener((observableValue, oldVal, newVal) -> {
+ if(oldVal!=newVal && newVal!=null)
+ {
+ dashboard.newSelectedClientProfile(newVal);
+ }
+ });
+
+
+ clientProfilesComboBox.managedProperty().bind(clientProfilesComboBox.visibleProperty());
+ Callback<ListView<ClientProfile>, ListCell<ClientProfile>> clientProfilesComboBoxFactory = new Callback<ListView<ClientProfile>, ListCell<ClientProfile>>() {
+ @Override
+ public ListCell<ClientProfile> call(ListView<ClientProfile> clientProfileListView) {
+ return new ListCell<>()
+ {
+ @Override
+ protected void updateItem(ClientProfile profile, boolean b) {
+ super.updateItem(profile, b);
+
+ if(profile == null)
+ {
+ setText("Choose Profile");
+ }
+ else
+ {
+ setText(profile.getName());
+ }
+ }
+ };
+ }
+ };
+ clientProfilesComboBox.setCellFactory(clientProfilesComboBoxFactory);
+ clientProfilesComboBox.setButtonCell(clientProfilesComboBoxFactory.call(null));
+
+ VBox stack = new VBox(noClientsConnectedLabel, clientsComboBox, clientProfilesComboBox);
+ stack.getStyleClass().add("client_and_profile_selector_pane_stack");
+
+ getChildren().addAll(stack);
+
+ }
+
+
+ private void loadData()
+ {
+ clientsComboBox.getSelectionModel().clearSelection();
+ clientProfilesComboBox.getSelectionModel().clearSelection();
+
+ if(ClientConnections.getInstance().getConnections().size() == 0)
+ {
+ noClientsConnectedLabel.setVisible(true);
+
+ clientsComboBox.setVisible(false);
+
+ clientProfilesComboBox.setVisible(false);
+
+
+ dashboard.newSelectedClientConnection(null);
+
+ }
+ else
+ {
+ noClientsConnectedLabel.setVisible(false);
+
+ clientsComboBox.setVisible(true);
+ clientProfilesComboBox.setVisible(false);
+
+ clientsComboBox.setItems(FXCollections.observableArrayList(ClientConnections.getInstance().getConnections()));
+ }
+ }
+
+ public void refresh()
+ {
+ loadData();
+ }
+}
--- 'a/src/main/java/com/stream_pi/server/window/dashboard/ClientDetailsPane.java'
+++ /dev/null
@@ -1,163 +0,0 @@
-package com.stream_pi.server.window.dashboard;
-
-import com.stream_pi.server.client.Client;
-import com.stream_pi.server.client.ClientProfile;
-import com.stream_pi.server.connection.ClientConnection;
-import com.stream_pi.server.connection.ClientConnections;
-import javafx.collections.FXCollections;
-import javafx.geometry.Insets;
-import javafx.scene.CacheHint;
-import javafx.scene.control.*;
-import javafx.scene.layout.HBox;
-import javafx.scene.layout.Priority;
-import javafx.scene.layout.VBox;
-import javafx.util.Callback;
-
-public class ClientDetailsPane extends HBox {
-
- private DashboardInterface dashboard;
-
- public ClientDetailsPane(DashboardInterface dashboard)
- {
- this.dashboard = dashboard;
-
- VBox.setVgrow(this, Priority.NEVER);
- getStyleClass().add("client_details_pane");
- setPadding(new Insets(10));
- setMinHeight(90);
-
- initUI();
- loadData();
-
- setCache(true);
- setCacheHint(CacheHint.SPEED);
- }
-
- private ComboBox<ClientConnection> clientsComboBox;
- private Label noClientsConnectedLabel;
- private ComboBox<ClientProfile> clientProfilesComboBox;
-
-
- public void initUI()
- {
- noClientsConnectedLabel = new Label("No Clients Connected");
- noClientsConnectedLabel.managedProperty().bind(noClientsConnectedLabel.visibleProperty());
-
- clientsComboBox = new ComboBox<>();
- clientsComboBox.setPromptText("Choose client");
-
- clientsComboBox.valueProperty().addListener((observableValue, oldVal, newVal) -> {
- if(oldVal!=newVal && newVal!=null)
- {
- dashboard.newSelectedClientConnection(newVal);
- clientProfilesComboBox.setItems(FXCollections.observableArrayList(newVal.getClient().getAllClientProfiles()));
- clientProfilesComboBox.setVisible(true);
- }
- });
-
- clientsComboBox.managedProperty().bind(clientsComboBox.visibleProperty());
-
-
- Callback<ListView<ClientConnection>, ListCell<ClientConnection>> clientsComboBoxFactory = new Callback<>() {
- @Override
- public ListCell<ClientConnection> call(ListView<ClientConnection> clientConnectionListView) {
-
- return new ListCell<>() {
- @Override
- protected void updateItem(ClientConnection clientConnection, boolean b) {
- super.updateItem(clientConnection, b);
-
- if(clientConnection == null)
- {
- setText("Choose client");
- }
- else
- {
- Client client = clientConnection.getClient();
- setText(client.getNickName());
- }
- }
- };
- }
- };
- clientsComboBox.setCellFactory(clientsComboBoxFactory);
- clientsComboBox.setButtonCell(clientsComboBoxFactory.call(null));
-
-
-
- clientProfilesComboBox = new ComboBox<>();
- clientProfilesComboBox.setPromptText("Choose Profile");
- clientProfilesComboBox.valueProperty().addListener((observableValue, oldVal, newVal) -> {
- if(oldVal!=newVal && newVal!=null)
- {
- dashboard.newSelectedClientProfile(newVal);
- }
- });
-
-
- clientProfilesComboBox.managedProperty().bind(clientProfilesComboBox.visibleProperty());
- Callback<ListView<ClientProfile>, ListCell<ClientProfile>> clientProfilesComboBoxFactory = new Callback<ListView<ClientProfile>, ListCell<ClientProfile>>() {
- @Override
- public ListCell<ClientProfile> call(ListView<ClientProfile> clientProfileListView) {
- return new ListCell<>()
- {
- @Override
- protected void updateItem(ClientProfile profile, boolean b) {
- super.updateItem(profile, b);
-
- if(profile == null)
- {
- setText("Choose Profile");
- }
- else
- {
- setText(profile.getName());
- }
- }
- };
- }
- };
- clientProfilesComboBox.setCellFactory(clientProfilesComboBoxFactory);
- clientProfilesComboBox.setButtonCell(clientProfilesComboBoxFactory.call(null));
-
- VBox stack = new VBox(noClientsConnectedLabel, clientsComboBox, clientProfilesComboBox);
- stack.setSpacing(10);
-
- getChildren().addAll(stack);
-
- }
-
-
- private void loadData()
- {
- clientsComboBox.getSelectionModel().clearSelection();
- clientProfilesComboBox.getSelectionModel().clearSelection();
-
- if(ClientConnections.getInstance().getConnections().size() == 0)
- {
- noClientsConnectedLabel.setVisible(true);
-
- clientsComboBox.setVisible(false);
-
- clientProfilesComboBox.setVisible(false);
-
-
- dashboard.newSelectedClientConnection(null);
-
- }
- else
- {
- noClientsConnectedLabel.setVisible(false);
-
- clientsComboBox.setVisible(true);
- clientProfilesComboBox.setVisible(false);
-
- clientsComboBox.setItems(FXCollections.observableArrayList(ClientConnections.getInstance().getConnections()));
- }
- }
-
- public void refresh()
- {
- loadData();
- }
-}
--- 'a/src/main/java/com/stream_pi/server/window/dashboard/DashboardBase.java'
+++ b/src/main/java/com/stream_pi/server/window/dashboard/DashboardBase.java
@@ -35,7 +35,7 @@ public class DashboardBase extends HBox
setPluginsPane(new PluginsPane(hostServices));
- setClientDetailsPane(new ClientDetailsPane(this));
+ setClientDetailsPane(new ClientAndProfileSelectorPane(this));
setActionGridPane(new ActionGridPane(exceptionAndAlertHandler));
@@ -57,15 +57,15 @@ public class DashboardBase extends HBox
return pluginsPane;
}
- private ClientDetailsPane clientDetailsPane;
- private void setClientDetailsPane(ClientDetailsPane clientDetailsPane)
+ private ClientAndProfileSelectorPane clientAndProfileSelectorPane;
+ private void setClientDetailsPane(ClientAndProfileSelectorPane clientAndProfileSelectorPane)
{
- this.clientDetailsPane = clientDetailsPane;
- leftPane.getChildren().add(this.clientDetailsPane);
+ this.clientAndProfileSelectorPane = clientAndProfileSelectorPane;
+ leftPane.getChildren().add(this.clientAndProfileSelectorPane);
}
- public ClientDetailsPane getClientDetailsPane()
+ public ClientAndProfileSelectorPane getClientDetailsPane()
{
- return clientDetailsPane;
+ return clientAndProfileSelectorPane;
}
private ActionGridPane actionGridPane;
--- 'a/src/main/java/com/stream_pi/server/window/dashboard/PluginsPane.java'
+++ b/src/main/java/com/stream_pi/server/window/dashboard/PluginsPane.java
@@ -9,6 +9,7 @@ import com.stream_pi.actionapi.otheracti
import com.stream_pi.actionapi.otheractions.FolderAction;
import com.stream_pi.server.action.NormalActionPlugins;
+import com.stream_pi.util.uihelper.SpaceFiller;
import javafx.application.HostServices;
import javafx.geometry.Insets;
import javafx.geometry.Pos;
@@ -35,8 +36,6 @@ public class PluginsPane extends VBox {
getStyleClass().add("plugins_pane");
setPadding(new Insets(10));
- setSpacing(10.0);
-
this.hostServices = hostServices;
initUI();
@@ -47,21 +46,23 @@ public class PluginsPane extends VBox {
public void initUI()
{
pluginsAccordion = new Accordion();
+ pluginsAccordion.getStyleClass().add("plugins_pane_accordion");
pluginsAccordion.setCache(true);
-
- Region r = new Region();
- VBox.setVgrow(r, Priority.ALWAYS);
-
settingsButton = new Button();
+ settingsButton.getStyleClass().add("plugins_pane_settings_button");
FontIcon cog = new FontIcon("fas-cog");
settingsButton.setGraphic(cog);
HBox settingsHBox = new HBox(settingsButton);
+ settingsHBox.getStyleClass().add("plugins_pane_settings_button_parent");
settingsHBox.setAlignment(Pos.CENTER_RIGHT);
- getChildren().addAll(new Label("Plugins"), pluginsAccordion, r, settingsHBox);
+ Label pluginsLabel = new Label("Plugins");
+ pluginsLabel.getStyleClass().add("plugins_pane_top_label");
+
+ getChildren().addAll(pluginsLabel, pluginsAccordion, new SpaceFiller(SpaceFiller.FillerType.VBox), settingsHBox);
}
public Button getSettingsButton()
@@ -81,16 +82,17 @@ public class PluginsPane extends VBox {
for(String eachCategory : sortedPlugins.keySet())
{
VBox vBox = new VBox();
- vBox.setSpacing(5);
-
+ vBox.getStyleClass().add("plugins_pane_each_plugin_box_parent");
TitledPane pane = new TitledPane(eachCategory, vBox);
+ pane.getStyleClass().add("plugins_pane_each_plugin_category_titled_pane");
for(NormalAction eachAction : sortedPlugins.get(eachCategory))
{
if(!eachAction.isVisibleInPluginsPane())
continue;
Button eachNormalActionPluginButton = new Button();
+ eachNormalActionPluginButton.getStyleClass().add("plugins_pane_each_plugin_button");
HBox.setHgrow(eachNormalActionPluginButton, Priority.ALWAYS);
eachNormalActionPluginButton.setMaxWidth(Double.MAX_VALUE);
eachNormalActionPluginButton.setAlignment(Pos.CENTER_LEFT);
@@ -100,7 +102,7 @@ public class PluginsPane extends VBox {
if(graphic == null)
{
FontIcon cogs = new FontIcon("fas-cogs");
- cogs.getStyleClass().add("dashboard_plugins_pane_action_icon");
+ cogs.getStyleClass().add("plugins_pane_each_plugin_button_icon");
eachNormalActionPluginButton.setGraphic(cogs);
}
else
@@ -108,12 +110,13 @@ public class PluginsPane extends VBox {
if(graphic instanceof FontIcon)
{
FontIcon fi = (FontIcon) graphic;
+ fi.getStyleClass().add("plugins_pane_each_plugin_button_icon");
eachNormalActionPluginButton.setGraphic(fi);
}
else if(graphic instanceof ImageView)
{
ImageView iv = (ImageView) graphic;
- iv.getStyleClass().add("dashboard_plugins_pane_action_icon_imageview");
+ iv.getStyleClass().add("plugins_pane_each_plugin_button_imageview");
iv.setPreserveRatio(false);
eachNormalActionPluginButton.setGraphic(iv);
}
@@ -136,7 +139,7 @@ public class PluginsPane extends VBox {
HBox hBox = new HBox(eachNormalActionPluginButton);
- hBox.setSpacing(5.0);
+ hBox.getStyleClass().add("plugins_pane_each_plugin_box");
hBox.setAlignment(Pos.TOP_LEFT);
HBox.setHgrow(eachNormalActionPluginButton, Priority.ALWAYS);
@@ -204,8 +207,10 @@ public class PluginsPane extends VBox {
public void loadOtherActions()
{
VBox vBox = new VBox();
+ vBox.getStyleClass().add("plugins_pane_each_plugin_box_parent");
Button folderActionButton = new Button("Folder");
+ folderActionButton.getStyleClass().add("plugins_pane_each_plugin_button");
folderActionButton.setMaxWidth(Double.MAX_VALUE);
folderActionButton.setAlignment(Pos.CENTER_LEFT);
FontIcon folder = new FontIcon("fas-folder");
@@ -227,6 +232,7 @@ public class PluginsPane extends VBox {
Button combineActionButton = new Button("Combine");
+ combineActionButton.getStyleClass().add("plugins_pane_each_plugin_button");
combineActionButton.setMaxWidth(Double.MAX_VALUE);
combineActionButton.setAlignment(Pos.CENTER_LEFT);
FontIcon list = new FontIcon("fas-list");
@@ -245,13 +251,18 @@ public class PluginsPane extends VBox {
});
+ HBox.setHgrow(folderActionButton, Priority.ALWAYS);
+ HBox h1 = new HBox(folderActionButton);
+ h1.getStyleClass().add("plugins_pane_each_plugin_box");
+
+ HBox.setHgrow(combineActionButton, Priority.ALWAYS);
+ HBox h2 = new HBox(combineActionButton);
+ h2.getStyleClass().add("plugins_pane_each_plugin_box");
-
-
- vBox.getChildren().addAll(folderActionButton, combineActionButton);
- vBox.setSpacing(5);
+ vBox.getChildren().addAll(h1, h2);
TitledPane pane = new TitledPane("StreamPi", vBox);
+ pane.getStyleClass().add("plugins_pane_each_plugin_category_titled_pane");
pluginsAccordion.getPanes().add(pane);
pluginsAccordion.setCache(true);
M
src/main/java/com/stream_pi/server/window/dashboard/actiondetailpane/ActionDetailsPane.java
+7
−18
--- 'a/src/main/java/com/stream_pi/server/window/dashboard/actiondetailpane/ActionDetailsPane.java'
+++ b/src/main/java/com/stream_pi/server/window/dashboard/actiondetailpane/ActionDetailsPane.java
@@ -74,8 +74,6 @@ public class ActionDetailsPane extends V
setSpacing(10.0);
- // VBox.setVgrow(this, Priority.SOMETIMES);
-
clientPropertiesVBox = new VBox();
clientPropertiesVBox.setSpacing(10.0);
@@ -86,8 +84,6 @@ public class ActionDetailsPane extends V
vbox.setSpacing(10.0);
getStyleClass().add("action_details_pane");
- // setPadding(new Insets(5,50,5,50));
- // setMinHeight(245);
scrollPane = new ScrollPane();
VBox.setMargin(scrollPane, new Insets(0, 0, 0, 10));
@@ -135,17 +131,17 @@ public class ActionDetailsPane extends V
});
buttonBar = new HBox(openFolderButton, returnButtonForCombineActionChild, saveButton, deleteButton);
+ buttonBar.getStyleClass().add("action_details_pane_button_bar");
buttonBar.setPadding(new Insets(10, 10, 10, 0));
buttonBar.setAlignment(Pos.CENTER_RIGHT);
buttonBar.setVisible(false);
buttonBar.setSpacing(10.0);
actionHeadingLabel = new Label();
-
- actionHeadingLabel.getStyleClass().add("action_details_pane_action_heading_label");
+ actionHeadingLabel.getStyleClass().add("action_details_pane_heading_label");
HBox headingHBox = new HBox(actionHeadingLabel);
-
+ headingHBox.getStyleClass().add("action_details_pane_heading_box");
headingHBox.setPadding(new Insets(5, 10, 0, 10));
getChildren().addAll(headingHBox, scrollPane, buttonBar);
@@ -346,9 +342,6 @@ public class ActionDetailsPane extends V
this.action = action;
this.actionBox = actionBox;
- System.out.println(action.getActionType());
-
-
logger.info("action Display text : "+action.getDisplayText());
clear();
@@ -391,15 +384,11 @@ public class ActionDetailsPane extends V
public void renderActionProperties() throws MinorException
{
- if(action.getLocation().getCol() == -1) //Combine Child action
- isCombineChild = true;
- else
- isCombineChild = false;
+ //Combine Child action
+ isCombineChild = action.getLocation().getCol() == -1;
displayNameTextField.setText(action.getDisplayText());
- System.out.println(action.getDisplayText()+"@@@@::::"+isCombineChild);
-
if(isCombineChild)
{
setReturnButtonForCombineActionChildVisible(true);
@@ -485,8 +474,8 @@ public class ActionDetailsPane extends V
public void renderCombineActionProperties()
{
- try {
- logger.info("@@@@@ : "+action.getClientProperties().getSize());
+ try
+ {
combineActionPropertiesPane = new CombineActionPropertiesPane(getActionAsCombineAction(action),
getClientProfile(),
this
--- 'a/src/main/java/com/stream_pi/server/window/dashboard/actiondetailpane/CombineActionPropertiesPane.java'
+++ b/src/main/java/com/stream_pi/server/window/dashboard/actiondetailpane/CombineActionPropertiesPane.java
@@ -86,10 +86,7 @@ public class CombineActionPropertiesPane
upButton.setOnAction(this::onUpButtonClicked);
downButton.setOnAction(this::onDownButtonClicked);
-
- System.out.println("67878678678678");
getChildren().add(actionHBox);
- System.out.println("9mhmmn");
i++;
}
}
@@ -140,7 +137,6 @@ public class CombineActionPropertiesPane
if(currentIndex < getChildren().size() - 1)
{
-
Property current = combineAction.getClientProperties().getSingleProperty(currentIndex+"");
Property belowOne = combineAction.getClientProperties().getSingleProperty((currentIndex+1)+"");
--- 'a/src/main/java/com/stream_pi/server/window/dashboard/actiongridpane/ActionBox.java'
+++ b/src/main/java/com/stream_pi/server/window/dashboard/actiongridpane/ActionBox.java
@@ -64,7 +64,6 @@ public class ActionBox extends StackPane
public void baseInit()
{
-
displayTextLabel = new Label();
displayTextLabel.setWrapText(true);
displayTextLabel.setTextAlignment(TextAlignment.CENTER);
--- 'a/src/main/java/com/stream_pi/server/window/dashboard/actiongridpane/ActionGridPane.java'
+++ b/src/main/java/com/stream_pi/server/window/dashboard/actiongridpane/ActionGridPane.java
@@ -28,7 +28,7 @@ public class ActionGridPane extends Scro
{
logger = Logger.getLogger(ActionGridPane.class.getName());
this.exceptionAndAlertHandler = exceptionAndAlertHandler;
- getStyleClass().add("action_grid_pane_scroll_pane");
+ getStyleClass().add("action_grid_pane_parent");
VBox.setVgrow(this, Priority.ALWAYS);
--- 'a/src/main/java/com/stream_pi/server/window/settings/About.java'
+++ b/src/main/java/com/stream_pi/server/window/settings/About.java
@@ -33,7 +33,7 @@ public class About extends VBox{
appIconImageView.setFitWidth(182);
Label licenseLabel = new Label("License");
- licenseLabel.getStyleClass().add("settings_about_license_label");
+ licenseLabel.getStyleClass().add("about_license_label");
VBox.setMargin(licenseLabel, new Insets(20, 0 , 10 ,0));
@@ -47,29 +47,19 @@ public class About extends VBox{
HBox links = new HBox();
Hyperlink github = new Hyperlink("GitHub");
- github.setOnAction(event -> {
- openWebpage("https://github.com/Stream-Pi");
- });
+ github.setOnAction(event -> openWebpage("https://github.com/Stream-Pi"));
Hyperlink discord = new Hyperlink("Discord");
- discord.setOnAction(event -> {
- openWebpage("https://discord.gg/BExqGmk");
- });
+ discord.setOnAction(event -> openWebpage("https://discord.gg/BExqGmk"));
Hyperlink website = new Hyperlink("Website");
- website.setOnAction(event -> {
- openWebpage("https://stream-pi.com");
- });
+ website.setOnAction(event -> openWebpage("https://stream-pi.com"));
Hyperlink twitter = new Hyperlink("Twitter");
- twitter.setOnAction(event -> {
- openWebpage("https://twitter.com/Stream_Pi");
- });
+ twitter.setOnAction(event -> openWebpage("https://twitter.com/Stream_Pi"));
Hyperlink matrix = new Hyperlink("Matrix");
- matrix.setOnAction(event -> {
- openWebpage("https://matrix.to/#/#stream-pi_general:matrix.org");
- });
+ matrix.setOnAction(event -> openWebpage("https://matrix.to/#/#stream-pi_general:matrix.org"));
links.setSpacing(30);
--- 'a/src/main/java/com/stream_pi/server/window/settings/ClientsSettings.java'
+++ b/src/main/java/com/stream_pi/server/window/settings/ClientsSettings.java
@@ -46,12 +46,10 @@ public class ClientsSettings extends VBo
clientSettingsVBoxArrayList = new ArrayList<>();
- setPadding(new Insets(10.0));
-
logger = Logger.getLogger(ClientsSettings.class.getName());
clientsSettingsVBox = new VBox();
- clientsSettingsVBox.setSpacing(20.0);
+ clientsSettingsVBox.getStyleClass().add("clients_settings_vbox");
clientsSettingsVBox.setAlignment(Pos.TOP_CENTER);
setAlignment(Pos.TOP_CENTER);
@@ -330,6 +328,8 @@ public class ClientsSettings extends VBo
clientProfileVBoxes = new ArrayList<>();
+ getStyleClass().add("clients_settings_each_client_box");
+
initUI();
loadValues();
}
--- 'a/src/main/java/com/stream_pi/server/window/settings/GeneralSettings.java'
+++ b/src/main/java/com/stream_pi/server/window/settings/GeneralSettings.java
@@ -34,7 +34,7 @@ import java.io.InputStreamReader;
import java.net.URL;
import java.util.logging.Logger;
-public class GeneralSettings extends ScrollPane {
+public class GeneralSettings extends VBox {
private final TextField serverNameTextField;
private final TextField portTextField;
@@ -60,16 +60,12 @@ public class GeneralSettings extends Scr
{
this.hostServices = hostServices;
- getStyleClass().add("general_settings_scroll_pane");
-
this.exceptionAndAlertHandler = exceptionAndAlertHandler;
this.serverListener = serverListener;
logger = Logger.getLogger(GeneralSettings.class.getName());
- setHbarPolicy(ScrollBarPolicy.NEVER);
-
serverNameTextField = new TextField();
portTextField = new TextField();
@@ -87,13 +83,13 @@ public class GeneralSettings extends Scr
checkForUpdatesButton = new Button("Check for updates");
checkForUpdatesButton.setOnAction(event->checkForUpdates());
+ getStyleClass().add("general_settings");
- VBox vBox = new VBox();
- vBox.prefWidthProperty().bind(widthProperty());
- vBox.setAlignment(Pos.CENTER);
- vBox.setSpacing(5);
+ prefWidthProperty().bind(widthProperty());
+ setAlignment(Pos.CENTER);
+ setSpacing(5);
- vBox.getChildren().addAll(
+ getChildren().addAll(
getUIInputBox("Server Name", serverNameTextField),
getUIInputBox("Port", portTextField),
getUIInputBox("action Grid Pane action Box Size", actionGridPaneActionBoxSize),
@@ -112,13 +108,11 @@ public class GeneralSettings extends Scr
saveButton = new Button("Save");
saveButton.setOnAction(event->save());
- vBox.getChildren().addAll(toggleButtons, checkForUpdatesButton, saveButton);
+ getChildren().addAll(toggleButtons, checkForUpdatesButton, saveButton);
- vBox.setPadding(new Insets(10));
+ setPadding(new Insets(10));
- vBox.getStyleClass().add("general_settings");
- setContent(vBox);
}
private HBox getUIInputBoxWithDirectoryChooser(String labelText, TextField textField)
--- 'a/src/main/java/com/stream_pi/server/window/settings/PluginsSettings.java'
+++ b/src/main/java/com/stream_pi/server/window/settings/PluginsSettings.java
@@ -50,14 +50,11 @@ public class PluginsSettings extends VBo
pluginProperties = new ArrayList<>();
logger = Logger.getLogger(PluginsSettings.class.getName());
- setPadding(new Insets(10));
-
pluginsSettingsVBox = new VBox();
- pluginsSettingsVBox.setSpacing(10.0);
+ pluginsSettingsVBox.getStyleClass().add("plugins_settings_vbox");
pluginsSettingsVBox.setAlignment(Pos.TOP_CENTER);
ScrollPane scrollPane = new ScrollPane();
-
scrollPane.getStyleClass().add("plugins_settings_scroll_pane");
scrollPane.setHbarPolicy(ScrollPane.ScrollBarPolicy.NEVER);
scrollPane.maxWidthProperty().bind(widthProperty().multiply(0.8));
@@ -176,14 +173,14 @@ public class PluginsSettings extends VBo
List<NormalAction> actions = NormalActionPlugins.getInstance().getPlugins();
- System.out.println("asdasdasdasd"+actions.size());
-
Platform.runLater(()-> pluginsSettingsVBox.getChildren().clear());
if(actions.size() == 0)
{
Platform.runLater(()->{
- pluginsSettingsVBox.getChildren().add(new Label("No Plugins Installed."));
+ Label l = new Label("No Plugins Installed.");
+ l.getStyleClass().add("plugins_pane_no_plugins_installed_label");
+ pluginsSettingsVBox.getChildren().add(l);
saveButton.setVisible(false);
});
return;
@@ -203,16 +200,18 @@ public class PluginsSettings extends VBo
Label headingLabel = new Label(action.getName());
- headingLabel.getStyleClass().add("settings_plugins_each_action_heading");
+ headingLabel.getStyleClass().add("plugins_settings_each_plugin_heading_label");
HBox headerHBox = new HBox(headingLabel);
+ headerHBox.getStyleClass().add("plugins_settings_each_plugin_header");
if (action.getHelpLink()!=null)
{
Button helpButton = new Button();
+ helpButton.getStyleClass().add("plugins_settings_each_plugin_help_button");
FontIcon questionIcon = new FontIcon("fas-question");
- questionIcon.getStyleClass().add("settings_plugins_plugin_help_icon");
+ questionIcon.getStyleClass().add("plugins_settings_each_plugin_help_icon");
helpButton.setGraphic(questionIcon);
helpButton.setOnAction(event -> hostServices.showDocument(action.getHelpLink()));
@@ -222,12 +221,16 @@ public class PluginsSettings extends VBo
Label authorLabel = new Label(action.getAuthor());
+ authorLabel.getStyleClass().add("plugins_settings_each_plugin_author_label");
Label moduleLabel = new Label(action.getModuleName());
+ moduleLabel.getStyleClass().add("plugins_settings_each_plugin_module_label");
Label versionLabel = new Label("Version : "+action.getVersion().getText());
+ versionLabel.getStyleClass().add("plugins_settings_each_plugin_version_label");
VBox serverPropertiesVBox = new VBox();
+ serverPropertiesVBox.getStyleClass().add("plugins_settings_each_plugin_server_properties_box");
serverPropertiesVBox.setSpacing(10.0);
List<Property> serverProperties = action.getServerProperties().get();
@@ -332,22 +335,18 @@ public class PluginsSettings extends VBo
- Region region1 = new Region();
- region1.setPrefHeight(5);
-
-
Platform.runLater(()->{
VBox vBox = new VBox();
+ vBox.getStyleClass().add("plugins_settings_each_plugin_box");
vBox.setSpacing(5.0);
vBox.getChildren().addAll(headerHBox, authorLabel, moduleLabel, versionLabel, serverPropertiesVBox);
if(action.getButtonBar()!=null)
- vBox.getChildren().add(new HBox(new SpaceFiller(SpaceFiller.FillerType.HBox), action.getButtonBar()));
-
- vBox.getChildren().add(region1);
- //vBox.setId(i+"");
-
- vBox.getStyleClass().add("settings_plugins_each_action");
+ {
+ HBox buttonBarHBox = new HBox(new SpaceFiller(SpaceFiller.FillerType.HBox), action.getButtonBar());
+ buttonBarHBox.getStyleClass().add("plugins_settings_each_plugin_button_bar");
+ vBox.getChildren().add(buttonBarHBox);
+ }
pluginsSettingsVBox.getChildren().add(vBox);
--- 'a/src/main/java/com/stream_pi/server/window/settings/ThemesSettings.java'
+++ b/src/main/java/com/stream_pi/server/window/settings/ThemesSettings.java
@@ -38,6 +38,7 @@ public class ThemesSettings extends VBox
setPadding(new Insets(10));
themesSettingsVBox = new VBox();
+ themesSettingsVBox.getStyleClass().add("themes_settings_vbox");
themesSettingsVBox.setSpacing(10.0);
themesSettingsVBox.setAlignment(Pos.TOP_CENTER);
@@ -91,31 +92,34 @@ public class ThemesSettings extends VBox
Theme theme = themes.getThemeList().get(i);
Label shortNameLabel = new Label(theme.getShortName());
- shortNameLabel.getStyleClass().add("settings_themes_each_theme_heading");
+ shortNameLabel.getStyleClass().add("themes_settings_each_theme_heading");
Label authorLabel = new Label(theme.getAuthor());
+ authorLabel.getStyleClass().add("themes_settings_each_theme_author_label");
Label fullNameLabel = new Label(theme.getFullName());
-
+ fullNameLabel.getStyleClass().add("themes_settings_each_theme_full_name_label");
HBox topRowHBox = new HBox(shortNameLabel);
+ topRowHBox.getStyleClass().add("themes_settings_each_theme_header");
+
+ Label versionLabel = new Label("Version : "+theme.getVersion().getText());
+ versionLabel.getStyleClass().add("themes_settings_each_theme_version_label");
if(theme.getWebsite() != null)
{
Button helpButton = new Button();
+ helpButton.getStyleClass().add("themes_settings_each_theme_help_button");
FontIcon questionIcon = new FontIcon("fas-question");
- questionIcon.getStyleClass().add("settings_themes_theme_help_icon");
+ questionIcon.getStyleClass().add("themes_settings_each_theme_help_icon");
helpButton.setGraphic(questionIcon);
helpButton.setOnAction(event -> hostServices.showDocument(theme.getWebsite()));
topRowHBox.getChildren().addAll(new SpaceFiller(SpaceFiller.FillerType.HBox), helpButton);
}
-
-
- Label versionLabel = new Label("Version : "+theme.getVersion().getText());
-
ToggleButton toggleButton = new ToggleButton();
+ toggleButton.getStyleClass().add("themes_settings_each_theme_toggle_button");
toggleButton.setSelected(theme.getFullName().equals(currentThemeFullName));
toggleButton.setId(theme.getFullName());
@@ -168,17 +172,14 @@ public class ThemesSettings extends VBox
});
HBox hBox = new HBox(toggleButton);
-
- Region region1 = new Region();
- region1.setPrefHeight(5);
+ hBox.getStyleClass().add("themes_settings_each_theme_toggle_button_parent");
hBox.setAlignment(Pos.TOP_RIGHT);
- VBox vBox = new VBox(topRowHBox, authorLabel, versionLabel, fullNameLabel, hBox, region1);
- vBox.setSpacing(5.0);
+ VBox vBox = new VBox(topRowHBox, authorLabel, fullNameLabel, versionLabel, hBox);
- vBox.getStyleClass().add("settings_themes_each_theme");
+ vBox.getStyleClass().add("theme_settings_each_theme_box");
Platform.runLater(()->themesSettingsVBox.getChildren().add(vBox));
--- /dev/null
+++ b/style_classes.txt
@@ -0,0 +1,90 @@
+dashboard
+ Action Detail Pane - action_details_pane
+ Heading HBox - action_details_pane_heading_box
+ Heading Label - action_details_pane_heading_label
+ Scroll Pane - action_details_pane_scroll_pane
+ VBox (Content Pane) - action_details_pane_vbox
+ Bottom Button Bar - action_details_pane_button_bar
+
+ Action Grid Pane (Scroll Pane) - action_grid_pane_parent
+ Main Grid Pane - action_grid_pane
+
+ Action Box - action_box
+ Is Icon Present ?
+ yes : action_box_icon_present
+ no : action_box_icon_not_present
+ Is Action Valid (is plugin by module name found) ?
+ yes : action_box_valid
+ no : action_box_invalid
+
+ Display Text Label - action_box_display_text_label
+
+ Client & Profile Selector Pane - client_and_profile_selector_pane
+ Stack VBox - client_and_profile_selector_pane_stack
+ "No Clients Connected" Label - client_and_profile_selector_pane_no_clients_connected_label
+ Client Combo Box - client_and_profile_selector_pane_client_selector_combo_box
+ Profile Combo Box - client_and_profile_selector_pane_profile_selector_combo_box
+
+ Plugins Pane - plugins_pane
+ "Plugins" Label - plugins_pane_top_label
+
+ Accordion - plugins_pane_accordion
+ Category - plugins_pane_each_plugin_category_titled_pane
+ VBox - plugins_pane_each_plugin_box_parent
+ HBox - plugins_pane_each_plugin_box
+ Each Plugin Button - plugins_pane_each_plugin_button
+ Icon - plugins_pane_each_plugin_button_icon
+ OR
+ ImageView (NOT RECOMMENDED FOR USE) - plugins_pane_each_plugin_button_imageview
+
+ HBox - plugins_pane_settings_button
+ Settings Button - plugins_pane_settings_button
+
+settings
+ General - general_settings
+ Plugins - plugins_settings
+ Scroll Pane (CENTER) - plugins_settings_scroll_pane
+ VBox - plugins_settings_vbox
+ "No Plugins Present Label" - plugins_pane_no_plugins_installed_label
+
+ Each Plugin Box - plugins_settings_each_plugin_box
+ Header HBox - plugins_settings_each_plugin_header
+ Heading - plugins_settings_each_plugin_heading_label
+ Help Button - plugins_settings_each_plugin_help_button
+ Help Icon - plugins_settings_each_plugin_help_icon
+
+ Author Label - plugins_settings_each_plugin_author_label
+ Module Label - plugins_settings_each_plugin_module_label
+ Version Label - plugins_settings_each_plugin_version_label
+
+ Server Properties Box - plugins_settings_each_plugin_server_properties_box
+
+ buttonBarHBox - plugins_settings_each_plugin_button_bar
+
+ Themes - themes_settings
+ Scroll Pane (CENTER) - themes_settings_scroll_pane
+ VBox - themes_settings_vbox
+ Each Theme Box - theme_settings_each_theme_box
+ Heading HBox - themes_settings_each_theme_header
+ Heading Label - themes_settings_each_theme_heading
+ Help Button - themes_settings_each_theme_help_button
+ Help Icon - themes_settings_each_theme_help_icon
+
+ Author Label - themes_settings_each_theme_author_label
+ Full Name Label - themes_settings_each_theme_full_name_label
+ Version Label - themes_settings_each_theme_version_label
+
+ Toggle Button HBox - themes_settings_each_theme_toggle_button_parent
+ Toggle Button - themes_settings_each_theme_toggle_button
+
+
+
+ Client - clients_settings
+ Scroll Pane (CENTER) - clients_settings_scroll_pane
+ VBox - clients_settings_vbox
+ Each Client Box - clients_settings_each_client_box
+
+ About - about
+ License Label - about_license_label
+
+