mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-13 07:17:13 -06:00
Demo: show Java vendor in bottom control bar
This commit is contained in:
@@ -150,10 +150,14 @@ class ControlBar
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void updateInfoLabel() {
|
private void updateInfoLabel() {
|
||||||
|
String javaVendor = System.getProperty( "java.vendor" );
|
||||||
|
if( "Oracle Corporation".equals( javaVendor ) )
|
||||||
|
javaVendor = null;
|
||||||
double systemScaleFactor = UIScale.getSystemScaleFactor( getGraphicsConfiguration() );
|
double systemScaleFactor = UIScale.getSystemScaleFactor( getGraphicsConfiguration() );
|
||||||
float userScaleFactor = UIScale.getUserScaleFactor();
|
float userScaleFactor = UIScale.getUserScaleFactor();
|
||||||
Font font = UIManager.getFont( "Label.font" );
|
Font font = UIManager.getFont( "Label.font" );
|
||||||
String newInfo = "(Java " + System.getProperty( "java.version" )
|
String newInfo = "(Java " + System.getProperty( "java.version" )
|
||||||
|
+ (javaVendor != null ? ("; " + javaVendor) : "")
|
||||||
+ (systemScaleFactor != 1 ? ("; system scale factor " + systemScaleFactor) : "")
|
+ (systemScaleFactor != 1 ? ("; system scale factor " + systemScaleFactor) : "")
|
||||||
+ (userScaleFactor != 1 ? ("; user scale factor " + userScaleFactor) : "")
|
+ (userScaleFactor != 1 ? ("; user scale factor " + userScaleFactor) : "")
|
||||||
+ (systemScaleFactor == 1 && userScaleFactor == 1 ? "; no scaling" : "")
|
+ (systemScaleFactor == 1 && userScaleFactor == 1 ? "; no scaling" : "")
|
||||||
|
|||||||
Reference in New Issue
Block a user