Compare commits

..

5 Commits

Author SHA1 Message Date
00b8ccc689 2021-08-22 2021-08-22 17:27:23 +09:00
fc3b0e5de8 Merge remote-tracking branch 'origin/main' into main 2021-08-22 17:22:43 +09:00
a3f4fec8b6 2021-08-22 2021-08-22 17:22:34 +09:00
Elex
d7ff1e68a7 Create LICENSE 2021-08-22 17:21:47 +09:00
Elex
6dd1d5bd69 Update settings.gradle.kts 2021-08-22 16:56:19 +09:00
20 changed files with 191 additions and 67 deletions

1
.gitignore vendored
View File

@@ -3,3 +3,4 @@
/buildSrc/build/ /buildSrc/build/
/.idea/ /.idea/
/build/ /build/
/**/build/

29
LICENSE Normal file
View File

@@ -0,0 +1,29 @@
BSD 3-Clause License
Copyright (c) 2021, Elex
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

6
README.md Normal file
View File

@@ -0,0 +1,6 @@
# JavaFX Examples
------
developed by Elex
https://www.elex-project.com/

View File

@@ -1,10 +0,0 @@
plugins {
id("elex-application")
}
application{
mainClass.set("com.elex_project.sample.Application")
}
dependencies {
}

View File

@@ -1 +0,0 @@
package com.elex_project.sample;

View File

@@ -1,14 +1,23 @@
/*
* JavaFx Examples
*
* Copyright (c) 2021. Elex. All Rights Reserved.
* https://www.elex-project.com/
*/
buildscript { buildscript {
repositories { repositories {
maven { maven {
url = uri("https://repository.elex-project.com/repository/maven") url = uri("https://repository.elex-project.com/repository/maven")
} }
} }
dependencies {
classpath ("com.jaredsburrows:gradle-license-plugin:0.8.90")
}
} }
plugins { plugins {
base
id("com.github.ben-manes.versions") version "0.39.0" id("com.github.ben-manes.versions") version "0.39.0"
} }
subprojects{
}

View File

@@ -1,3 +1,10 @@
/*
* JavaFx Examples
*
* Copyright (c) 2021. Elex. All Rights Reserved.
* https://www.elex-project.com/
*/
plugins{ plugins{
`kotlin-dsl` `kotlin-dsl`
} }

View File

@@ -1,4 +1,3 @@
plugins { plugins {
id("elex-base") id("elex-base")
application application
@@ -10,8 +9,7 @@ tasks.jar {
"Implementation-Title" to project.name, "Implementation-Title" to project.name,
"Implementation-Version" to project.version, "Implementation-Version" to project.version,
"Implementation-Vendor" to "ELEX co.,pte.", "Implementation-Vendor" to "ELEX co.,pte.",
"Main-Class" to application.mainClass, "Main-Class" to application.mainClass
"Automatic-Module-Name" to "com.elex_project.${project.name}"
)) ))
} }
} }

View File

