mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2025-12-06 14:00:55 +03:00
Added setter for native provider
This makes it possible to support situations where the extraction of a DLL at runtime is not possible
This commit is contained in:
@@ -247,16 +247,19 @@ public class FlatNativeWindowBorder
|
||||
/*
|
||||
Class<?> cls = Class.forName( "com.formdev.flatlaf.natives.jna.windows.FlatWindowsNativeWindowBorder" );
|
||||
Method m = cls.getMethod( "getInstance" );
|
||||
nativeProvider = (Provider) m.invoke( null );
|
||||
setNativeProvider( (Provider) m.invoke( null ) );
|
||||
*/
|
||||
nativeProvider = FlatWindowsNativeWindowBorder.getInstance();
|
||||
|
||||
supported = (nativeProvider != null);
|
||||
setNativeProvider( FlatWindowsNativeWindowBorder.getInstance() );
|
||||
} catch( Exception ex ) {
|
||||
// ignore
|
||||
}
|
||||
}
|
||||
|
||||
public static void setNativeProvider( Provider nativeProvider ) {
|
||||
FlatNativeWindowBorder.nativeProvider = nativeProvider;
|
||||
supported = nativeProvider != null;
|
||||
}
|
||||
|
||||
//---- interface Provider -------------------------------------------------
|
||||
|
||||
public interface Provider
|
||||
|
||||
Reference in New Issue
Block a user