mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-13 23:37:13 -06:00
@@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
|
||||
<booleanAttribute key="org.eclipse.debug.core.ATTR_FORCE_SYSTEM_CONSOLE_ENCODING" value="false"/>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
|
||||
<listEntry value="/flatlaf-testing-modular-app"/>
|
||||
</listAttribute>
|
||||
@@ -16,10 +17,11 @@
|
||||
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="-Ddummy=dummy"/>
|
||||
<listAttribute key="org.eclipse.jdt.launching.MODULEPATH">
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry containerPath="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk-17/" path="4" type="4"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/flatlaf-testing-modular-app/build/libs/flatlaf-testing-modular-app-2.5-SNAPSHOT.jar" path="4" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/flatlaf-core/build/libs/flatlaf-2.5-SNAPSHOT.jar" path="4" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/flatlaf-extras/build/libs/flatlaf-extras-2.5-SNAPSHOT.jar" path="4" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry externalArchive="C:/Users/charly/.gradle/caches/modules-2/files-2.1/com.formdev/svgSalamander/1.1.2.4/828c2ce815bf62031764f5219597948bd2587aa5/svgSalamander-1.1.2.4.jar" path="4" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/flatlaf-testing-modular-app/build/libs/flatlaf-testing-modular-app-3.0-SNAPSHOT.jar" path="4" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/flatlaf-core/build/libs/flatlaf-3.0-SNAPSHOT.jar" path="4" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/flatlaf-extras/build/libs/flatlaf-extras-3.0-SNAPSHOT.jar" path="4" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/flatlaf-fonts-inter/build/libs/flatlaf-fonts-inter-3.19-SNAPSHOT.jar" path="4" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry externalArchive="C:/Users/charly/.gradle/caches/modules-2/files-2.1/com.formdev/svgSalamander/1.1.4/e61742cb8baaf9ecf57a9779763d1de21ca9db5a/svgSalamander-1.1.4.jar" path="4" type="2"/> "/>
|
||||
</listAttribute>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.MODULE_NAME" value="flatlaf-testing-modular-app"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-m com.formdev.flatlaf.testing.modular.app/com.formdev.flatlaf.testing.modular.app.FlatModularAppTest"/>
|
||||
|
||||
@@ -22,9 +22,11 @@ plugins {
|
||||
dependencies {
|
||||
implementation( project( ":flatlaf-core" ) )
|
||||
implementation( project( ":flatlaf-extras" ) )
|
||||
implementation( project( ":flatlaf-fonts-inter" ) )
|
||||
}
|
||||
|
||||
flatlafModuleInfo {
|
||||
dependsOn( ":flatlaf-core:jar" )
|
||||
dependsOn( ":flatlaf-extras:jar" )
|
||||
dependsOn( ":flatlaf-fonts-inter:jar" )
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@ import com.formdev.flatlaf.FlatLaf;
|
||||
import com.formdev.flatlaf.FlatLightLaf;
|
||||
import com.formdev.flatlaf.extras.FlatSVGIcon;
|
||||
import com.formdev.flatlaf.extras.FlatSVGUtils;
|
||||
import com.formdev.flatlaf.fonts.inter.FlatInterFont;
|
||||
|
||||
/**
|
||||
* @author Karl Tauber
|
||||
@@ -35,6 +36,8 @@ public class FlatModularAppTest
|
||||
{
|
||||
public static void main( String[] args ) {
|
||||
SwingUtilities.invokeLater( () -> {
|
||||
FlatInterFont.installBasic();
|
||||
|
||||
FlatLaf.registerCustomDefaultsSource(
|
||||
FlatModularAppTest.class.getResource( "/com/formdev/flatlaf/testing/modular/app/themes/" ) );
|
||||
FlatLightLaf.setup();
|
||||
|
||||
@@ -21,6 +21,7 @@ module com.formdev.flatlaf.testing.modular.app {
|
||||
requires java.desktop;
|
||||
requires com.formdev.flatlaf;
|
||||
requires com.formdev.flatlaf.extras;
|
||||
requires com.formdev.flatlaf.fonts.inter;
|
||||
requires com.kitfox.svg;
|
||||
|
||||
exports com.formdev.flatlaf.testing.modular.app.plaf;
|
||||
|
||||
@@ -19,13 +19,13 @@ package com.formdev.flatlaf.testing;
|
||||
import java.awt.Color;
|
||||
import java.awt.Component;
|
||||
import java.awt.Font;
|
||||
import java.awt.GraphicsEnvironment;
|
||||
import java.util.Map;
|
||||
import java.util.TreeMap;
|
||||
import javax.swing.*;
|
||||
import com.formdev.flatlaf.fonts.inter.FlatInterFont;
|
||||
import com.formdev.flatlaf.fonts.jetbrains_mono.FlatJetBrainsMonoFont;
|
||||
import com.formdev.flatlaf.fonts.roboto.FlatRobotoFont;
|
||||
import com.formdev.flatlaf.util.FontUtils;
|
||||
import com.formdev.flatlaf.util.UIScale;
|
||||
import net.miginfocom.swing.*;
|
||||
|
||||
@@ -37,9 +37,9 @@ public class FlatFontsTest
|
||||
{
|
||||
public static void main( String[] args ) {
|
||||
SwingUtilities.invokeLater( () -> {
|
||||
FlatInterFont.install();
|
||||
FlatJetBrainsMonoFont.install();
|
||||
FlatRobotoFont.install();
|
||||
FlatInterFont.installLazy();
|
||||
FlatJetBrainsMonoFont.installLazy();
|
||||
FlatRobotoFont.installLazy();
|
||||
|
||||
FlatTestFrame frame = FlatTestFrame.create( args, "FlatFontsTest" );
|
||||
frame.showFrame( FlatFontsTest::new );
|
||||
@@ -49,7 +49,7 @@ public class FlatFontsTest
|
||||
FlatFontsTest() {
|
||||
initComponents();
|
||||
|
||||
Font[] allFonts = GraphicsEnvironment.getLocalGraphicsEnvironment().getAllFonts();
|
||||
Font[] allFonts = FontUtils.getAllFonts();
|
||||
|
||||
TreeMap<String, TreeMap<String, Font>> familiesMap = new TreeMap<>();
|
||||
for( Font font : allFonts ) {
|
||||
|
||||
@@ -22,17 +22,16 @@ import java.awt.Font;
|
||||
import java.awt.FontMetrics;
|
||||
import java.awt.Graphics;
|
||||
import java.awt.Graphics2D;
|
||||
import java.awt.GraphicsEnvironment;
|
||||
import java.awt.Rectangle;
|
||||
import java.awt.geom.AffineTransform;
|
||||
import java.util.Arrays;
|
||||
import javax.swing.*;
|
||||
import javax.swing.text.StyleContext;
|
||||
import com.formdev.flatlaf.FlatLaf;
|
||||
import com.formdev.flatlaf.FlatSystemProperties;
|
||||
import com.formdev.flatlaf.fonts.inter.FlatInterFont;
|
||||
import com.formdev.flatlaf.fonts.jetbrains_mono.FlatJetBrainsMonoFont;
|
||||
import com.formdev.flatlaf.fonts.roboto.FlatRobotoFont;
|
||||
import com.formdev.flatlaf.util.FontUtils;
|
||||
import com.formdev.flatlaf.util.Graphics2DProxy;
|
||||
import com.formdev.flatlaf.util.HiDPIUtils;
|
||||
import com.formdev.flatlaf.util.JavaCompatibility;
|
||||
@@ -51,9 +50,9 @@ public class FlatPaintingStringTest
|
||||
System.setProperty( "FlatLaf.debug.HiDPIUtils.useDebugScaleFactor", "true" );
|
||||
|
||||
SwingUtilities.invokeLater( () -> {
|
||||
FlatInterFont.install();
|
||||
FlatJetBrainsMonoFont.install();
|
||||
FlatRobotoFont.install();
|
||||
FlatInterFont.installLazy();
|
||||
FlatJetBrainsMonoFont.installLazy();
|
||||
FlatRobotoFont.installLazy();
|
||||
|
||||
FlatTestFrame frame = FlatTestFrame.create( args, "FlatPaintingStringTest" );
|
||||
|
||||
@@ -67,8 +66,7 @@ public class FlatPaintingStringTest
|
||||
FlatPaintingStringTest() {
|
||||
initComponents();
|
||||
|
||||
String[] availableFontFamilyNames = GraphicsEnvironment.getLocalGraphicsEnvironment()
|
||||
.getAvailableFontFamilyNames().clone();
|
||||
String[] availableFontFamilyNames = FontUtils.getAvailableFontFamilyNames().clone();
|
||||
Arrays.sort( availableFontFamilyNames );
|
||||
|
||||
Font currentFont = UIManager.getFont( "Label.font" );
|
||||
@@ -194,7 +192,7 @@ public class FlatPaintingStringTest
|
||||
if( font.getFamily().equals( family ) )
|
||||
return;
|
||||
|
||||
Font newFont = StyleContext.getDefaultStyleContext().getFont( family, font.getStyle(), font.getSize() );
|
||||
Font newFont = FontUtils.getCompositeFont( family, font.getStyle(), font.getSize() );
|
||||
UIManager.put( "defaultFont", newFont );
|
||||
updateFontMetricsLabel();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user