@@ -15,8 +15,8 @@ repositories {
java { java {
withSourcesJar() withSourcesJar()
withJavadocJar() withJavadocJar()
sourceCompatibility = org.gradle.api.JavaVersion.VERSION_1_8 sourceCompatibility = org.gradle.api.JavaVersion.VERSION_11
targetCompatibility = org.gradle.api.JavaVersion.VERSION_1_8 targetCompatibility = org.gradle.api.JavaVersion.VERSION_11
} }
configurations { configurations {
@@ -54,7 +54,7 @@ tasks.javadoc {
dependencies { dependencies {
implementation(fileTree(mapOf("dir" to "libs", "include" to listOf("*.jar")))) implementation(fileTree(mapOf("dir" to "libs", "include" to listOf("*.jar"))))
implementation("org.slf4j:slf4j-api:1.7.30") implementation("org.slf4j:slf4j-api:1.7.30")
implementation("org.jetbrains:annotations:21.0.1") implementation("org.jetbrains:annotations:22.0.0")
compileOnly("org.projectlombok:lombok:1.18.20") compileOnly("org.projectlombok:lombok:1.18.20")
annotationProcessor("org.projectlombok:lombok:1.18.20") annotationProcessor("org.projectlombok:lombok:1.18.20")

View File

@@ -1,5 +1,3 @@
import gradle.kotlin.dsl.accessors._496219b122f87f8abbd64d1094d3f5b6.jar
plugins { plugins {
id ("elex-base") id ("elex-base")
`java-library` `java-library`

24
fxml/build.gradle.kts Normal file
View File

@@ -0,0 +1,24 @@
/*
* JavaFx Examples
*
* Copyright (c) 2021. Elex. All Rights Reserved.
* https://www.elex-project.com/
*/
plugins {
id("elex-application")
id("org.openjfx.javafxplugin") version "0.0.10"
id("org.beryx.jlink") version "2.23.1"
}
application {
mainClass.set("kr.pe.elex.examples.fxml.FxmlApplication")
mainModule.set("kr.pe.elex.examples.fxml")
}
javafx {
version = "11.0.2"
modules = listOf("javafx.controls", "javafx.fxml")
}
dependencies {
}

View File

@@ -0,0 +1,35 @@
/*
* JavaFx Examples
*
* Copyright (c) 2021. Elex. All Rights Reserved.
* https://www.elex-project.com/
*/
package kr.pe.elex.examples.fxml;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;
import java.util.Objects;
public class FxmlApplication extends Application {
public static void main(String... args) {
launch(args);
}
@Override
public void start(Stage primaryStage) throws Exception {
primaryStage.setTitle("Hello!");
primaryStage.setWidth(800);
primaryStage.setHeight(600);
//GridPane root = new GridPane();
Parent root = FXMLLoader.load(Objects.requireNonNull(getClass()
.getResource("/fxml/root.fxml")));
Scene scene = new Scene(root);
primaryStage.setScene(scene);
primaryStage.show();
}
}

View File

@@ -0,0 +1,7 @@
module javafx.examples.fxml.main {
requires javafx.graphics;
requires javafx.controls;
requires javafx.fxml;
exports kr.pe.elex.examples.fxml;
}

View File

@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<!--
~ JavaFx Examples
~
~ Copyright (c) 2021. Elex. All Rights Reserved.
~ https://www.elex-project.com/
-->
<BorderPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/11.0.2" xmlns:fx="http://javafx.com/fxml/1">
<center>
<Button mnemonicParsing="false" text="Button" BorderPane.alignment="CENTER" />
</center>
<bottom>
</bottom>
<top>
<MenuBar BorderPane.alignment="CENTER">
<menus>
<Menu mnemonicParsing="false" text="File">
<items>
<MenuItem mnemonicParsing="false" text="Close" />
</items>
</Menu>
<Menu mnemonicParsing="false" text="Edit">
<items>
<MenuItem mnemonicParsing="false" text="Delete" />
</items>
</Menu>
<Menu mnemonicParsing="false" text="Help">
<items>
<MenuItem mnemonicParsing="false" text="About" />
</items>
</Menu>
</menus>
</MenuBar>
</top>
</BorderPane>

View File

@@ -1,5 +1,12 @@
#
# JavaFx Examples
#
# Copyright (c) 2021. Elex. All Rights Reserved.
# https://www.elex-project.com/
#
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-all.zip
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists

16
gradlew vendored
View File

@@ -1,21 +1,5 @@
#!/usr/bin/env sh #!/usr/bin/env sh
#
# Copyright 2015 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
############################################################################## ##############################################################################
## ##
## Gradle start up script for UN*X ## Gradle start up script for UN*X

View File

@@ -1,7 +0,0 @@
plugins {
id("elex-library")
}
dependencies {
}

View File

@@ -1 +0,0 @@
package com.elex_project.sample;

View File

@@ -1,28 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!--
~ JavaFx Examples
~
~ Copyright (c) 2021. Elex. All Rights Reserved.
~ https://www.elex-project.com/
-->
<configuration> <configuration>
<property name="LOG_FILE" value="LogFile" />
<property name="LOG_DIR" value="/var/log/application" />
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender"> <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<encoder> <encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern> <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder> </encoder>
</appender> </appender>
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${LOG_DIR}/${LOG_FILE}.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- daily rollover -->
<fileNamePattern>${LOG_DIR}/%d{yyyy/MM}/${LOG_FILE}.gz</fileNamePattern>
<!-- keep 30 days' worth of history capped at 3GB total size -->
<maxHistory>30</maxHistory>
<totalSizeCap>3GB</totalSizeCap>
</rollingPolicy>
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>
<root level="TRACE"> <root level="TRACE">
<appender-ref ref="CONSOLE" /> <appender-ref ref="CONSOLE" />
</root> </root>

View File

@@ -1,2 +1,9 @@
rootProject.name = "tmpl-java-multiproject" /*
include("lib", "app") * JavaFx Examples
*
* Copyright (c) 2021. Elex. All Rights Reserved.
* https://www.elex-project.com/
*/
rootProject.name = "javafx-examples"
include("fxml")