net.sf.sdedit.ui.impl
Class LookAndFeelManager

java.lang.Object
  extended by java.lang.ClassLoader
      extended by java.security.SecureClassLoader
          extended by java.net.URLClassLoader
              extended by net.sf.sdedit.ui.impl.LookAndFeelManager

public class LookAndFeelManager
extends URLClassLoader

For dynamically changing the look and feel of whole frames and dialogs.

Author:
Markus Strauch

Method Summary
 boolean changeTo(String lookAndFeelName)
           
static UIManager.LookAndFeelInfo[] getAvailableLookAndFeels()
           
static LookAndFeelManager instance()
          Returns the singleton LookAndFeelManager.
 void propertyChange(PropertyChangeEvent evt)
           
 void register(RootPaneContainer container)
          Registers a JDialog so its subcomponents will get another look and feel when updateUserInterface() is called.
 void registerOrphan(JComponent orphan)
           
 void setFont(Font font)
           
 void updateUserInterface()
          Call updateUI() on all components inside the registered frames and dialogs.
 void useExternalLAF(File jarFile, String cls)
           
 
Methods inherited from class java.net.URLClassLoader
addURL, definePackage, findClass, findResource, findResources, getPermissions, getURLs, newInstance, newInstance
 
Methods inherited from class java.security.SecureClassLoader
defineClass, defineClass
 
Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findSystemClass, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, loadClass, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setFont

public void setFont(Font font)

getAvailableLookAndFeels

public static UIManager.LookAndFeelInfo[] getAvailableLookAndFeels()

instance

public static LookAndFeelManager instance()
Returns the singleton LookAndFeelManager.

Returns:
the singleton LookAndFeelManager

useExternalLAF

public void useExternalLAF(File jarFile,
                           String cls)
                    throws MalformedURLException,
                           ClassNotFoundException,
                           InstantiationException,
                           IllegalAccessException,
                           UnsupportedLookAndFeelException
Throws:
MalformedURLException
ClassNotFoundException
InstantiationException
IllegalAccessException
UnsupportedLookAndFeelException

register

public void register(RootPaneContainer container)
Registers a JDialog so its subcomponents will get another look and feel when updateUserInterface() is called.

Parameters:
dialog - a JDialog that is to be managed by this LookAndFeelManager, so the JDialog's subcomponents look and feel can be changed by it

updateUserInterface

public void updateUserInterface()
Call updateUI() on all components inside the registered frames and dialogs.


registerOrphan

public void registerOrphan(JComponent orphan)

changeTo

public boolean changeTo(String lookAndFeelName)

propertyChange

public void propertyChange(PropertyChangeEvent evt)


Copyright © 2011. All Rights Reserved.