Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/kordamp/desktoppanefx

MDI components for JavaFX
https://github.com/kordamp/desktoppanefx

Last synced: 3 months ago
JSON representation

MDI components for JavaFX

Awesome Lists containing this project

README

        

= DesktopPaneFX
:linkattrs:
:project-owner: kordamp
:project-repo: maven
:project-name: desktoppanefx
:project-group: org.kordamp.desktoppanefx
:project-version: 0.15.0

image:https://img.shields.io/github/workflow/status/{project-owner}/{project-name}/EarlyAccess?logo=github["Build Status", link="https://github.com/{project-owner}/{project-name}/actions"]
image:https://img.shields.io/maven-central/v/{project-group}/{project-name}-core.svg[link="https://search.maven.org/#search|ga|1|{project-group}"]

---

DesktopPaneFX is a JavaFX version of Swing's JDesktopPane which can be used as a container for individual "child" similar to JInternalFrames.

This project started as a fork of link:https://github.com/lincolnminto/javaFXMDI[JavaFXMDI] authored by Lincoln Minto.

image::screenshots/desktoppanefx.png[]

== Installing

You can get the latest version of **DesktopPaneFX** directly from link:https://bintray.com[Bintray's JCenter] repository or Maven Central.

[source,groovy]
[subs="attributes"]
.gradle
----
repositories {
jcenter()
}

dependencies {
implementation '{project-group}:desktoppanefx-core:{project-version}'
}
----

[source,xml]
[subs="attributes,verbatim"]
.maven
----


{project-group}
desktoppanefx-core
{project-version}

----

== org.kordamp.desktoppanefx.sampler.Example

[source,java]
----
package com.acme;

import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.layout.BorderPane;
import javafx.stage.Stage;
import org.kordamp.desktoppanefx.scene.layout.DesktopPane;
import org.kordamp.desktoppanefx.scene.layout.InternalWindow;
import org.kordamp.ikonli.javafx.FontIcon;

public class Example extends Application {
private static int count = 0;

@Override
public void start(Stage stage) throws Exception {
DesktopPane desktopPane = new DesktopPane();
Button newWindow = new Button("New Window");
newWindow.setOnAction(e -> {
InternalWindow window = new InternalWindow(
"window-" + count,
new FontIcon("mdi-application:20"),
"Title " + count++,
new Label("Content"));
desktopPane.addInternalWindow(window);
});

BorderPane mainPane = new BorderPane();
mainPane.setPrefSize(800, 600);
mainPane.setTop(newWindow);
mainPane.setCenter(desktopPane);

stage.setScene(new Scene(mainPane));
stage.show();
}
}
----

== Incubating Features

The following features can be activated by defining a System property with a `"true"` value:

[cols="2*", header]
|===
| Property | Description
| desktoppanefx.detachable.windows | `InternalWindow` may be detached/attached from/to a `DesktopPane`
|===

== Building

You must meet the following requirements:

* JDK11 as a minimum
* Gradle 6.3

You may use the included gradle wrapper script if you don't have `gradle` installed.

=== Installing Gradle

.Manual

. Download Gradle from http://gradle.org/downloads
. Unzip the file into a directory without spaces (recommended).
. Create a GRADLE_HOME environment variable that points to this directory.
. Adjust your PATH environment variable to include $GRADLE_HOME/bin (%GRADLE_HOME%\bin on Windows).
. Test your setup by invoking `gradle --version`.

.SDKMAN

. Follow the instructions found at http://sdkman.io/ to install SDKMAN.
. You need a POSIX environment if running Windows. We recommend using Babun Shell (http://babun.github.io/)
. Once SDKMAN is installed invoke `sdk install gradle 6.3`.
. Test your setup by invoking `gradle --version`.

.Gum

Gum is a wrapper script that facilitates invoking gradle tasks anywhere within a Gradle project. It's smart enough
to use the gradle wrapper if available or your global gradle command. This is an optional download.

. Follow the instructions found at https://github.com/kordamp/gm to install gum

=== Next Steps

Make a full build issuing `gm build`.

Run the sampler JavaFX application by invoking the following command

[source]
----
$ gm :sampler:run
----

=== Contributing

If you are interested in fixing issues and contributing directly to the code base, please contact us!

=== License

link:LICENSE.txt[LICENSE.txt]