From: rnayabed Date: Mon, 01 Feb 2021 21:46:17 +0530 Subject: Documentation, Refactoring --- Documentation, Refactoring --- --- /dev/null +++ b/README.md @@ -0,0 +1,21 @@ +# util + +![version](https://img.shields.io/badge/Version-1.0.0-green) + +This package contains the shared code between Server and Client, +like Alerts, ComboBox, etc. + +## Prerequisites + +--- + +* Java >= 11 +* Maven >= 3.6.3 + +## Build And Install Locally + +--- + +`mvn clean install` + + --- 'a/pom.xml' +++ b/pom.xml @@ -38,20 +38,15 @@ - - UTF-8 11 11 - 11.5.0 11.5.0 - - 16-ea+5 - + 16-ea+6 @@ -74,8 +69,6 @@ ${JavaFXVersion} - - org.kordamp.ikonli ikonli-javafx --- 'a/src/main/java/com/stream_pi/util/alert/StreamPiAlert.java' +++ b/src/main/java/com/stream_pi/util/alert/StreamPiAlert.java @@ -1,3 +1,19 @@ +/* +Stream-Pi - Free & Open-Source Modular Cross-Platform Programmable Macro Pad +Copyright (C) 2019-2021 Debayan Sutradhar (rnayabed), Samuel Quiñones (SamuelQuinones) + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +Originally Written by : Debayan Sutradhar (rnayabed) +*/ + package com.stream_pi.util.alert; import com.stream_pi.util.uihelper.SpaceFiller; @@ -17,7 +33,11 @@ import javafx.scene.layout.Pane; import javafx.scene.layout.Priority; import javafx.scene.layout.VBox; -public class StreamPiAlert { +/** + * Custom Alert Dialog for Server and Client + */ +public class StreamPiAlert +{ private String title; private String[] buttons; private StreamPiAlertType streamPiAlertType; @@ -25,66 +45,114 @@ public class StreamPiAlert { private static StackPane stackPaneParent = null; - public static void setParent(StackPane parent) { + /** + * Sets the parent where the alert will be shown + * @param parent StackPane where the alert dialog will be shown + */ + public static void setParent(StackPane parent) + { stackPaneParent = parent; stackPaneParent.getStyleClass().add("alert_pane_parent"); - stackPaneParent.getChildren().addListener(new ListChangeListener() + stackPaneParent.getChildren().addListener((ListChangeListener) c -> { - @Override - public void onChanged(Change c) { - if(stackPaneParent.getChildren().size() > 0) - { - stackPaneParent.setVisible(true); - stackPaneParent.toFront(); - } - else - { - stackPaneParent.setVisible(false); - stackPaneParent.toBack(); - } + if(stackPaneParent.getChildren().size() > 0) + { + stackPaneParent.setVisible(true); + stackPaneParent.toFront(); + } + else + { + stackPaneParent.setVisible(false); + stackPaneParent.toBack(); } }); } - public static StackPane getParent() { + /** + * Returns the parent node + * @return StackPane parent where the alert boxes will be shown + */ + public static StackPane getParent() + { return stackPaneParent; } private StreamPiAlertListener streamPiAlertListener = null; + /** + * Public constructor to make an alert with just title, pre-made content pane (mainly for forms, complex dialogs) + * @param title Heading of the Alert + * @param streamPiAlertType Alert Type + * @param contentPane The main body of the alert + */ public StreamPiAlert(String title, StreamPiAlertType streamPiAlertType, - Pane contentPane) { - set(title, streamPiAlertType, contentPane, new String[]{ "OK" }); + Pane contentPane) + { + set(title, streamPiAlertType, contentPane, "OK"); } + /** + * Sets the Alert type + * @param streamPiAlertType Alert Type + */ public void setStreamPiAlertType(StreamPiAlertType streamPiAlertType) { this.streamPiAlertType = streamPiAlertType; } + /** + * Constructor for very simple alert, with just title and body text + * Default AlertType will be INFORMATION + * @param title Heading + * @param contentText Body Text + */ public StreamPiAlert(String title, String contentText) { this(title, contentText, StreamPiAlertType.INFORMATION); } - + + /** + * Constructor for alert with just "Alert" heading, + * content text and alert type + * @param contentText Body Text + * @param alertType Alert Type + */ public StreamPiAlert(String contentText, StreamPiAlertType alertType) { this("Alert", contentText, alertType); } - + /** + * Constructor to create Alert box with title, Alert Type and button choices + * @param title Heading + * @param streamPiAlertType Alert Type + * @param buttons Button choices + */ public StreamPiAlert(String title, StreamPiAlertType streamPiAlertType, String... buttons) { set(title, streamPiAlertType, null, buttons); } + /** + * Constructor to create Alert Box with title, Alert Type, Body and button choices + * @param title Heading of the alert box + * @param streamPiAlertType Alert Type + * @param contentPane Alert Body + * @param buttons Button choices + */ public StreamPiAlert(String title, StreamPiAlertType streamPiAlertType, Pane contentPane, String... buttons) { set(title, streamPiAlertType, contentPane, buttons); } + /** + * Constructor to create Alert Box with Heading, content text, Alert Type + * @param title Heading + * @param contentText Body Text + * @param streamPiAlertType Alert Type + */ public StreamPiAlert(String title, String contentText, StreamPiAlertType streamPiAlertType) { Label label = new Label(contentText); @@ -92,9 +160,16 @@ public class StreamPiAlert { VBox vBox = new VBox(label); - set(title, streamPiAlertType, vBox, new String[]{ "OK" }); + set(title, streamPiAlertType, vBox, "OK"); } + /** + * Sets the alert properties + * @param title Heading + * @param streamPiAlertType Alert Type + * @param contentPane Body + * @param buttons Button choices + */ private void set(String title, StreamPiAlertType streamPiAlertType, Pane contentPane, String... buttons) { @@ -104,31 +179,56 @@ public class StreamPiAlert { this.streamPiAlertType = streamPiAlertType; } - - public void setOnClicked(StreamPiAlertListener streamPiAlertListener) { + /** + * Set on click Listener + * @param streamPiAlertListener Alert Listener, triggered when a button is clicked + */ + public void setOnClicked(StreamPiAlertListener streamPiAlertListener) + { this.streamPiAlertListener = streamPiAlertListener; } - public String getTitle() { + /** + * @return Heading of the Alert Box + */ + public String getTitle() + { return title; } - public String[] getButtons() { + /** + * @return Button Choices + */ + public String[] getButtons() + { return buttons; } - public void setAlertContent(Pane contentPane) { + /** + * @param contentPane Alert Body Node + */ + public void setAlertContent(Pane contentPane) + { this.contentPane = contentPane; } - public void setButtons(String... buttons) { + /** + * Set all the button choices + * @param buttons Array of button choices + */ + public void setButtons(String... buttons) + { this.buttons = buttons; } - public VBox getAlertPane(String title, Pane alertPane) { - VBox alertVBox = new VBox(); - alertVBox.getStyleClass().add("alert_pane"); - + /** + * Create and return the final AlertBox Pane, which will be added to the parent node + * @param title Heading + * @param contentPane The Alert Body Pane + * @return Final VBox to be shown in the parent Stack Pane + */ + private VBox getAlertPane(String title, Pane contentPane) + { if(title.isEmpty()) title = "Alert"; @@ -147,7 +247,8 @@ public class StreamPiAlert { HBox buttonBar = new HBox(); buttonBar.getStyleClass().add("alert_button_bar"); - for (String eachButtonString : buttons) { + for (String eachButtonString : buttons) + { Button button = new Button(eachButtonString); button.setOnAction(event -> { if(this.streamPiAlertListener != null) @@ -161,48 +262,53 @@ public class StreamPiAlert { buttonBar.getChildren().add(button); } - alertPane.getStyleClass().add("alert_content_pane"); + contentPane.getStyleClass().add("alert_content_pane"); - ScrollPane scrollPane = new ScrollPane(alertPane); - scrollPane.prefHeightProperty().bind(alertPane.heightProperty().add(20)); + ScrollPane scrollPane = new ScrollPane(contentPane); + scrollPane.prefHeightProperty().bind(contentPane.heightProperty().add(20)); scrollPane.getStyleClass().add("alert_scroll_pane"); - alertPane.prefWidthProperty().bind(scrollPane.widthProperty().subtract(10)); + contentPane.prefWidthProperty().bind(scrollPane.widthProperty().subtract(10)); scrollPane.setHbarPolicy(ScrollBarPolicy.NEVER); scrollPane.setVbarPolicy(ScrollBarPolicy.AS_NEEDED); VBox.setVgrow(scrollPane, Priority.ALWAYS); - alertVBox.getChildren().addAll( - header, - scrollPane, - buttonBar - ); + VBox alertVBox = new VBox( header, scrollPane, buttonBar); + alertVBox.getStyleClass().add("alert_pane"); alertVBox.setMaxHeight(Double.NEGATIVE_INFINITY); return alertVBox; } + /** + * @return The body node of the Alert Box + */ public Pane getContentPane() { return contentPane; } + /** + * Adds the Alert Box to the parent node + */ private Node popupNode; public void show() { - Platform.runLater(()->{ + Platform.runLater(()-> + { popupNode = getAlertPane(getTitle(), getContentPane()); stackPaneParent.getChildren().add(popupNode); }); } + /** + * Removes the alert from the parent pane + */ public void destroy() { - Platform.runLater(()->{ - stackPaneParent.getChildren().remove(popupNode); - }); + Platform.runLater(()-> stackPaneParent.getChildren().remove(popupNode)); } } --- 'a/src/main/java/com/stream_pi/util/alert/StreamPiAlertListener.java' +++ b/src/main/java/com/stream_pi/util/alert/StreamPiAlertListener.java @@ -1,5 +1,27 @@ +/* +Stream-Pi - Free & Open-Source Modular Cross-Platform Programmable Macro Pad +Copyright (C) 2019-2021 Debayan Sutradhar (rnayabed), Samuel Quiñones (SamuelQuinones) + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +Originally Written by : Debayan Sutradhar (rnayabed) +*/ + package com.stream_pi.util.alert; +/** + * Alert Listener. Triggered when a button on StreamPiAlert is clicked. + */ public abstract class StreamPiAlertListener { + /** + * @param buttonClicked Button choice which was clicked + */ public abstract void onClick(String buttonClicked); } --- 'a/src/main/java/com/stream_pi/util/alert/StreamPiAlertType.java' +++ b/src/main/java/com/stream_pi/util/alert/StreamPiAlertType.java @@ -1,5 +1,24 @@ +/* +Stream-Pi - Free & Open-Source Modular Cross-Platform Programmable Macro Pad +Copyright (C) 2019-2021 Debayan Sutradhar (rnayabed), Samuel Quiñones (SamuelQuinones) + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +Originally Written by : Debayan Sutradhar (rnayabed) +*/ + package com.stream_pi.util.alert; +/** + * Stream-Pi Alert Type Enumerator + */ public enum StreamPiAlertType { INFORMATION("fas-info", "alert_information_icon"), WARNING("fas-exclamation-triangle", "alert_warning_icon"), @@ -8,17 +27,27 @@ public enum StreamPiAlertType { private final String fontAwesomeIconCode; private final String alertIconStyleClassName; + /** + * @param fontAwesomeIconCode Ikonli Font Icon code + * @param alertIconStyleClassName Icon CSS Style Class + */ StreamPiAlertType(String fontAwesomeIconCode, String alertIconStyleClassName) { this.fontAwesomeIconCode = fontAwesomeIconCode; this.alertIconStyleClassName = alertIconStyleClassName; } + /** + * @return Ikonli Font Icon code + */ public String getIconCode() { return fontAwesomeIconCode; } + /** + * @return Icon CSS Style Class + */ public String getIconStyleClassName() { return alertIconStyleClassName; --- 'a/src/main/java/com/stream_pi/util/combobox/StreamPiComboBox.java' +++ b/src/main/java/com/stream_pi/util/combobox/StreamPiComboBox.java @@ -1,3 +1,19 @@ +/* +Stream-Pi - Free & Open-Source Modular Cross-Platform Programmable Macro Pad +Copyright (C) 2019-2021 Debayan Sutradhar (rnayabed), Samuel Quiñones (SamuelQuinones) + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +Originally Written by : Debayan Sutradhar (rnayabed) +*/ + package com.stream_pi.util.combobox; import java.util.ArrayList; @@ -18,35 +34,44 @@ import javafx.scene.layout.HBox; import javafx.scene.layout.StackPane; import javafx.scene.layout.VBox; +/** + * Custom Combo Box for Server and Client + * @param Combo Box List Type + */ public class StreamPiComboBox extends HBox { private List options; private static StackPane stackPaneParent; + /** + * Sets the parent where the Combo Box will be shown + * @param parent StackPane where the Combo Box dialog will be shown + */ public static void setParent(StackPane parent) { stackPaneParent = parent; - stackPaneParent.getStyleClass().add("combobox_pane_parent"); + stackPaneParent.getStyleClass().add("combo_box_pane_parent"); - stackPaneParent.getChildren().addListener(new ListChangeListener() + stackPaneParent.getChildren().addListener((ListChangeListener) c -> { - @Override - public void onChanged(Change c) { - if(stackPaneParent.getChildren().size() > 0) - { - stackPaneParent.setVisible(true); - stackPaneParent.toFront(); - } - else - { - stackPaneParent.setVisible(false); - stackPaneParent.toBack(); - } + if(stackPaneParent.getChildren().size() > 0) + { + stackPaneParent.setVisible(true); + stackPaneParent.toFront(); + } + else + { + stackPaneParent.setVisible(false); + stackPaneParent.toBack(); } }); } - + + /** + * Constructor to create Combo Box with all the options + * @param options List of Options + */ public StreamPiComboBox(List options) { setup(); @@ -54,17 +79,27 @@ public class StreamPiComboBox extends setOptions(options); } + /** + * @return List of Combo Box Options + */ public List getOptions() { return options; } + /** + * Constructor to create Combo Box with empty list + */ public StreamPiComboBox() { setup(); } private Label currentSelectedLabel; + + /** + * init of Combo Box + */ private void setup() { buttons = new ArrayList<>(); @@ -73,6 +108,7 @@ public class StreamPiComboBox extends setOnMouseClicked(event->show()); currentSelectedLabel = new Label(); + currentSelectedLabel.getStyleClass().add("combo_box_current_selected_label"); FontIcon fontIcon = new FontIcon(); fontIcon.getStyleClass().add("combo_box_drop_down_icon"); @@ -84,16 +120,22 @@ public class StreamPiComboBox extends ); } + /** + * Set Combo Box options + * @param options Combo Box Options + */ public void setOptions(List options) { this.options = options; setCurrentSelectedItemIndex(0); } - private int currentIndex = 0; private List buttons; + /** + * @return Final Scroll Pane + */ public ScrollPane getPopupScrollPane() { buttons.clear(); @@ -101,7 +143,6 @@ public class StreamPiComboBox extends ScrollPane scrollPane = new ScrollPane(); scrollPane.setHbarPolicy(ScrollBarPolicy.NEVER); scrollPane.setVbarPolicy(ScrollBarPolicy.AS_NEEDED); - scrollPane.getStyleClass().add("combo_box_popup"); VBox vBox = new VBox(); @@ -116,6 +157,7 @@ public class StreamPiComboBox extends String displayText = streamPiComboBoxFactory.getOptionDisplayText(eachOptionObj); ToggleButton optionButton = new ToggleButton(displayText); + optionButton.getStyleClass().add("combo_box_list_option_button"); optionButton.setSelected(i == currentIndex); optionButton.setUserData(i); optionButton.setOnAction(event-> @@ -134,16 +176,25 @@ public class StreamPiComboBox extends return scrollPane; } + /** + * @return Current Selected Option Index + */ public int getCurrentIndex() { return currentIndex; } + /** + * @return Current Selected Item + */ public T getCurrentSelectedItem() { return options.get(currentIndex); } + /** + * @param index Current item index to be selected + */ public void setCurrentSelectedItemIndex(int index) { this.currentIndex = index; @@ -151,6 +202,9 @@ public class StreamPiComboBox extends setCurrentSelectedLabelText(streamPiComboBoxFactory.getOptionDisplayText(options.get(index))); } + /** + * @param text Name of the option + */ private void setCurrentSelectedLabelText(String text) { currentSelectedLabel.setText(text); @@ -158,12 +212,20 @@ public class StreamPiComboBox extends private StreamPiComboBoxListener streamPiComboBoxListener = null; + /** + * Set on click Listener + * @param streamPiComboBoxListener Combo Box Listener, triggered when an option is clicked + */ public void setStreamPiComboBoxListener(StreamPiComboBoxListener streamPiComboBoxListener) { this.streamPiComboBoxListener = streamPiComboBoxListener; } private Node popupNode; + + /** + * Adds the Combo Box to the parent node + */ public void show() { Platform.runLater(()->{ @@ -172,6 +234,9 @@ public class StreamPiComboBox extends }); } + /** + * Removes the combo box from the parent pane + */ public void destroy() { Platform.runLater(()->{ @@ -180,6 +245,10 @@ public class StreamPiComboBox extends } private StreamPiComboBoxFactory streamPiComboBoxFactory; + + /** + * @param streamPiComboBoxFactory Factory for the Combo Box + */ public void setStreamPiComboBoxFactory(StreamPiComboBoxFactory streamPiComboBoxFactory) { this.streamPiComboBoxFactory = streamPiComboBoxFactory; --- 'a/src/main/java/com/stream_pi/util/combobox/StreamPiComboBoxFactory.java' +++ b/src/main/java/com/stream_pi/util/combobox/StreamPiComboBoxFactory.java @@ -1,3 +1,19 @@ +/* +Stream-Pi - Free & Open-Source Modular Cross-Platform Programmable Macro Pad +Copyright (C) 2019-2021 Debayan Sutradhar (rnayabed), Samuel Quiñones (SamuelQuinones) + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +Originally Written by : Debayan Sutradhar (rnayabed) +*/ + package com.stream_pi.util.combobox; public abstract class StreamPiComboBoxFactory --- 'a/src/main/java/com/stream_pi/util/combobox/StreamPiComboBoxListener.java' +++ b/src/main/java/com/stream_pi/util/combobox/StreamPiComboBoxListener.java @@ -1,3 +1,19 @@ +/* +Stream-Pi - Free & Open-Source Modular Cross-Platform Programmable Macro Pad +Copyright (C) 2019-2021 Debayan Sutradhar (rnayabed), Samuel Quiñones (SamuelQuinones) + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +Originally Written by : Debayan Sutradhar (rnayabed) +*/ + package com.stream_pi.util.combobox; public abstract class StreamPiComboBoxListener { --- 'a/src/main/java/com/stream_pi/util/exception/MinorException.java' +++ b/src/main/java/com/stream_pi/util/exception/MinorException.java @@ -1,3 +1,19 @@ +/* +Stream-Pi - Free & Open-Source Modular Cross-Platform Programmable Macro Pad +Copyright (C) 2019-2021 Debayan Sutradhar (rnayabed), Samuel Quiñones (SamuelQuinones) + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +Originally Written by : Debayan Sutradhar (rnayabed) +*/ + package com.stream_pi.util.exception; public class MinorException extends StreamPiException { --- 'a/src/main/java/com/stream_pi/util/exception/SevereException.java' +++ b/src/main/java/com/stream_pi/util/exception/SevereException.java @@ -1,3 +1,19 @@ +/* +Stream-Pi - Free & Open-Source Modular Cross-Platform Programmable Macro Pad +Copyright (C) 2019-2021 Debayan Sutradhar (rnayabed), Samuel Quiñones (SamuelQuinones) + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +Originally Written by : Debayan Sutradhar (rnayabed) +*/ + package com.stream_pi.util.exception; public class SevereException extends StreamPiException{ --- 'a/src/main/java/com/stream_pi/util/exception/StreamPiException.java' +++ b/src/main/java/com/stream_pi/util/exception/StreamPiException.java @@ -1,3 +1,19 @@ +/* +Stream-Pi - Free & Open-Source Modular Cross-Platform Programmable Macro Pad +Copyright (C) 2019-2021 Debayan Sutradhar (rnayabed), Samuel Quiñones (SamuelQuinones) + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +Originally Written by : Debayan Sutradhar (rnayabed) +*/ + package com.stream_pi.util.exception; public class StreamPiException extends Exception { --- 'a/src/main/java/com/stream_pi/util/iohelper/IOHelper.java' +++ b/src/main/java/com/stream_pi/util/iohelper/IOHelper.java @@ -1,3 +1,19 @@ +/* +Stream-Pi - Free & Open-Source Modular Cross-Platform Programmable Macro Pad +Copyright (C) 2019-2021 Debayan Sutradhar (rnayabed), Samuel Quiñones (SamuelQuinones) + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +Originally Written by : Debayan Sutradhar (rnayabed) +*/ + package com.stream_pi.util.iohelper; import java.io.File; --- 'a/src/main/java/com/stream_pi/util/loggerhelper/StreamPiLogFallbackHandler.java' +++ b/src/main/java/com/stream_pi/util/loggerhelper/StreamPiLogFallbackHandler.java @@ -1,3 +1,19 @@ +/* +Stream-Pi - Free & Open-Source Modular Cross-Platform Programmable Macro Pad +Copyright (C) 2019-2021 Debayan Sutradhar (rnayabed), Samuel Quiñones (SamuelQuinones) + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +Originally Written by : Debayan Sutradhar (rnayabed) +*/ + package com.stream_pi.util.loggerhelper; import java.util.logging.ConsoleHandler; --- 'a/src/main/java/com/stream_pi/util/loggerhelper/StreamPiLogFileHandler.java' +++ b/src/main/java/com/stream_pi/util/loggerhelper/StreamPiLogFileHandler.java @@ -1,3 +1,19 @@ +/* +Stream-Pi - Free & Open-Source Modular Cross-Platform Programmable Macro Pad +Copyright (C) 2019-2021 Debayan Sutradhar (rnayabed), Samuel Quiñones (SamuelQuinones) + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +Originally Written by : Debayan Sutradhar (rnayabed) +*/ + package com.stream_pi.util.loggerhelper; import java.util.logging.FileHandler; --- 'a/src/main/java/com/stream_pi/util/loggerhelper/StreamPiLogFormatter.java' +++ b/src/main/java/com/stream_pi/util/loggerhelper/StreamPiLogFormatter.java @@ -1,3 +1,19 @@ +/* +Stream-Pi - Free & Open-Source Modular Cross-Platform Programmable Macro Pad +Copyright (C) 2019-2021 Debayan Sutradhar (rnayabed), Samuel Quiñones (SamuelQuinones) + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +Originally Written by : Debayan Sutradhar (rnayabed) +*/ + package com.stream_pi.util.loggerhelper; import java.util.logging.LogRecord; --- 'a/src/main/java/com/stream_pi/util/platform/Platform.java' +++ b/src/main/java/com/stream_pi/util/platform/Platform.java @@ -1,3 +1,19 @@ +/* +Stream-Pi - Free & Open-Source Modular Cross-Platform Programmable Macro Pad +Copyright (C) 2019-2021 Debayan Sutradhar (rnayabed), Samuel Quiñones (SamuelQuinones) + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +Originally Written by : Debayan Sutradhar (rnayabed) +*/ + package com.stream_pi.util.platform; public enum Platform { --- 'a/src/main/java/com/stream_pi/util/platform/ReleaseStatus.java' +++ b/src/main/java/com/stream_pi/util/platform/ReleaseStatus.java @@ -1,11 +1,20 @@ /* -ReleaseStatus.java +Stream-Pi - Free & Open-Source Modular Cross-Platform Programmable Macro Pad +Copyright (C) 2019-2021 Debayan Sutradhar (rnayabed), Samuel Quiñones (SamuelQuinones) -Written By : Debayan Sutradhar (@rnayabed) +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. -Enum to store the current status of the Server Release +Originally Written by : Debayan Sutradhar (rnayabed) */ + package com.stream_pi.util.platform; public enum ReleaseStatus { --- 'a/src/main/java/com/stream_pi/util/startatboot/SoftwareType.java' +++ b/src/main/java/com/stream_pi/util/startatboot/SoftwareType.java @@ -1,3 +1,19 @@ +/* +Stream-Pi - Free & Open-Source Modular Cross-Platform Programmable Macro Pad +Copyright (C) 2019-2021 Debayan Sutradhar (rnayabed), Samuel Quiñones (SamuelQuinones) + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +Originally Written by : Debayan Sutradhar (rnayabed) +*/ + package com.stream_pi.util.startatboot; public enum SoftwareType { --- 'a/src/main/java/com/stream_pi/util/startatboot/StartAtBoot.java' +++ b/src/main/java/com/stream_pi/util/startatboot/StartAtBoot.java @@ -1,3 +1,19 @@ +/* +Stream-Pi - Free & Open-Source Modular Cross-Platform Programmable Macro Pad +Copyright (C) 2019-2021 Debayan Sutradhar (rnayabed), Samuel Quiñones (SamuelQuinones) + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +Originally Written by : Debayan Sutradhar (rnayabed) +*/ + package com.stream_pi.util.startatboot; import com.stream_pi.util.platform.Platform; --- 'a/src/main/java/com/stream_pi/util/uihelper/HBoxInputBox.java' +++ b/src/main/java/com/stream_pi/util/uihelper/HBoxInputBox.java @@ -1,3 +1,19 @@ +/* +Stream-Pi - Free & Open-Source Modular Cross-Platform Programmable Macro Pad +Copyright (C) 2019-2021 Debayan Sutradhar (rnayabed), Samuel Quiñones (SamuelQuinones) + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +Originally Written by : Debayan Sutradhar (rnayabed) +*/ + package com.stream_pi.util.uihelper; import javafx.geometry.Insets; --- 'a/src/main/java/com/stream_pi/util/uihelper/HBoxInputBoxWithFileChooser.java' +++ b/src/main/java/com/stream_pi/util/uihelper/HBoxInputBoxWithFileChooser.java @@ -1,3 +1,19 @@ +/* +Stream-Pi - Free & Open-Source Modular Cross-Platform Programmable Macro Pad +Copyright (C) 2019-2021 Debayan Sutradhar (rnayabed), Samuel Quiñones (SamuelQuinones) + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +Originally Written by : Debayan Sutradhar (rnayabed) +*/ + package com.stream_pi.util.uihelper; import javafx.geometry.Insets; --- 'a/src/main/java/com/stream_pi/util/uihelper/SpaceFiller.java' +++ b/src/main/java/com/stream_pi/util/uihelper/SpaceFiller.java @@ -1,3 +1,19 @@ +/* +Stream-Pi - Free & Open-Source Modular Cross-Platform Programmable Macro Pad +Copyright (C) 2019-2021 Debayan Sutradhar (rnayabed), Samuel Quiñones (SamuelQuinones) + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +Originally Written by : Debayan Sutradhar (rnayabed) +*/ + package com.stream_pi.util.uihelper; import javafx.scene.layout.HBox; --- 'a/src/main/java/com/stream_pi/util/version/Version.java' +++ b/src/main/java/com/stream_pi/util/version/Version.java @@ -1,3 +1,19 @@ +/* +Stream-Pi - Free & Open-Source Modular Cross-Platform Programmable Macro Pad +Copyright (C) 2019-2021 Debayan Sutradhar (rnayabed), Samuel Quiñones (SamuelQuinones) + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +Originally Written by : Debayan Sutradhar (rnayabed) +*/ + package com.stream_pi.util.version; --- 'a/src/main/java/com/stream_pi/util/xmlconfighelper/XMLConfigHelper.java' +++ b/src/main/java/com/stream_pi/util/xmlconfighelper/XMLConfigHelper.java @@ -1,3 +1,20 @@ +/* +Stream-Pi - Free & Open-Source Modular Cross-Platform Programmable Macro Pad +Copyright (C) 2019-2021 Debayan Sutradhar (rnayabed), Samuel Quiñones (SamuelQuinones) + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +Originally Written by : Debayan Sutradhar (rnayabed) +*/ + + package com.stream_pi.util.xmlconfighelper; import java.io.File; --- 'a/src/main/java/module-info.java' +++ b/src/main/java/module-info.java @@ -1,11 +1,26 @@ -module com.stream_pi.util { +/* +Stream-Pi - Free & Open-Source Modular Cross-Platform Programmable Macro Pad +Copyright (C) 2019-2021 Debayan Sutradhar (rnayabed), Samuel Quiñones (SamuelQuinones) +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +Originally Written by : Debayan Sutradhar (rnayabed) +*/ + +module com.stream_pi.util +{ requires transitive org.kordamp.ikonli.javafx; requires transitive org.kordamp.ikonli.fontawesome5; requires transitive javafx.base; requires transitive java.logging; requires transitive javafx.controls; - requires transitive java.xml; exports com.stream_pi.util.version;