From a766b57c97f95dfd7b86b0d028b05bf9fdfb7225 Mon Sep 17 00:00:00 2001 From: dave Date: Sat, 9 Nov 2024 12:20:28 +0000 Subject: [PATCH] Initial public version --- java/embedControlJavaFx/README.md | 22 +++++++++- .../jfxapp/panel/RemoteConnectionPanel.java | 5 +++ .../src/main/resources/formManager.fxml | 40 ------------------- 3 files changed, 26 insertions(+), 41 deletions(-) delete mode 100644 java/embedControlJavaFx/src/main/resources/formManager.fxml diff --git a/java/embedControlJavaFx/README.md b/java/embedControlJavaFx/README.md index 96b5097..e9a5532 100644 --- a/java/embedControlJavaFx/README.md +++ b/java/embedControlJavaFx/README.md @@ -2,7 +2,27 @@ Contained in this package is the source code for the complete user interface that connects to a remote device running tcMenu, as long as the board is using one of the supported Serial or Network based plugins. -Before releasing a package based on this we recommend that you change the icons and naming, especially if releasing publicly. +## Customizing the application + +It is likely before any public release that you'll want to customize the application. This can easily be acheived by editing the images and forms stored in the `src/main/resources` folder. A few of the most common ones are provided here: + +* `fximg/large_icon.png` is the icon drawn by the application forms. +* `fximg/embedCONTROL.ico` is the start up application icon, only used by the packager on Windows +* `fximg/MyIcons.icns` is the start up application icon, only used by the packager on macOS +* `aboutPage.fxml` is the JavaFX form definition for the about window. +* `generalSettings.fxml` is the JavaFX settings form definition, only change this if you also modify the controller accordingly. +* `mainWindow.fxml` is the main window when the app starts +* `version.properties` is automatically set by maven during the build + +You can also provide your own custom pages, each page must extend from `PanelPresentable` and can be added to the navigation manager, in this case the `JfxNavigationHeader` in `RemoteConnectionPanel` using `navigationManager.addCustomMenuPanel(subMenuCustom, myPanelPresentable)`. + +## Developing the App Locally + +To develop the app locally we strongly recommend [IntelliJ either community or ultimate](https://www.jetbrains.com/idea/) but any other Java IDE should work as well. Ensure you also install the most recently available Java JDK and if you want to build from the command line, then apache maven too. + +From IntelliJ you can just create an empty project in the project root directory, and then from project structure import the maven POM file for this project. + +Once the project has fully loaded, you can run the application by opening `EmbedControlApp` and clicking on the run icon. ## Building a packaged version diff --git a/java/embedControlJavaFx/src/main/java/com/thecoderscorner/embedcontrol/jfxapp/panel/RemoteConnectionPanel.java b/java/embedControlJavaFx/src/main/java/com/thecoderscorner/embedcontrol/jfxapp/panel/RemoteConnectionPanel.java index a96df66..f2da3cd 100644 --- a/java/embedControlJavaFx/src/main/java/com/thecoderscorner/embedcontrol/jfxapp/panel/RemoteConnectionPanel.java +++ b/java/embedControlJavaFx/src/main/java/com/thecoderscorner/embedcontrol/jfxapp/panel/RemoteConnectionPanel.java @@ -49,6 +49,11 @@ import static com.thecoderscorner.menu.domain.util.MenuItemHelper.asSubMenu; import static java.lang.System.Logger.Level.*; +/// The RemoteConnectionPanel class manages a panel for remote connections within +/// the application, providing methods for initiating, editing, and managing these connections. +/// It extends `PanelPresentable` and `RemotePanelDisplayable` to integrate with the control management system. +/// The class includes methods for initializing connection components, generating UI widgets, +/// handling connection edits, and more. public class RemoteConnectionPanel implements PanelPresentable, RemotePanelDisplayable { private final System.Logger logger = System.getLogger(RemoteConnectionPanel.class.getSimpleName()); private TcMenuPersistedConnection persistedConnection; diff --git a/java/embedControlJavaFx/src/main/resources/formManager.fxml b/java/embedControlJavaFx/src/main/resources/formManager.fxml deleted file mode 100644 index e5df3d4..0000000 --- a/java/embedControlJavaFx/src/main/resources/formManager.fxml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - -
- - - - - - -
- - - - - - - - - - - -