mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2025-12-06 22:10:54 +03:00
moved testing applications from src/test to new project flatlaf-testing (part 2)
This commit is contained in:
@@ -34,11 +34,6 @@ if( JavaVersion.current() >= JavaVersion.VERSION_1_9 ) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
|
||||||
testImplementation( "com.miglayout:miglayout-swing:5.2" )
|
|
||||||
testImplementation( "com.jgoodies:jgoodies-forms:1.9.0" )
|
|
||||||
}
|
|
||||||
|
|
||||||
java {
|
java {
|
||||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||||
targetCompatibility = JavaVersion.VERSION_1_8
|
targetCompatibility = JavaVersion.VERSION_1_8
|
||||||
@@ -88,19 +83,6 @@ tasks {
|
|||||||
|
|
||||||
from( javadoc )
|
from( javadoc )
|
||||||
}
|
}
|
||||||
|
|
||||||
register( "testJar", Jar::class ) {
|
|
||||||
archiveBaseName.set( "flatlaf-test" )
|
|
||||||
from( sourceSets.test.get().output )
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
configurations {
|
|
||||||
create( "testArtifacts" )
|
|
||||||
}
|
|
||||||
|
|
||||||
artifacts {
|
|
||||||
add( "testArtifacts", tasks.getByPath( "testJar" ) )
|
|
||||||
}
|
}
|
||||||
|
|
||||||
publishing {
|
publishing {
|
||||||
|
|||||||
@@ -25,10 +25,6 @@ plugins {
|
|||||||
dependencies {
|
dependencies {
|
||||||
implementation( project( ":flatlaf-core" ) )
|
implementation( project( ":flatlaf-core" ) )
|
||||||
implementation( "org.swinglabs.swingx:swingx-all:1.6.5-1" )
|
implementation( "org.swinglabs.swingx:swingx-all:1.6.5-1" )
|
||||||
|
|
||||||
testImplementation( project( ":flatlaf-core", "testArtifacts" ) )
|
|
||||||
testImplementation( "org.swinglabs.swingx:swingx-beaninfo:1.6.5-1" )
|
|
||||||
testImplementation( "com.miglayout:miglayout-swing:5.2" )
|
|
||||||
}
|
}
|
||||||
|
|
||||||
java {
|
java {
|
||||||
@@ -37,7 +33,6 @@ java {
|
|||||||
}
|
}
|
||||||
|
|
||||||
tasks {
|
tasks {
|
||||||
|
|
||||||
javadoc {
|
javadoc {
|
||||||
options {
|
options {
|
||||||
this as StandardJavadocDocletOptions
|
this as StandardJavadocDocletOptions
|
||||||
|
|||||||
36
flatlaf-testing/build.gradle.kts
Normal file
36
flatlaf-testing/build.gradle.kts
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2019 FormDev Software GmbH
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
*
|
||||||
|
* http://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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
version = rootProject.version
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
`java-library`
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation( project( ":flatlaf-core" ) )
|
||||||
|
implementation( project( ":flatlaf-swingx" ) )
|
||||||
|
|
||||||
|
implementation( "com.miglayout:miglayout-swing:5.2" )
|
||||||
|
implementation( "com.jgoodies:jgoodies-forms:1.9.0" )
|
||||||
|
implementation( "org.swinglabs.swingx:swingx-all:1.6.5-1" )
|
||||||
|
implementation( "org.swinglabs.swingx:swingx-beaninfo:1.6.5-1" )
|
||||||
|
}
|
||||||
|
|
||||||
|
java {
|
||||||
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||||
|
targetCompatibility = JavaVersion.VERSION_1_8
|
||||||
|
}
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.formdev.flatlaf;
|
package com.formdev.flatlaf.testing;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import net.miginfocom.swing.*;
|
import net.miginfocom.swing.*;
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.formdev.flatlaf;
|
package com.formdev.flatlaf.testing;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import javax.swing.table.*;
|
import javax.swing.table.*;
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.formdev.flatlaf;
|
package com.formdev.flatlaf.testing;
|
||||||
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* Created by JFormDesigner on Tue Aug 27 21:47:02 CEST 2019
|
* Created by JFormDesigner on Tue Aug 27 21:47:02 CEST 2019
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.formdev.flatlaf;
|
package com.formdev.flatlaf.testing;
|
||||||
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.formdev.flatlaf;
|
package com.formdev.flatlaf.testing;
|
||||||
|
|
||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
import java.awt.Component;
|
import java.awt.Component;
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.formdev.flatlaf;
|
package com.formdev.flatlaf.testing;
|
||||||
|
|
||||||
import java.awt.Component;
|
import java.awt.Component;
|
||||||
import java.awt.Container;
|
import java.awt.Container;
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.formdev.flatlaf;
|
package com.formdev.flatlaf.testing;
|
||||||
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.event.MouseAdapter;
|
import java.awt.event.MouseAdapter;
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.formdev.flatlaf;
|
package com.formdev.flatlaf.testing;
|
||||||
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.event.ComponentAdapter;
|
import java.awt.event.ComponentAdapter;
|
||||||
@@ -28,6 +28,11 @@ import javax.swing.*;
|
|||||||
import javax.swing.plaf.ColorUIResource;
|
import javax.swing.plaf.ColorUIResource;
|
||||||
import javax.swing.plaf.metal.MetalLookAndFeel;
|
import javax.swing.plaf.metal.MetalLookAndFeel;
|
||||||
import javax.swing.plaf.nimbus.NimbusLookAndFeel;
|
import javax.swing.plaf.nimbus.NimbusLookAndFeel;
|
||||||
|
import com.formdev.flatlaf.FlatDarculaLaf;
|
||||||
|
import com.formdev.flatlaf.FlatDarkLaf;
|
||||||
|
import com.formdev.flatlaf.FlatIntelliJLaf;
|
||||||
|
import com.formdev.flatlaf.FlatLaf;
|
||||||
|
import com.formdev.flatlaf.FlatLightLaf;
|
||||||
import com.formdev.flatlaf.ui.FlatUIUtils;
|
import com.formdev.flatlaf.ui.FlatUIUtils;
|
||||||
import com.formdev.flatlaf.util.SystemInfo;
|
import com.formdev.flatlaf.util.SystemInfo;
|
||||||
import com.formdev.flatlaf.util.UIScale;
|
import com.formdev.flatlaf.util.UIScale;
|
||||||
|
|||||||
@@ -14,7 +14,9 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.formdev.flatlaf;
|
package com.formdev.flatlaf.testing;
|
||||||
|
|
||||||
|
import com.formdev.flatlaf.FlatLaf;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A Flat LaF that has a test color scheme.
|
* A Flat LaF that has a test color scheme.
|
||||||
|
|||||||
@@ -0,0 +1,41 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2019 FormDev Software GmbH
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
*
|
||||||
|
* http://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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.formdev.flatlaf.testing.swingx;
|
||||||
|
|
||||||
|
import java.io.InputStream;
|
||||||
|
import com.formdev.flatlaf.FlatDefaultsAddon;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SwingX addon for FlatLaf for testing.
|
||||||
|
*
|
||||||
|
* @author Karl Tauber
|
||||||
|
*/
|
||||||
|
public class FlatSwingXDefaultsTestAddon
|
||||||
|
extends FlatDefaultsAddon
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Finds SwingX addon .properties file for the given LaF class
|
||||||
|
* in the same package as this class.
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public InputStream getDefaults( Class<?> lafClass ) {
|
||||||
|
Class<?> addonClass = this.getClass();
|
||||||
|
String propertiesName = "/" + addonClass.getPackage().getName().replace( '.', '/' )
|
||||||
|
+ '/' + lafClass.getSimpleName() + ".properties";
|
||||||
|
return addonClass.getResourceAsStream( propertiesName );
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.formdev.flatlaf.swingx;
|
package com.formdev.flatlaf.testing.swingx;
|
||||||
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
@@ -22,7 +22,7 @@ import java.util.Date;
|
|||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import net.miginfocom.swing.*;
|
import net.miginfocom.swing.*;
|
||||||
import org.jdesktop.swingx.*;
|
import org.jdesktop.swingx.*;
|
||||||
import com.formdev.flatlaf.FlatTestFrame;
|
import com.formdev.flatlaf.testing.FlatTestFrame;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Karl Tauber
|
* @author Karl Tauber
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
com.formdev.flatlaf.testing.swingx.FlatSwingXDefaultsTestAddon
|
||||||
@@ -19,3 +19,4 @@ rootProject.name = "FlatLaf"
|
|||||||
include( "flatlaf-core" )
|
include( "flatlaf-core" )
|
||||||
include( "flatlaf-swingx" )
|
include( "flatlaf-swingx" )
|
||||||
include( "flatlaf-demo" )
|
include( "flatlaf-demo" )
|
||||||
|
include( "flatlaf-testing" )
|
||||||
|
|||||||
Reference in New Issue
Block a user