server

Clone or download

Modified Files

package com.stream_pi.server.window.settings.About;
package com.stream_pi.server.window.settings.About;
import com.stream_pi.action_api.ActionAPI;
import com.stream_pi.action_api.ActionAPI;
import com.stream_pi.server.info.ServerInfo;
import com.stream_pi.server.info.ServerInfo;
import com.stream_pi.server.Main;
import com.stream_pi.server.Main;
import javafx.application.HostServices;
import javafx.application.HostServices;
import javafx.event.Event;
import javafx.event.Event;
import javafx.geometry.Pos;
import javafx.geometry.Pos;
import javafx.scene.CacheHint;
import javafx.scene.CacheHint;
import javafx.scene.control.*;
import javafx.scene.control.*;
import javafx.scene.image.Image;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.image.ImageView;
import javafx.scene.input.SwipeEvent;
import javafx.scene.input.SwipeEvent;
import javafx.scene.layout.HBox;
import javafx.scene.layout.HBox;
import javafx.scene.layout.Priority;
import javafx.scene.layout.Priority;
import javafx.scene.layout.VBox;
import javafx.scene.layout.VBox;
import java.io.File;
import java.io.File;
import java.net.URL;
import java.net.URL;
import java.nio.file.Files;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.nio.file.Paths;
import java.util.Objects;
import java.util.Objects;
import java.util.Scanner;
import java.util.Scanner;
import java.util.logging.Logger;
import java.util.logging.Logger;
public class About extends VBox
public class About extends VBox
{
{
private HostServices hostServices;
private HostServices hostServices;
public About(HostServices hostServices)
public About(HostServices hostServices)
{
{
getStyleClass().add("about");
getStyleClass().add("about");
this.hostServices = hostServices;
this.hostServices = hostServices;
setAlignment(Pos.TOP_CENTER);
setAlignment(Pos.TOP_CENTER);
Image appIcon = new Image(Objects.requireNonNull(Main.class.getResourceAsStream("app_icon.png")));
Image appIcon = new Image(Objects.requireNonNull(Main.class.getResourceAsStream("app_icon.png")));
ImageView appIconImageView = new ImageView(appIcon);
ImageView appIconImageView = new ImageView(appIcon);
appIconImageView.setFitHeight(196);
appIconImageView.setFitHeight(196);
appIconImageView.setFitWidth(182);
appIconImageView.setFitWidth(182);
TabPane tabPane = new TabPane();
TabPane tabPane = new TabPane();
tabPane.addEventFilter(SwipeEvent.ANY, Event::consume);
tabPane.addEventFilter(SwipeEvent.ANY, Event::consume);
tabPane.getStyleClass().add("settings_about_tab_internal");
tabPane.getStyleClass().add("settings_about_tab_internal");
tabPane.setTabClosingPolicy(TabPane.TabClosingPolicy.UNAVAILABLE);
tabPane.setTabClosingPolicy(TabPane.TabClosingPolicy.UNAVAILABLE);
tabPane.setMaxWidth(600);
tabPane.setMaxWidth(600);
VBox.setVgrow(tabPane, Priority.ALWAYS);
VBox.setVgrow(tabPane, Priority.ALWAYS);
Tab licenseTab = new Tab("License");
Tab licenseTab = new Tab("License");
licenseTab.setContent(new LicenseTab());
licenseTab.setContent(new LicenseTab());
Tab contributorsTab = new Tab("Contributors");
Tab contributorsTab = new Tab("Contributors");
contributorsTab.setContent(new ContributorsTab());
contributorsTab.setContent(new ContributorsTab());
Tab contactTab = new Tab("Contact");
Tab contactTab = new Tab("Contact");
contactTab.setContent(new ContactTab(hostServices));
contactTab.setContent(new ContactTab(hostServices));
tabPane.getTabs().addAll(licenseTab, contributorsTab, contactTab);
tabPane.getTabs().addAll(licenseTab, contributorsTab, contactTab);
Hyperlink donateButton = new Hyperlink("DONATE");
Hyperlink donateButton = new Hyperlink("DONATE");
donateButton.setOnAction(event -> openWebpage("https://www.patreon.com/streampi"));
donateButton.setOnAction(event -> openWebpage("https://www.patreon.com/streampi"));
donateButton.getStyleClass().add("about_donate_hyperlink");
donateButton.getStyleClass().add("about_donate_hyperlink");
ServerInfo serverInfo = ServerInfo.getInstance();
ServerInfo serverInfo = ServerInfo.getInstance();
Label versionText = new Label(serverInfo.getVersion().getText() + " - "+ serverInfo.getPlatform().getUIName() + " - "+ serverInfo.getReleaseStatus().getUIName());
Label versionText = new Label(serverInfo.getVersion().getText() + " - "+ serverInfo.getPlatform().getUIName() + " - "+ serverInfo.getReleaseStatus().getUIName());
versionText.getStyleClass().add("about_version_label");
versionText.getStyleClass().add("about_version_label");
Label commStandardLabel = new Label("Comm Standard "+serverInfo.getCommStandardVersion().getText());
Label commStandardLabel = new Label("Comm Standard "+serverInfo.getCommStandardVersion().getText());
commStandardLabel.getStyleClass().add("about_comm_standard_label");
commStandardLabel.getStyleClass().add("about_comm_standard_label");
Label minThemeAPILabel = new Label("Min ThemeAPI "+serverInfo.getMinThemeSupportVersion().getText());
Label minThemeAPILabel = new Label("Min ThemeAPI "+serverInfo.getMinThemeSupportVersion().getText());
minThemeAPILabel.getStyleClass().add("about_min_theme_api_label");
minThemeAPILabel.getStyleClass().add("about_min_theme_api_label");
Label minActionAPILabel = new Label("Min ActionAPI "+serverInfo.getMinPluginSupportVersion().getText());
Label minActionAPILabel = new Label("Min ActionAPI "+serverInfo.getMinPluginSupportVersion().getText());
minActionAPILabel.getStyleClass().add("about_min_action_api_label");
minActionAPILabel.getStyleClass().add("about_min_action_api_label");
Label currentActionAPILabel = new Label("ActionAPI "+ ActionAPI.API_VERSION.getText());
Label currentActionAPILabel = new Label("ActionAPI "+ ActionAPI.API_VERSION.getText());
currentActionAPILabel.getStyleClass().add("about_current_action_api_label");
currentActionAPILabel.getStyleClass().add("about_current_action_api_label");
HBox hBox = new HBox(versionText, getSep(),
HBox hBox = new HBox(versionText, getSep(),
commStandardLabel, getSep(),
commStandardLabel, getSep(),
minThemeAPILabel, getSep(),
minThemeAPILabel, getSep(),
minActionAPILabel, getSep(),
minActionAPILabel, getSep(),
currentActionAPILabel);
currentActionAPILabel);
hBox.setAlignment(Pos.CENTER);
hBox.setAlignment(Pos.CENTER);
hBox.setSpacing(10);
hBox.setSpacing(10);
getChildren().addAll(appIconImageView, tabPane, donateButton, hBox);
getChildren().addAll(appIconImageView, tabPane, donateButton, hBox);
try
try
{
{
URL buildFile = Main.class.getResource("build-date");
URL buildFile = Main.class.getResource("build-date");
if(buildFile != null)
if(buildFile != null)
{
{
Label buildTime = new Label("Build date/time: "+Files.readString(Paths.get(Objects.requireNonNull(buildFile.toURI().getPath()))));
Label buildDateLabel = new Label("Build date/time: "+ Files.readString(Paths.get(Objects.requireNonNull(buildFile.toURI().getPath()))));
getChildren().addAll(buildTime);
buildDateLabel.getStyleClass().add("build-date-label");
getChildren().addAll(buildDateLabel);
}
}
else
else
{
{
Logger.getLogger("").info("Build date not available");
Logger.getLogger("").info("Build date not available");
}
}
}
}
catch (Exception e)
catch (Exception e)
{
{
e.printStackTrace();
e.printStackTrace();
}
}
}
}
public void openWebpage(String url)
public void openWebpage(String url)
{
{
hostServices.showDocument(url);
hostServices.showDocument(url);
}
}
private Label getSep()
private Label getSep()
{
{
Label label = new Label("|");
Label label = new Label("|");
label.getStyleClass().add("separator_ui_label");
label.getStyleClass().add("separator_ui_label");
return label;
return label;
}
}
}
}
M style_classes.txt
+1 −1
This list is somewhat outdated. Some classes are missing/no longer work. This will be updated soon
This list is outdated. Some classes are missing/no longer work. This will be updated soon
dashboard
dashboard
Action Details Pane - action_details_pane
Action Details Pane - action_details_pane
Heading HBox - action_details_pane_heading_box
Heading HBox - action_details_pane_heading_box
Heading Label - action_details_pane_heading_label
Heading Label - action_details_pane_heading_label
Scroll Pane - action_details_pane_scroll_pane
Scroll Pane - action_details_pane_scroll_pane
VBox (Content Pane) - action_details_pane_vbox
VBox (Content Pane) - action_details_pane_vbox
Bottom Button Bar - action_details_pane_button_bar
Bottom Button Bar - action_details_pane_button_bar
Delete Button - action_details_pane_delete_button
Delete Button - action_details_pane_delete_button
Icon - action_details_pane_delete_button_icon
Icon - action_details_pane_delete_button_icon
Action Grid Pane (Scroll Pane) - action_grid_pane_parent
Action Grid Pane (Scroll Pane) - action_grid_pane_parent
Main Grid Pane - action_grid_pane
Main Grid Pane - action_grid_pane
Action Box - action_box
Action Box - action_box
if folder back button :
if folder back button :
Icon : folder_action_back_button_icon
Icon : folder_action_back_button_icon
Is Icon Present ?
Is Icon Present ?
yes : action_box_icon_present
yes : action_box_icon_present
no : action_box_icon_not_present
no : action_box_icon_not_present
Is Action Valid (is plugin by module name found) ?
Is Action Valid (is plugin by module name found) ?
yes : action_box_valid
yes : action_box_valid
no : action_box_invalid
no : action_box_invalid
Display Text Label - action_box_display_text_label
Display Text Label - action_box_display_text_label
Client & Profile Selector Pane - client_and_profile_selector_pane
Client & Profile Selector Pane - client_and_profile_selector_pane
Stack VBox - client_and_profile_selector_pane_stack
Stack VBox - client_and_profile_selector_pane_stack
"No Clients Connected" Label - client_and_profile_selector_pane_no_clients_connected_label
"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
Client Combo Box - client_and_profile_selector_pane_client_selector_combo_box
Profile Combo Box - client_and_profile_selector_pane_profile_selector_combo_box
Profile Combo Box - client_and_profile_selector_pane_profile_selector_combo_box
Plugins Pane - plugins_pane
Plugins Pane - plugins_pane
"Plugins" Label - plugins_pane_top_label
"Plugins" Label - plugins_pane_top_label
Accordion - plugins_pane_accordion
Accordion - plugins_pane_accordion
Category - plugins_pane_each_plugin_category_titled_pane
Category - plugins_pane_each_plugin_category_titled_pane
VBox - plugins_pane_each_plugin_box_parent
VBox - plugins_pane_each_plugin_box_parent
HBox - plugins_pane_each_plugin_box
HBox - plugins_pane_each_plugin_box
Each Plugin Button - plugins_pane_each_plugin_button
Each Plugin Button - plugins_pane_each_plugin_button
Icon - plugins_pane_each_plugin_button_icon
Icon - plugins_pane_each_plugin_button_icon
OR
OR
ImageView (NOT RECOMMENDED FOR USE) - plugins_pane_each_plugin_button_imageview]
ImageView (NOT RECOMMENDED FOR USE) - plugins_pane_each_plugin_button_imageview]
Help Button - plugins_pane_each_plugin_button_help_icon
Help Button - plugins_pane_each_plugin_button_help_icon
Icon - plugins_pane_each_plugin_button_help_button_icon
Icon - plugins_pane_each_plugin_button_help_button_icon
HBox - plugins_pane_settings_button
HBox - plugins_pane_settings_button
Settings Button - plugins_pane_settings_button
Settings Button - plugins_pane_settings_button
settings
settings
General - general_settings
General - general_settings
Plugins - plugins_settings
Plugins - plugins_settings
Scroll Pane (CENTER) - plugins_settings_scroll_pane
Scroll Pane (CENTER) - plugins_settings_scroll_pane
VBox - plugins_settings_vbox
VBox - plugins_settings_vbox
"No Plugins Present Label" - plugins_pane_no_plugins_installed_label
"No Plugins Present Label" - plugins_pane_no_plugins_installed_label
Each Plugin Box - plugins_settings_each_plugin_box
Each Plugin Box - plugins_settings_each_plugin_box
Header HBox - plugins_settings_each_plugin_header
Header HBox - plugins_settings_each_plugin_header
Heading Label - plugins_settings_each_plugin_heading_label
Heading Label - plugins_settings_each_plugin_heading_label
Help Button - plugins_settings_each_plugin_help_button
Help Button - plugins_settings_each_plugin_help_button
Help Icon - plugins_settings_each_plugin_help_icon
Help Icon - plugins_settings_each_plugin_help_icon
Author Label - plugins_settings_each_plugin_author_label
Author Label - plugins_settings_each_plugin_author_label
Module Label - plugins_settings_each_plugin_module_label
Module Label - plugins_settings_each_plugin_module_label
Version Label - plugins_settings_each_plugin_version_label
Version Label - plugins_settings_each_plugin_version_label
Server Properties Box - plugins_settings_each_plugin_server_properties_box
Server Properties Box - plugins_settings_each_plugin_server_properties_box
buttonBarHBox - plugins_settings_each_plugin_button_bar
buttonBarHBox - plugins_settings_each_plugin_button_bar
Themes - themes_settings
Themes - themes_settings
Scroll Pane (CENTER) - themes_settings_scroll_pane
Scroll Pane (CENTER) - themes_settings_scroll_pane
VBox - themes_settings_vbox
VBox - themes_settings_vbox
Each Theme Box - theme_settings_each_theme_box
Each Theme Box - theme_settings_each_theme_box
Heading HBox - themes_settings_each_theme_header
Heading HBox - themes_settings_each_theme_header
Heading Label - themes_settings_each_theme_heading
Heading Label - themes_settings_each_theme_heading
Help Button - themes_settings_each_theme_help_button
Help Button - themes_settings_each_theme_help_button
Help Icon - themes_settings_each_theme_help_icon
Help Icon - themes_settings_each_theme_help_icon
Author Label - themes_settings_each_theme_author_label
Author Label - themes_settings_each_theme_author_label
Full Name Label - themes_settings_each_theme_full_name_label
Full Name Label - themes_settings_each_theme_full_name_label
Version Label - themes_settings_each_theme_version_label
Version Label - themes_settings_each_theme_version_label
Toggle Button HBox - themes_settings_each_theme_toggle_button_parent
Toggle Button HBox - themes_settings_each_theme_toggle_button_parent
Toggle Button - themes_settings_each_theme_toggle_button
Toggle Button - themes_settings_each_theme_toggle_button
Client - clients_settings
Client - clients_settings
Scroll Pane (CENTER) - clients_settings_scroll_pane
Scroll Pane (CENTER) - clients_settings_scroll_pane
VBox - clients_settings_vbox
VBox - clients_settings_vbox
Each Client Box - clients_settings_each_client_box
Each Client Box - clients_settings_each_client_box
Nick Name Label - client_settings_each_client_nick_name_label
Nick Name Label - client_settings_each_client_nick_name_label
Socket Connection Label - client_settings_each_client_socket_connection_label
Socket Connection Label - client_settings_each_client_socket_connection_label
Platform Label - client_settings_each_client_platform_label
Platform Label - client_settings_each_client_platform_label
Version Label - client_settings_each_client_version_label
Version Label - client_settings_each_client_version_label
Profiles Accordion - client_settings_each_client_profiles_accordion
Profiles Accordion - client_settings_each_client_profiles_accordion
Each Titled Pane - client_settings_each_client_accordion_each_titled_pane
Each Titled Pane - client_settings_each_client_accordion_each_titled_pane
Content VBox - client_settings_each_client_accordion_each_profile_box
Content VBox - client_settings_each_client_accordion_each_profile_box
About - about
About - about
Tab Pane - settings_about_tab_internal
Tab Pane - settings_about_tab_internal
License Tab (Text Area) - about_license_text_area
License Tab (Text Area) - about_license_text_area
Contributors Tab (VBox) - about_license_contributors_vbox
Contributors Tab (VBox) - about_license_contributors_vbox
Table View - about_license_contributors_table_view
Table View - about_license_contributors_table_view
Disclaimer Label - about_license_contributors_disclaimer_label
Disclaimer Label - about_license_contributors_disclaimer_label
Contact Tab (Scroll Pane) - about_contact_tab_scroll_pane
Contact Tab (Scroll Pane) - about_contact_tab_scroll_pane
DONATE Hyperlink - about_donate_hyperlink
DONATE Hyperlink - about_donate_hyperlink
Version Label - about_version_label
Version Label - about_version_label
Comm Standard Label - about_comm_standard_label
Comm Standard Label - about_comm_standard_label
Min Theme API Label - about_min_theme_api_label
Min Theme API Label - about_min_theme_api_label
Min Action API Label - about_min_action_api_label
Min Action API Label - about_min_action_api_label
Current Action API Label - about_current_action_api_label
Current Action API Label - about_current_action_api_label