Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try to support java11+, modify it to a modular project #27

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 32 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
</p>

---
- **[Modification list of this fork](#modification-content)** <br>
- **[本分叉的主要修改内容](#modification-content-zh)**

[![Latest Version](https://img.shields.io/github/release/goxr3plus/FX-BorderlessScene.svg?style=flat-square)](https://github.com/goxr3plus/FX-BorderlessScene/releases)
[![GitHub contributors][contributors-image]][contributors-url]
Expand All @@ -28,7 +30,7 @@

![java_2019-04-30_17-43-54](https://user-images.githubusercontent.com/20374208/56970311-8b0df380-6b6f-11e9-83f1-65a5e4a03b8a.png)

### Donate if you love me
### Donate if you love me

<a href="https://patreon.com/preview/8adae1b75d654b2899e04a9e1111f0eb" title="Donate to this project using Patreon"><img src="https://img.shields.io/badge/patreon-donate-yellow.svg" alt="Patreon donate button" /></a>
<a href="https://www.paypal.me/GOXR3PLUSCOMPANY" title="Donate to this project using Paypal"><img src="https://img.shields.io/badge/paypal-donate-yellow.svg" alt="PayPal donate button" /></a>
Expand All @@ -46,7 +48,7 @@

This project has been forked and further developed from [this](https://github.com/NicolasSenetLarson/BorderlessScene) github repository

### Use it with Maven , Gradle etc ... with
### Use it with Maven , Gradle etc ... with

https://jitpack.io/#goxr3plus/FX-BorderlessScene

Expand All @@ -60,8 +62,8 @@ Add JitPack on your repositories :
</repositories>
```

Add the dependency :
Add the dependency :

``` XML
<dependency>
<groupId>com.github.goxr3plus</groupId>
Expand All @@ -70,12 +72,35 @@ Add the dependency :
</dependency>
```

### > Advanced example (styling AeroSnap Window , spying window maximize status etc ) with ready code for you to run
### > Advanced example (styling AeroSnap Window , spying window maximize status etc ) with ready code for you to run

Main Window -> [here](https://github.com/goxr3plus/FX-BorderlessScene/blob/master/src/main/java/com/goxr3plus/fxborderlessscene/application/Main.java)

Main Window Controller -> [here](https://github.com/goxr3plus/FX-BorderlessScene/blob/master/src/main/java/com/goxr3plus/fxborderlessscene/application/MainWindowController.java)

### Modification content
<span id="modification-content" ></span>
- Adapt to java 11+, javafx 13+ (javafx 11 click icon can not be minimized)
- The version number is changed to 11.0.0, indicating the minimum jdk11
- Delete the dependency of the fxml module, and use java code replace the FXML file.
- Deleted jna, jna-platform dependencies; fx13+ solves the bug that transparent/undecorated stage cannot be minimized by clicking the icon.
- Deleted the Region node in the BorderlessPane, it seems that no use was found.
- The test file is moved to the test folder
- Try to modify the project into a modular project;
- application.css Change the name to borderless-scene.css

### 本分叉修改的主要内容
<span id="modification-content-zh" ></span>
- 适配java11+,javafx13+ (javafx11点击图标无法最小化)
- 版本号修改为11.0.0, 表示最小jdk11
- 删除fxml模块的依赖,把FXML文件修改成java代码.
- 删除了jna,jna-platform 依赖; fx13+解决了透明窗口和无边框窗口点击图标无法最小化的bug.
- 删除了BorderlessPane里的Region节点,似乎没有查找到用途.
- 测试类移动到了test文件夹下.
- 尝试将项目修改为模块化项目.
- application.css 改名为borderless-scene.css


### Simple example

``` JAVA
Expand Down Expand Up @@ -166,8 +191,8 @@ public class Main extends Application {

```

### [XR3Player](https://github.com/goxr3plus/XR3Player) is using this Library
### [XR3Player](https://github.com/goxr3plus/XR3Player) is using this Library
| Video|
|:-:|
| [![First](https://user-images.githubusercontent.com/20374208/48313813-34fdc180-e5ca-11e8-9da7-c6148dc0cbe5.png)](https://www.youtube.com/watch?v=7Hai7cavmUY) |
---
---
217 changes: 107 additions & 110 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,122 +1,119 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.github.goxr3plus</groupId>
<artifactId>FX-BorderlessScene</artifactId>
<version>4.4.0</version>
<name>FX-BorderlessScene</name>
<description>Undecorated JavaFX Scene with implemented move, resize, minimise, maximise, close and Windows Aero Snap controls.</description>
<url>https://github.com/goxr3plus/FX-BorderlessScene</url>
<groupId>com.github.goxr3plus</groupId>
<artifactId>FX-BorderlessScene</artifactId>
<version>11.0.0</version>
<name>FX-BorderlessScene</name>
<description>Undecorated JavaFX Scene with implemented move, resize, minimise, maximise, close and Windows Aero Snap
controls.
</description>
<url>https://github.com/goxr3plus/FX-BorderlessScene</url>

<!-- Output to jar format -->
<packaging>jar</packaging>
<!-- Output to jar format -->
<packaging>jar</packaging>

<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<build>
<sourceDirectory>${project.basedir}/src/main/java</sourceDirectory>
<resources>
<resource>
<directory>${project.basedir}/src/main/resources</directory>
</resource>
</resources>
<!-- <testSourceDirectory>testing</testSourceDirectory> -->
<plugins>
<build>
<sourceDirectory>${project.basedir}/src/main/java</sourceDirectory>
<resources>
<resource>
<directory>${project.basedir}/src/main/resources</directory>
</resource>
</resources>
<!-- <testSourceDirectory>testing</testSourceDirectory> -->
<plugins>

<!-- Source Code Plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.0.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Source Code Plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.0.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>

<!-- JavaDoc Plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- JavaDoc Plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>

<!-- Maven Compiler Plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<!-- Maven Compiler Plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<source>11</source>
<target>11</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>

<!-- Make this jar executable -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.0.2</version>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<mainClass>com.goxr3plus.fxborderlessscene.application.Main</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
<!-- Make this jar executable -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.0.2</version>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<mainClass>com.goxr3plus.fxborderlessscene.application.Main</mainClass>
</manifest>
</archive>
</configuration>
</plugin>

<!-- Copy Assemply dependency -->
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<descriptors>
<descriptor>src/assembly/assembly.xml</descriptor>
</descriptors>
</configuration>
<executions>
<execution>
<id>create-archive</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>net.java.dev.jna</groupId>
<artifactId>jna</artifactId>
<version>5.3.1</version>
</dependency>
<dependency>
<groupId>net.java.dev.jna</groupId>
<artifactId>jna-platform</artifactId>
<version>5.3.1</version>
</dependency>
</dependencies>
<!-- Copy Assemply dependency -->
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<descriptors>
<descriptor>src/assembly/assembly.xml</descriptor>
</descriptors>
</configuration>
<executions>
<execution>
<id>create-archive</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-controls</artifactId>
<version>13</version>
</dependency>
</dependencies>
</project>

This file was deleted.

Loading