Skip to content

Commit

Permalink
Merge branch 'main' into jpro-file-module
Browse files Browse the repository at this point in the history
  • Loading branch information
besidev authored Oct 23, 2023
2 parents 7005e4b + 4ab11f3 commit 60ff172
Show file tree
Hide file tree
Showing 11 changed files with 159 additions and 33 deletions.
44 changes: 22 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@ Finely control access with a degree of customization that can accommodate even t
<dependency>
<groupId>one.jpro.platform</groupId>
<artifactId>jpro-auth</artifactId>
<version>0.2.6-SNAPSHOT</version>
<version>0.2.7-SNAPSHOT</version>
</dependency>
</dependencies>
```

#### Gradle configuration
```groovy
dependencies {
implementation("one.jpro.platform:jpro-auth:0.2.6-SNAPSHOT")
implementation("one.jpro.platform:jpro-auth:0.2.7-SNAPSHOT")
}
```

Expand Down Expand Up @@ -117,15 +117,15 @@ to the desired size.
<dependency>
<groupId>one.jpro.platform</groupId>
<artifactId>jpro-image-manager</artifactId>
<version>0.2.6-SNAPSHOT</version>
<version>0.2.7-SNAPSHOT</version>
</dependency>
</dependencies>
```

#### 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")
}
```

Expand All @@ -140,7 +140,7 @@ all while utilizing the same codebase.
<dependency>
<groupId>one.jpro.platform</groupId>
<artifactId>jpro-media</artifactId>
<version>0.2.6-SNAPSHOT</version>
<version>0.2.7-SNAPSHOT</version>
</dependency>

<dependency>
Expand Down Expand Up @@ -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
}
Expand All @@ -188,15 +188,15 @@ Currently, there are three routing modules available:
<dependency>
<groupId>one.jpro.platform</groupId>
<artifactId>jpro-routing-core</artifactId>
<version>0.2.6-SNAPSHOT</version>
<version>0.2.7-SNAPSHOT</version>
</dependency>
</dependencies>
```

#### 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")
}
```

Expand All @@ -208,15 +208,15 @@ dependencies {
<dependency>
<groupId>one.jpro.platform</groupId>
<artifactId>jpro-routing-dev</artifactId>
<version>0.2.6-SNAPSHOT</version>
<version>0.2.7-SNAPSHOT</version>
</dependency>
</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")
}
```

Expand All @@ -228,15 +228,15 @@ dependencies {
<dependency>
<groupId>one.jpro.platform</groupId>
<artifactId>jpro-routing-popup</artifactId>
<version>0.2.6-SNAPSHOT</version>
<version>0.2.7-SNAPSHOT</version>
</dependency>
</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")
}
```

Expand All @@ -249,15 +249,15 @@ This library allows you to render Markdown formatted content in your **JPro/Java
<dependency>
<groupId>one.jpro.platform</groupId>
<artifactId>jpro-mdfx</artifactId>
<version>0.2.6-SNAPSHOT</version>
<version>0.2.7-SNAPSHOT</version>
</dependency>
</dependencies>
```

#### Gradle configuration
```groovy
dependencies {
implementation("one.jpro.platform:jpro-mdfx:0.2.6-SNAPSHOT")
implementation("one.jpro.platform:jpro-mdfx:0.2.7-SNAPSHOT")
}
```

Expand All @@ -272,15 +272,15 @@ This data is only accessible in the JPro Server, not in the browser - which can
<dependency>
<groupId>one.jpro.platform</groupId>
<artifactId>jpro-sessions</artifactId>
<version>0.2.6-SNAPSHOT</version>
<version>0.2.7-SNAPSHOT</version>
</dependency>
</dependencies>
```

#### Gradle configuration
```groovy
dependencies {
implementation("one.jpro.platform:jpro-sessions:0.2.6-SNAPSHOT")
implementation("one.jpro.platform:jpro-sessions:0.2.7-SNAPSHOT")
}
```

Expand Down Expand Up @@ -309,15 +309,15 @@ Provides a skin implementation of a scrollpane for **JPro** applications only.
<dependency>
<groupId>one.jpro.platform</groupId>
<artifactId>jpro-html-scrollpane</artifactId>
<version>0.2.6-SNAPSHOT</version>
<version>0.2.7-SNAPSHOT</version>
</dependency>
</dependencies>
```

#### 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")
}
```

Expand All @@ -336,14 +336,14 @@ bug-free and leak-free applications.
<dependency>
<groupId>one.jpro.platform</groupId>
<artifactId>tree-showing</artifactId>
<version>0.2.6-SNAPSHOT</version>
<version>0.2.7-SNAPSHOT</version>
</dependency>
```

#### Gradle configuration
```groovy
dependencies {
implementation 'one.jpro.platform:tree-showing:0.2.6-SNAPSHOT'
implementation 'one.jpro.platform:tree-showing:0.2.7-SNAPSHOT'
}
```

Expand Down Expand Up @@ -375,14 +375,14 @@ This can be useful for debugging purposes, detecting deadlocks or other optimize
<dependency>
<groupId>one.jpro.platform</groupId>
<artifactId>freeze-detector</artifactId>
<version>0.2.6-SNAPSHOT</version>
<version>0.2.7-SNAPSHOT</version>
</dependency>
</dependency>
```

#### Gradle configuration
```groovy
dependencies {
implementation 'one.jpro.platform:freeze-detector:0.2.6-SNAPSHOT'
implementation 'one.jpro.platform:freeze-detector:0.2.7-SNAPSHOT'
}
```
41 changes: 41 additions & 0 deletions ensemble/samples/build.gradle
Original file line number Diff line number Diff line change
@@ -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")
}
}
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 26 additions & 0 deletions ensemble/samples/src/main/resources/ensemble-samples.json
Original file line number Diff line number Diff line change
@@ -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"
}
]
}
34 changes: 34 additions & 0 deletions ensemble/site/build.gradle
Original file line number Diff line number Diff line change
@@ -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)
}
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
* <p>
* 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
Expand All @@ -17,14 +28,23 @@ public void start(Stage primaryStage) {
primaryStage.show();
}

/**
* Creates the root element for the application.
* <p>
* 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));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand All @@ -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;
Expand Down
Loading

0 comments on commit 60ff172

Please sign in to comment.