001/*
002 *                    BioJava development code
003 *
004 * This code may be freely distributed and modified under the
005 * terms of the GNU Lesser General Public Licence.  This should
006 * be distributed with the code.  If you do not have a copy,
007 * see:
008 *
009 *      http://www.gnu.org/copyleft/lesser.html
010 *
011 * Copyright for this code is held jointly by the individual
012 * authors.  These should be listed in @author doc comments.
013 *
014 * For more information on the BioJava project and its aims,
015 * or to join the biojava-l mailing list, visit the home page
016 * at:
017 *
018 *      http://www.biojava.org/
019 *
020 * Created on Apr 6, 2010
021 * Author: Andreas Prlic
022 *
023 */
024
025package org.biojava.nbio.structure.align.webstart;
026
027import javax.swing.*;
028import javax.swing.UIManager.LookAndFeelInfo;
029
030
031public class AligUIManager
032{
033
034        public static void setLookAndFeel(){
035                try {
036
037
038                        String system = UIManager.getSystemLookAndFeelClassName();
039                        if ( system != null) {
040                                //System.out.println("setting look and feel to " + system);
041                                UIManager.setLookAndFeel(system);
042
043                        }
044
045                        //System.out.println("Installed Look And Feels:");
046                        LookAndFeelInfo[] feels = UIManager.getInstalledLookAndFeels();
047
048                        if ( feels != null){
049                                //for ( LookAndFeelInfo info: feels){
050                                        //System.out.println(info.getName() + " " + info.getClassName());
051                          // }
052                        }
053
054
055                        //System.out.println("Auxiliary Look And Feels:");
056                  // LookAndFeel[] looks = UIManager.getAuxiliaryLookAndFeels();
057                        //printLookAndFeel(looks);
058
059
060
061
062                } catch ( Exception e ) {
063                        e.printStackTrace();
064                }
065
066        }
067
068//   private static void printLookAndFeel(LookAndFeel[] looks)
069//   {
070//
071//      if ( looks != null){
072//         System.out.println("got " + looks.length + " lookAndFeels");
073//         for (LookAndFeel laf : looks){
074//            System.out.println(laf.getDescription());
075//         }
076//      } else {
077//         System.out.println("No other LookAndFeels found.");
078//      }
079//
080//   }
081}