Compare commits

...

2 Commits

Author SHA1 Message Date
Karl Tauber
ddc8d6e29c README.md: new applications using FlatLaf:
Some checks failed
CI / build (11) (push) Has been cancelled
CI / build-on (17, ) (push) Has been cancelled
CI / build-on (21, ) (push) Has been cancelled
CI / build-on (21, 25) (push) Has been cancelled
CI / build-on (8, ) (push) Has been cancelled
CI / snapshot (push) Has been cancelled
CI / release (push) Has been cancelled
- OpenRocket
- Warteschlangensimulator
- Nortantis
- QStudio
- Launch4j
2025-10-07 19:36:39 +02:00
Karl Tauber
119b4a922d fixed loading FlatLaf properties files in NetBeans (broken since commit again; issue #1026)
now using old implementation again (before commit 2ac7234c32), but if that does not find properties file, then fallback to new implementation from commit 2ac7234c32
2025-09-29 21:30:41 +02:00
2 changed files with 43 additions and 19 deletions

View File

@@ -196,6 +196,8 @@ Applications using FlatLaf
- ![New](images/new.svg)
[Zettelkasten](https://github.com/Zettelkasten-Team/Zettelkasten) - knowledge
management tool
- ![New](images/new.svg) [QStudio](https://www.timestored.com/qstudio/) - free
SQL editor
### Security
@@ -236,6 +238,8 @@ Applications using FlatLaf
mobile & web platform
- ![New](images/new.svg) [EduMIPS64](https://github.com/EduMIPS64/edumips64) -
visual MIPS64 CPU simulator
- ![New](images/new.svg) [Launch4j](https://launch4j.sourceforge.net/) -
cross-platform Java executable wrapper
### Electrical
@@ -281,9 +285,16 @@ Applications using FlatLaf
from any webnovel and lightnovel site
- [lectureStudio](https://www.lecturestudio.org/) - digitize your lectures with
ease
- ![New](images/new.svg) [Nortantis](https://jandjheydorn.com/nortantis) -
fantasy map generator and editor
### Modelling / Planning
- ![New](images/new.svg) [OpenRocket](https://github.com/openrocket/openrocket) -
model-rocketry aerodynamics and trajectory simulation software
- ![New](images/new.svg)
[Warteschlangensimulator](https://github.com/A-Herzog/Warteschlangensimulator) -
discrete-event stochastic simulator
- ![New](images/new.svg) [Gephi](https://github.com/gephi/gephi) - the Open
Graph Viz Platform
- [Astah](https://astah.net/) (**commercial**) - create UML, ER Diagram,

View File

@@ -205,30 +205,43 @@ class UIDefaultsLoader
if( classLoader != null && !addonClassLoaders.contains( classLoader ) )
addonClassLoaders.add( classLoader );
packageName = packageName.replace( '.', '/' );
if( classLoader == null )
classLoader = FlatLaf.class.getClassLoader();
// Get package URL using ClassLoader.getResource(...) because this works
// also in named Java modules, even without opening the package in module-info.java.
// This extra step is necessary because ClassLoader.getResource("<package>/<file>.properties")
// does not work for named Java modules.
URL url = classLoader.getResource( packageName.replace( '.', '/' ) );
if( url == null ) {
LoggingFacade.INSTANCE.logSevere( "FlatLaf: Failed to find package '"
+ packageName + "' to load properties files.", null );
continue;
}
String packageUrl = url.toExternalForm();
if( !packageUrl.endsWith( "/" ) )
packageUrl = packageUrl.concat( "/" );
boolean found = false;
for( Class<?> lafClass : lafClasses ) {
URL propertiesUrl = new URL( packageUrl + simpleClassName( lafClass ) + ".properties" );
String propertiesName = packageName + '/' + simpleClassName( lafClass ) + ".properties";
try( InputStream in = classLoader.getResourceAsStream( propertiesName ) ) {
if( in != null ) {
properties.load( in );
found = true;
}
}
}
try( InputStream in = propertiesUrl.openStream() ) {
properties.load( in );
} catch( FileNotFoundException ex ) {
// ignore
// fallback for named Java modules
if( !found ) {
// Get package URL using ClassLoader.getResource(...) because this works
// also in named Java modules, even without opening the package in module-info.java.
// This extra step is necessary because ClassLoader.getResource("<package>/<file>.properties")
// does not work for named Java modules.
URL url = classLoader.getResource( packageName );
if( url == null )
continue;
String packageUrl = url.toExternalForm();
if( !packageUrl.endsWith( "/" ) )
packageUrl = packageUrl.concat( "/" );
for( Class<?> lafClass : lafClasses ) {
URL propertiesUrl = new URL( packageUrl + simpleClassName( lafClass ) + ".properties" );
try( InputStream in = propertiesUrl.openStream() ) {
properties.load( in );
} catch( FileNotFoundException ex ) {
// ignore
}
}
}
} else if( source instanceof URL ) {