server

Clone or download

Added more style classes to About Pane

Modified Files

package com.stream_pi.server.window.settings;
package com.stream_pi.server.window.settings;
import com.stream_pi.actionapi.ActionAPI;
import com.stream_pi.actionapi.ActionAPI;
import com.stream_pi.server.info.License;
import com.stream_pi.server.info.License;
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.geometry.Insets;
import javafx.geometry.Insets;
import javafx.geometry.Pos;
import javafx.geometry.Pos;
import javafx.scene.control.Hyperlink;
import javafx.scene.control.Hyperlink;
import javafx.scene.control.Label;
import javafx.scene.control.Label;
import javafx.scene.control.TextArea;
import javafx.scene.control.TextArea;
import javafx.scene.image.Image;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.image.ImageView;
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;
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(Main.class.getResourceAsStream("app_icon.png"));
Image appIcon = new Image(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);
Label licenseLabel = new Label("License");
Label licenseLabel = new Label("License");
licenseLabel.getStyleClass().add("about_license_label");
licenseLabel.getStyleClass().add("about_license_label");
VBox.setMargin(licenseLabel, new Insets(20, 0 , 10 ,0));
VBox.setMargin(licenseLabel, new Insets(20, 0 , 10 ,0));
TextArea licenseTextArea = new TextArea(License.getLicense());
TextArea licenseTextArea = new TextArea(License.getLicense());
licenseTextArea.getStyleClass().add("about_license_text_area");
licenseTextArea.setWrapText(false);
licenseTextArea.setWrapText(false);
licenseTextArea.setEditable(false);
licenseTextArea.setEditable(false);
licenseTextArea.setMaxWidth(550);
licenseTextArea.setMaxWidth(550);
VBox.setVgrow(licenseTextArea, Priority.ALWAYS);
VBox.setVgrow(licenseTextArea, Priority.ALWAYS);
HBox links = new HBox();
HBox links = new HBox();
links.getStyleClass().add("about_links_box");
Hyperlink github = new Hyperlink("GitHub");
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");
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");
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");
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");
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);
links.setAlignment(Pos.CENTER);
links.setAlignment(Pos.CENTER);
links.getChildren().addAll(github, matrix, discord, website, twitter);
links.getChildren().addAll(github, matrix, discord, website, twitter);
Hyperlink donateButton = new Hyperlink("DONATE");
Hyperlink donateButton = new Hyperlink("DONATE");
donateButton.setOnAction(event -> {
donateButton.setOnAction(event -> {
openWebpage("https://www.patreon.com/streampi");
openWebpage("https://www.patreon.com/streampi");
});
});
donateButton.getStyleClass().add("settings_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.getPlatformType().getUIName() + " - "+ serverInfo.getReleaseStatus().getUIName());
Label versionText = new Label(serverInfo.getVersion().getText() + " - "+ serverInfo.getPlatformType().getUIName() + " - "+ serverInfo.getReleaseStatus().getUIName());
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");
Label minThemeAPILabel = new Label("Min ThemeAPI "+serverInfo.getMinThemeSupportVersion().getText());
Label minThemeAPILabel = new Label("Min ThemeAPI "+serverInfo.getMinThemeSupportVersion().getText());
Label minActionAPILabel = new Label("Min ActionAPI "+serverInfo.getMinPluginSupportVersion().getText());
minThemeAPILabel.getStyleClass().add("about_min_theme_api_label");
Label minActionAPILabel = new Label("Min ActionAPI "+serverInfo.getMinPluginSupportVersion().getText());
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");
setSpacing(3);
getChildren().addAll(appIconImageView, licenseLabel, licenseTextArea, links, donateButton, versionText, commStandardLabel, minThemeAPILabel, minActionAPILabel, currentActionAPILabel);
getChildren().addAll(appIconImageView, licenseLabel, licenseTextArea, links, donateButton, versionText, commStandardLabel, minThemeAPILabel, minActionAPILabel, currentActionAPILabel);
}
}
public void openWebpage(String url) {
public void openWebpage(String url) {
hostServices.showDocument(url);
hostServices.showDocument(url);
}
}
}
}
M style_classes.txt
+9 −0
dashboard
dashboard
Action Detail Pane - action_details_pane
Action Detail 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
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
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
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 - plugins_settings_each_plugin_heading_label
Heading - 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
About - about
About - about
License Label - about_license_label
License Label - about_license_label
License Text Area - about_license_text_area
Links HBox - about_links_box
DONATE Hyperlink - about_donate_hyperlink
Version Label - about_version_label
Comm Standard Label - about_comm_standard_label
Min Theme API Label - about_min_theme_api_label
Min Action API Label - about_min_action_api_label
Current Action API Label - about_current_action_api_label