diff --git a/README.md b/README.md
index 258b5762..e876a324 100644
--- a/README.md
+++ b/README.md
@@ -52,7 +52,7 @@ Finely control access with a degree of customization that can accommodate even t
one.jpro.platform
jpro-auth
- 0.2.6-SNAPSHOT
+ 0.2.7-SNAPSHOT
```
@@ -60,7 +60,7 @@ Finely control access with a degree of customization that can accommodate even t
#### Gradle configuration
```groovy
dependencies {
- implementation("one.jpro.platform:jpro-auth:0.2.6-SNAPSHOT")
+ implementation("one.jpro.platform:jpro-auth:0.2.7-SNAPSHOT")
}
```
@@ -117,7 +117,7 @@ to the desired size.
one.jpro.platform
jpro-image-manager
- 0.2.6-SNAPSHOT
+ 0.2.7-SNAPSHOT
```
@@ -125,7 +125,7 @@ to the desired size.
#### Gradle configuration
```groovy
dependencies {
- implementation("one.jpro.platform:jpro-image-manager:0.2.6-SNAPSHOT")
+ implementation("one.jpro.platform:jpro-image-manager:0.2.7-SNAPSHOT")
}
```
@@ -140,7 +140,7 @@ all while utilizing the same codebase.
one.jpro.platform
jpro-media
- 0.2.6-SNAPSHOT
+ 0.2.7-SNAPSHOT
@@ -169,7 +169,7 @@ plugins {
}
dependencies {
- implementation("one.jpro.platform:jpro-media:0.2.6-SNAPSHOT")
+ implementation("one.jpro.platform:jpro-media:0.2.7-SNAPSHOT")
implementation "org.bytedeco:javacv-platform:1.5.9" // use compileOnly configuration when running/deploying with JPro
runtimeOnly 'org.bytedeco:flandmark-platform:1.07-1.5.8' // when running on desktop/device only
}
@@ -188,7 +188,7 @@ Currently, there are three routing modules available:
one.jpro.platform
jpro-routing-core
- 0.2.6-SNAPSHOT
+ 0.2.7-SNAPSHOT
```
@@ -196,7 +196,7 @@ Currently, there are three routing modules available:
#### Gradle configuration
```groovy
dependencies {
- implementation("one.jpro.platform:jpro-routing-core:0.2.6-SNAPSHOT")
+ implementation("one.jpro.platform:jpro-routing-core:0.2.7-SNAPSHOT")
}
```
@@ -208,7 +208,7 @@ dependencies {
one.jpro.platform
jpro-routing-dev
- 0.2.6-SNAPSHOT
+ 0.2.7-SNAPSHOT
```
@@ -216,7 +216,7 @@ dependencies {
#### Gradle configuration
```groovy
dependencies {
- implementation("one.jpro.platform:jpro-routing-dev:0.2.6-SNAPSHOT")
+ implementation("one.jpro.platform:jpro-routing-dev:0.2.7-SNAPSHOT")
}
```
@@ -228,7 +228,7 @@ dependencies {
one.jpro.platform
jpro-routing-popup
- 0.2.6-SNAPSHOT
+ 0.2.7-SNAPSHOT
```
@@ -236,7 +236,7 @@ dependencies {
#### Gradle configuration
```groovy
dependencies {
- implementation("one.jpro.platform:jpro-routing-popup:0.2.6-SNAPSHOT")
+ implementation("one.jpro.platform:jpro-routing-popup:0.2.7-SNAPSHOT")
}
```
@@ -249,7 +249,7 @@ This library allows you to render Markdown formatted content in your **JPro/Java
one.jpro.platform
jpro-mdfx
- 0.2.6-SNAPSHOT
+ 0.2.7-SNAPSHOT
```
@@ -257,7 +257,7 @@ This library allows you to render Markdown formatted content in your **JPro/Java
#### Gradle configuration
```groovy
dependencies {
- implementation("one.jpro.platform:jpro-mdfx:0.2.6-SNAPSHOT")
+ implementation("one.jpro.platform:jpro-mdfx:0.2.7-SNAPSHOT")
}
```
@@ -272,7 +272,7 @@ This data is only accessible in the JPro Server, not in the browser - which can
one.jpro.platform
jpro-sessions
- 0.2.6-SNAPSHOT
+ 0.2.7-SNAPSHOT
```
@@ -280,7 +280,7 @@ This data is only accessible in the JPro Server, not in the browser - which can
#### Gradle configuration
```groovy
dependencies {
- implementation("one.jpro.platform:jpro-sessions:0.2.6-SNAPSHOT")
+ implementation("one.jpro.platform:jpro-sessions:0.2.7-SNAPSHOT")
}
```
@@ -309,7 +309,7 @@ Provides a skin implementation of a scrollpane for **JPro** applications only.
one.jpro.platform
jpro-html-scrollpane
- 0.2.6-SNAPSHOT
+ 0.2.7-SNAPSHOT
```
@@ -317,7 +317,7 @@ Provides a skin implementation of a scrollpane for **JPro** applications only.
#### Gradle configuration
```groovy
dependencies {
- implementation("one.jpro.platform:jpro-html-scrollpane:0.2.6-SNAPSHOT")
+ implementation("one.jpro.platform:jpro-html-scrollpane:0.2.7-SNAPSHOT")
}
```
@@ -336,14 +336,14 @@ bug-free and leak-free applications.
one.jpro.platform
tree-showing
- 0.2.6-SNAPSHOT
+ 0.2.7-SNAPSHOT
```
#### Gradle configuration
```groovy
dependencies {
- implementation 'one.jpro.platform:tree-showing:0.2.6-SNAPSHOT'
+ implementation 'one.jpro.platform:tree-showing:0.2.7-SNAPSHOT'
}
```
@@ -375,7 +375,7 @@ This can be useful for debugging purposes, detecting deadlocks or other optimize
one.jpro.platform
freeze-detector
- 0.2.6-SNAPSHOT
+ 0.2.7-SNAPSHOT
```
@@ -383,6 +383,6 @@ This can be useful for debugging purposes, detecting deadlocks or other optimize
#### Gradle configuration
```groovy
dependencies {
- implementation 'one.jpro.platform:freeze-detector:0.2.6-SNAPSHOT'
+ implementation 'one.jpro.platform:freeze-detector:0.2.7-SNAPSHOT'
}
```
diff --git a/ensemble/samples/build.gradle b/ensemble/samples/build.gradle
new file mode 100644
index 00000000..b954c251
--- /dev/null
+++ b/ensemble/samples/build.gradle
@@ -0,0 +1,41 @@
+apply plugin: 'org.openjfx.javafxplugin'
+
+repositories {
+ mavenCentral()
+ maven {
+ url "https://sandec.jfrog.io/artifactory/repo"
+ }
+}
+
+dependencies {
+ implementation project(":jpro-html-scrollpane:example")
+ implementation project(":jpro-mdfx:example")
+ implementation project(":jpro-media:example")
+}
+
+javafx {
+ version = "$JAVAFX_VERSION"
+ modules = [ 'javafx.graphics', 'javafx.controls','javafx.swing', 'javafx.fxml', 'javafx.media', 'javafx.web' ]
+}
+
+apply plugin: 'maven-publish'
+publishing {
+ publications {
+ mavenJava(MavenPublication) {
+ from components.java
+ groupId "one.jpro.samples"
+ artifactId project.name
+ version JPRO_PLATFORM_VERSION
+ }
+ }
+ repositories {
+ maven {
+ name = "artifactory"
+ url = "https://sandec.jfrog.io/artifactory/repo"
+ credentials {
+ username System.getenv("SANDEC_ARTIFACTORY_USERNAME")
+ password System.getenv("SANDEC_ARTIFACTORY_PASSWORD")
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/ensemble/samples/src/main/resources/MediaPlayerSample.png b/ensemble/samples/src/main/resources/MediaPlayerSample.png
new file mode 100644
index 00000000..98d18119
Binary files /dev/null and b/ensemble/samples/src/main/resources/MediaPlayerSample.png differ
diff --git a/ensemble/samples/src/main/resources/ensemble-samples.json b/ensemble/samples/src/main/resources/ensemble-samples.json
new file mode 100644
index 00000000..d8aa2b8d
--- /dev/null
+++ b/ensemble/samples/src/main/resources/ensemble-samples.json
@@ -0,0 +1,26 @@
+{
+ "samples": [
+ {
+ "category": "jpro-html-scrollpane",
+ "name": "HTMLScrollPaneSample",
+ "desc": "An html scrollpane sample.",
+ "project": "jpro-platform",
+ "classname": "one.jpro.platform.htmlscrollpane.example.HTMLScrollPaneSample"
+ },
+ {
+ "category": "jpro-mdfx",
+ "name": "MarkdownViewSample",
+ "desc": "A simple markdown view sample.",
+ "project": "jpro-platform",
+ "classname": "one.jpro.platform.mdfx.example.MarkdownViewSample"
+ },
+ {
+ "category": "jpro-media",
+ "name": "MediaPlayerSample",
+ "desc": "A simple media player sample.",
+ "project": "jpro-platform",
+ "preview": "MediaPlayerSample.png",
+ "classname": "one.jpro.platform.media.example.MediaPlayerSample"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/ensemble/site/build.gradle b/ensemble/site/build.gradle
new file mode 100644
index 00000000..6dcc1c8d
--- /dev/null
+++ b/ensemble/site/build.gradle
@@ -0,0 +1,34 @@
+buildscript {
+ repositories {
+ gradlePluginPortal()
+
+ maven {
+ url "https://sandec.jfrog.io/artifactory/repo"
+ }
+ }
+
+ dependencies {
+ classpath "one.jpro:jpro-gradle-plugin:$JPRO_VERSION"
+ classpath "org.openjfx:javafx-plugin:$JAVAFX_PLUGIN_VERSION"
+ classpath "com.javafxensemble.website:ensemble-gradle-plugin:$ENSEMBLE_GRADLE_PLUGIN_VERSION"
+ }
+}
+
+repositories {
+ mavenCentral()
+}
+
+apply plugin: 'ensemble'
+
+dependencies {
+ compileOnly project(":ensemble:samples")
+}
+
+ensemble {
+ log = true
+ includeProject("jpro-samples", project(":ensemble:samples"))
+}
+
+afterEvaluate {
+ println("jpro.localJVMArgs: " + jpro.localJVMArgs)
+}
\ No newline at end of file
diff --git a/gradle.properties b/gradle.properties
index aafaf2ce..fa97c2ae 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -9,6 +9,8 @@ JAVAFX_PLUGIN_VERSION = 0.0.14
OSDETECTOR_PLUGIN_VERSION = 1.7.3
SCENIC_VIEW_VERSION = 11.0.3-SNAPSHOT-FORK
+ENSEMBLE_GRADLE_PLUGIN_VERSION=0.1.0-SNAPSHOT
+
JAVACPP_VERSION = 1.5.9
JAVACV_VERSION = 1.5.9
JSON_VERSION = 20230618
diff --git a/jpro-html-scrollpane/example/src/main/java/one/jpro/platform/htmlscrollpane/example/HTMLScrollPaneSample.java b/jpro-html-scrollpane/example/src/main/java/one/jpro/platform/htmlscrollpane/example/HTMLScrollPaneSample.java
index 95b48d32..3b9f1919 100644
--- a/jpro-html-scrollpane/example/src/main/java/one/jpro/platform/htmlscrollpane/example/HTMLScrollPaneSample.java
+++ b/jpro-html-scrollpane/example/src/main/java/one/jpro/platform/htmlscrollpane/example/HTMLScrollPaneSample.java
@@ -3,11 +3,22 @@
import javafx.application.Application;
import javafx.scene.Parent;
import javafx.scene.Scene;
+import javafx.scene.control.Label;
import javafx.scene.control.ScrollPane;
import javafx.scene.layout.VBox;
+import javafx.scene.text.Font;
import javafx.stage.Stage;
import one.jpro.platform.htmlscrollpane.HTMLScrollPaneSkin;
+/**
+ * The HTMLScrollPaneSample class is an application that creates a JavaFX scrollable pane
+ * with HTML-like formatting for the content.
+ *
+ * To use this class, create an instance of the class and call the start() method.
+ *
+ * @author Florian Kirmaier
+ * @author Besmir Beqiri
+ */
public class HTMLScrollPaneSample extends Application {
@Override
@@ -17,14 +28,23 @@ public void start(Stage primaryStage) {
primaryStage.show();
}
+ /**
+ * Creates the root element for the application.
+ *
+ * This method creates a ScrollPane with a VBox containing 100 labels. Each label displays a numbered sentence.
+ * The font size of each label increases with the index. The scroll pane is then returned as the root element.
+ *
+ * @return The root node of the application.
+ */
public Parent createRoot() {
- VBox content = new VBox();
- for (int i = 0; i < 100; i++) {
+ final var content = new VBox();
+ for (int i = 1; i <= 100; i++) {
// add a label
- javafx.scene.control.Label label = new javafx.scene.control.Label("Label " + i);
+ final var label = new Label(String.format("%2d) The quick brown fox jumps over the lazy dog.", i));
+ label.setFont(Font.font("Arial", 12 + i));
content.getChildren().add(label);
}
- ScrollPane scrollPane = new ScrollPane();
+ final var scrollPane = new ScrollPane();
scrollPane.setContent(content);
scrollPane.setSkin(new HTMLScrollPaneSkin(scrollPane));
diff --git a/jpro-html-scrollpane/src/main/java/one/jpro/platform/htmlscrollpane/HTMLScrollPaneSkin.java b/jpro-html-scrollpane/src/main/java/one/jpro/platform/htmlscrollpane/HTMLScrollPaneSkin.java
index 76acba5f..bca449da 100644
--- a/jpro-html-scrollpane/src/main/java/one/jpro/platform/htmlscrollpane/HTMLScrollPaneSkin.java
+++ b/jpro-html-scrollpane/src/main/java/one/jpro/platform/htmlscrollpane/HTMLScrollPaneSkin.java
@@ -111,7 +111,7 @@ public void setupHTMLView(WebAPI webapi) {
// DO CSS BRIDGE
PopupControl contentPage = new PopupControl();
contentPage.setSkin(new WeakPopupControlSkin(htmlViewContent));
- contentPage.getProperties().put("APP", null);
+ String windowId = webapi.registerWindow(contentPage);
widthListener = (p, o, n) -> htmlViewContent.prefWidthProperty().set(n.doubleValue());
((Region) getNode()).widthProperty().addListener(new WeakChangeListener<>(widthListener));
@@ -131,8 +131,6 @@ public void setupHTMLView(WebAPI webapi) {
}
});
- String windowId = webapi.registerWindow(contentPage);
-
String number = "" + new Random().nextInt(1000000);
String id = "scrollelem_" + number;
String idapp = "scrollelemapp_" + number;
diff --git a/jpro-media/DOCUMENTATION.md b/jpro-media/DOCUMENTATION.md
index c825db51..a633ac82 100644
--- a/jpro-media/DOCUMENTATION.md
+++ b/jpro-media/DOCUMENTATION.md
@@ -37,7 +37,7 @@ plugins {
}
dependencies {
- implementation 'one.jpro.platform:jpro-media:0.2.6-SNAPSHOT'
+ implementation 'one.jpro.platform:jpro-media:0.2.7-SNAPSHOT'
runtimeOnly 'org.bytedeco:flandmark-platform:1.07-1.5.8' // when running on desktop/device only
// use compileOnly configuration when running/deploying with JPro,
@@ -73,7 +73,7 @@ the `release` zipped file. Even the `jpro:run` task is faster since these files
one.jpro.platform
jpro-media
- 0.2.6-SNAPSHOT
+ 0.2.7-SNAPSHOT
org.bytedeco
@@ -348,4 +348,4 @@ public class MediaRecorderApplication extends Application {
}
```
### More examples
-For more examples, please take a look at the [JPro Media Examples](https://github.com/JPro-one/jpro-utils/tree/master/example/src/main/java/one/jpro/example/media/).
\ No newline at end of file
+For more examples, please take a look at the [JPro Media Examples](https://github.com/JPro-one/jpro-platform/tree/main/jpro-media/example/src/main/java/one/jpro/platform/media/example).
\ No newline at end of file
diff --git a/jpro-media/example/src/main/java/one/jpro/platform/media/example/MediaPlayerSample.java b/jpro-media/example/src/main/java/one/jpro/platform/media/example/MediaPlayerSample.java
index c28269ca..50b9577c 100644
--- a/jpro-media/example/src/main/java/one/jpro/platform/media/example/MediaPlayerSample.java
+++ b/jpro-media/example/src/main/java/one/jpro/platform/media/example/MediaPlayerSample.java
@@ -1,6 +1,7 @@
package one.jpro.platform.media.example;
import atlantafx.base.theme.CupertinoLight;
+import atlantafx.base.theme.Theme;
import javafx.application.Application;
import javafx.scene.Parent;
import javafx.scene.Scene;
@@ -32,7 +33,9 @@ public class MediaPlayerSample extends Application {
public void start(Stage stage) {
stage.setTitle("JPro Media Player");
Scene scene = new Scene(createRoot(stage), 1140, 640);
- scene.setUserAgentStylesheet(new CupertinoLight().getUserAgentStylesheet());
+ Optional.ofNullable(Theme.class.getResource(new CupertinoLight().getUserAgentStylesheet()))
+ .map(URL::toExternalForm)
+ .ifPresent(scene::setUserAgentStylesheet);
stage.setScene(scene);
stage.show();
}
diff --git a/settings.gradle b/settings.gradle
index d89e7a53..590c14c8 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -19,5 +19,7 @@ include "jpro-html-scrollpane:example"
include "tree-showing"
include "freeze-detector"
include "example"
+include "ensemble:samples"
+include "ensemble:site"
rootProject.name = "jpro-platform"
\ No newline at end of file