1 19 package org.openharmonise.him.configuration.lnf; 20 21 import javax.swing.SwingUtilities ; 22 import javax.swing.UIManager ; 23 import javax.swing.UnsupportedLookAndFeelException ; 24 25 import org.openharmonise.him.configuration.*; 26 import org.openharmonise.him.window.*; 27 28 29 36 public class ConfigLnF { 37 38 41 private ConfigDialog m_dialog = null; 42 43 46 protected ConfigLnF() { 47 } 48 49 52 private String m_sClassName = null; 53 54 60 public ConfigLnF(String sClassName, ConfigDialog dialog) { 61 super(); 62 this.m_dialog = dialog; 63 this.m_sClassName = sClassName; 64 } 65 66 70 public void setLookAndFeel() { 71 try { 72 UIManager.setLookAndFeel(m_sClassName); 73 SwingUtilities.updateComponentTreeUI(DisplayManager.getInstance().getMainWindow()); 74 SwingUtilities.updateComponentTreeUI(this.m_dialog); 75 } catch (ClassNotFoundException e) { 76 e.printStackTrace(); 77 } catch (InstantiationException e) { 78 e.printStackTrace(); 79 } catch (IllegalAccessException e) { 80 e.printStackTrace(); 81 } catch (UnsupportedLookAndFeelException e) { 82 e.printStackTrace(); 83 } 84 } 85 86 } 87 | Popular Tags |