Author: mes
Date: 2011-06-23 14:28:25 -0700 (Thu, 23 Jun 2011)
New Revision: 25903

Modified:
   
core3/swing-application-impl/trunk/src/main/java/org/cytoscape/internal/view/CytoscapeDesktop.java
Log:
setting look and feel here too

Modified: 
core3/swing-application-impl/trunk/src/main/java/org/cytoscape/internal/view/CytoscapeDesktop.java
===================================================================
--- 
core3/swing-application-impl/trunk/src/main/java/org/cytoscape/internal/view/CytoscapeDesktop.java
  2011-06-23 20:07:24 UTC (rev 25902)
+++ 
core3/swing-application-impl/trunk/src/main/java/org/cytoscape/internal/view/CytoscapeDesktop.java
  2011-06-23 21:28:25 UTC (rev 25903)
@@ -66,6 +66,8 @@
 import javax.swing.JSplitPane;
 import javax.swing.JTabbedPane;
 import javax.swing.WindowConstants;
+import javax.swing.UIManager;
+import javax.swing.SwingUtilities;
 
 import java.math.BigInteger;
 import java.util.Dictionary;
@@ -157,7 +159,6 @@
                main_panel = new JPanel();
                main_panel.setLayout(new BorderLayout());
 
-
                // create the CytoscapeDesktop
                BiModalJSplitPane masterPane = setupCytoPanels(networkPanel, 
networkViewManager);
 
@@ -169,6 +170,14 @@
 
                setJMenuBar(cyMenus.getJMenuBar());
 
+               // update look and feel
+               try {
+                       final String laf = 
UIManager.getSystemLookAndFeelClassName();
+                       logger.debug("setting look and feel to: " + laf);
+                       UIManager.setLookAndFeel(laf);
+                       SwingUtilities.updateComponentTreeUI(this);
+               } catch (Exception e) { /* not really a problem if this fails 
*/ }
+
                //don't automatically close window. Let shutdown.exit(returnVal)
                //handle this
                setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
@@ -186,7 +195,7 @@
                
                // Move it to the center
                this.setLocationRelativeTo(null);
-       
+
                // ...but don't actually show it!!!!
                // Once the system has fully started the JFrame will be set to 
                // visible by the StartupMostlyFinished class, found elsewhere.

-- 
You received this message because you are subscribed to the Google Groups 
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/cytoscape-cvs?hl=en.

Reply via email to