perfsonar-dev - perfsonar: r5187 - branches/perfsonarui/src/org/perfsonar/perfsonarui/ui
Subject: perfsonar development work
List archive
- From:
- To:
- Subject: perfsonar: r5187 - branches/perfsonarui/src/org/perfsonar/perfsonarui/ui
- Date: Wed, 17 Jun 2009 09:55:03 -0400
Author: nina
Date: 2009-06-17 09:55:02 -0400 (Wed, 17 Jun 2009)
New Revision: 5187
Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/PerfSonarApp.java
Log:
Fix for bug 376 - System look & feel for Ubuntu is broken (GTK error) ; now
crossplatform L&F is used for Linux
Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/PerfSonarApp.java
===================================================================
--- branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/PerfSonarApp.java
2009-06-17 11:54:19 UTC (rev 5186)
+++ branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/PerfSonarApp.java
2009-06-17 13:55:02 UTC (rev 5187)
@@ -460,7 +460,13 @@
private static void initLookAndFeel(String LOOKANDFEEL) {
String lookAndFeel = null;
+
if (LOOKANDFEEL != null) {
+ String osName = System.getProperty("os.name");
+ if (osName.startsWith("Windows")) lookAndFeel =
UIManager.getSystemLookAndFeelClassName();
+ else lookAndFeel =
UIManager.getCrossPlatformLookAndFeelClassName();
+
+ /*
if (LOOKANDFEEL.equals("Metal")) {
lookAndFeel =
UIManager.getCrossPlatformLookAndFeelClassName();
@@ -468,10 +474,7 @@
lookAndFeel = UIManager.getSystemLookAndFeelClassName();
} else if (LOOKANDFEEL.equals("Motif")) {
lookAndFeel =
"com.sun.java.swing.plaf.motif.MotifLookAndFeel";
- /*
- } else if (LOOKANDFEEL.equals("GTK+")) { //new in 1.4.2
- lookAndFeel = "com.sun.java.swing.plaf.gtk.GTKLookAndFeel";
- */
+
} else if (LOOKANDFEEL.equals("Mac")) {
//lookAndFeel = "javax.swing.plaf.mac.MacLookAndFeel";
lookAndFeel = "com.sun.java.swing.plaf.mac.MacLookAndFeel";
@@ -480,7 +483,7 @@
+ LOOKANDFEEL);
lookAndFeel =
UIManager.getCrossPlatformLookAndFeelClassName();
}
-
+ */
try {
UIManager.setLookAndFeel(lookAndFeel);
if (LOOKANDFEEL.equals("Metal")) {
@@ -516,7 +519,7 @@
protected static void createAndShowGUI() {
//Set the look and feel.
initLookAndFeel(LOOKANDFEEL);
-
+ System.out.println(LOOKANDFEEL);
//Make sure we have nice window decorations.
JFrame.setDefaultLookAndFeelDecorated(true);
// to create application object here
- perfsonar: r5187 - branches/perfsonarui/src/org/perfsonar/perfsonarui/ui, svnlog, 06/17/2009
Archive powered by MHonArc 2.6.16.