util

Clone or download

Documentation, Refactoring

Modified Files

A README.md
+21 −0
--- /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`
+
+
M pom.xml
+1 −8
--- 'a/pom.xml'
+++ b/pom.xml
@@ -38,20 +38,15 @@
</plugins>
</build>
-
-
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
-
<IkonliVersion>11.5.0</IkonliVersion>
<IkonliFA5PackVersion>11.5.0</IkonliFA5PackVersion>
-
- <JavaFXVersion>16-ea+5</JavaFXVersion>
-
+ <JavaFXVersion>16-ea+6</JavaFXVersion>
</properties>
<dependencies>
@@ -74,8 +69,6 @@
<version>${JavaFXVersion}</version>
</dependency>
-
-
<dependency>
<groupId>org.kordamp.ikonli</groupId>
<artifactId>ikonli-javafx</artifactId>
--- '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<Node>()
+ stackPaneParent.getChildren().addListener((ListChangeListener<Node>) c ->
{
- @Override
- public void onChanged(Change<? extends Node> 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 <T> Combo Box List Type
+ */
public class StreamPiComboBox<T> extends HBox
{
private List<T> 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<Node>()
+ stackPaneParent.getChildren().addListener((ListChangeListener<Node>) c ->
{
- @Override
- public void onChanged(Change<? extends Node> 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<T> options)
{
setup();
@@ -54,17 +79,27 @@ public class StreamPiComboBox<T> extends
setOptions(options);
}
+ /**
+ * @return List of Combo Box Options
+ */
public List<T> 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<T> 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<T> extends
);
}
+ /**
+ * Set Combo Box options
+ * @param options Combo Box Options
+ */
public void setOptions(List<T> options)
{
this.options = options;
setCurrentSelectedItemIndex(0);
}
-
private int currentIndex = 0;
private List<ToggleButton> buttons;
+ /**
+ * @return Final Scroll Pane
+ */
public ScrollPane getPopupScrollPane()
{
buttons.clear();
@@ -101,7 +143,6 @@ public class StreamPiComboBox<T> 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<T> 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<T> 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<T> 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<T> extends
private StreamPiComboBoxListener<T> streamPiComboBoxListener = null;
+ /**
+ * Set on click Listener
+ * @param streamPiComboBoxListener Combo Box Listener, triggered when an option is clicked
+ */
public void setStreamPiComboBoxListener(StreamPiComboBoxListener<T> 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<T> extends
});
}
+ /**
+ * Removes the combo box from the parent pane
+ */
public void destroy()
{
Platform.runLater(()->{
@@ -180,6 +245,10 @@ public class StreamPiComboBox<T> extends
}
private StreamPiComboBoxFactory<T> streamPiComboBoxFactory;
+
+ /**
+ * @param streamPiComboBoxFactory Factory for the Combo Box
+ */
public void setStreamPiComboBoxFactory(StreamPiComboBoxFactory<T> 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<T>
--- '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<T> {
--- '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;