All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.sun.java.swing.UIManager

java.lang.Object
   |
   +----com.sun.java.swing.UIManager

public class UIManager
extends Object
The UIManager is responsible for managing the list of installed UIFactory classes, and for determining which of these is the default.


Constructor Index

 o UIManager()

Method Index

 o addUIChangeListener(Window)
Add a Window which will be notified when the default UI changes.
 o deinstallUIFactory(String)
Deinstalls a UI factory from the persistent list of available UI factories.
 o getAuxiliaryFactories()
Return the list of auxiliary factories (can be null).
 o getDefaultFactory()
Returns the current default UI factory.
 o getInstalledUIFactoryList()
Returns an Enumeration of the class names of all the UI factories which are currently installed.
 o getUI(String, String, JComponent)
Obtain a UI from the default factory.
 o getUIFactory(String)
Gets a UI factory by class name.
 o installUIFactory(String)
Installs a UI factory.
 o removeUIChangeListener(Window)
Remove a Window from the list of UI change notification recipients.
 o setInstalledUIFactoryList(String[])
Sets the list of available UI factories.
 o setUIFactory(String, Container)
Sets the default UI factory, and optionally resets all of the child components' UI objects in a Container.
 o setUIFactory(UIFactory, Container)
Sets the default UI factory, and optionally resets all of the child components' UI objects in a Container.
 o setUIFactory(UIFactory, Container, boolean)
Sets the default UI factory, optionally resets all of the child components' UI objects in a Container, and optionally saves the default UI factory property.

Constructors

 o UIManager
 public UIManager()

Methods

 o getAuxiliaryFactories
 public static UIFactory[] getAuxiliaryFactories()
Return the list of auxiliary factories (can be null).

 o getDefaultFactory
 public static UIFactory getDefaultFactory()
Returns the current default UI factory.

 o getUIFactory
 public static UIFactory getUIFactory(String factoryClassName) throws ClassNotFoundException
Gets a UI factory by class name. If this is the first reference to this UI factory, it is loaded and added to the list of available UI factories.

Parameters:
factoryClassName - the class name of the new UI factory, such as "com.foo.Bar".
Throws: ClassNotFoundException
if the specified class cannot be found.
 o getInstalledUIFactoryList
 public static synchronized Enumeration getInstalledUIFactoryList()
Returns an Enumeration of the class names of all the UI factories which are currently installed.

 o setUIFactory
 public static void setUIFactory(String factoryClassName,
                                 Container top) throws ClassNotFoundException, SecurityException
Sets the default UI factory, and optionally resets all of the child components' UI objects in a Container.

Parameters:
factoryClassName - the class name of the new UI factory, such as "com.foo.Bar".
top - a Container whose UI object and its children's UI objects should be replaced with UI objects from the new factory. Use null if no Container needs resetting.
Throws: ClassNotFoundException
if the specified class cannot be found.
Throws: SecurityException
if a UI factory list has been set.
See Also:
setInstalledUIFactoryList
 o setUIFactory
 public static void setUIFactory(UIFactory factory,
                                 Container top) throws SecurityException
Sets the default UI factory, and optionally resets all of the child components' UI objects in a Container.

Parameters:
factory - the new UI factory.
top - a Container whose UI object and its children's UI objects should be replaced with UI objects from the new factory. Use null if no Container needs resetting.
Throws: SecurityException
if a UI factory list has been set.
See Also:
setInstalledUIFactoryList
 o setUIFactory
 public static void setUIFactory(UIFactory factory,
                                 Container top,
                                 boolean persists) throws SecurityException
Sets the default UI factory, optionally resets all of the child components' UI objects in a Container, and optionally saves the default UI factory property.

Parameters:
factory - the new UI factory.
top - a Container whose UI object and its children's UI objects should be replaced with UI objects from the new factory. Use null if no Container needs resetting.
persists - save the default UI factory in the UIManager's properties file.
Throws: SecurityException
if a UI factory list has been set.
See Also:
setInstalledUIFactoryList
 o setInstalledUIFactoryList
 public static synchronized void setInstalledUIFactoryList(String factoryClassList[]) throws ClassNotFoundException
Sets the list of available UI factories. This method should only be used by applications which wish to restrict the list of UI factories they support. Once this method is called, new UI factories cannot be set or installed except by another call to this method.

Parameters:
factories - the list of supported UI factories, such as "com.sun.java.swing.basic.BasicFactory".
Throws: ClassNotFoundException
if any of the specified classes cannot be found.
 o installUIFactory
 public static synchronized void installUIFactory(String factoryClassName) throws ClassNotFoundException, SecurityException
Installs a UI factory. It is loaded and added to the list of available UI factories. Unlike getUIFactory(), this installation persists across VM invocations.

Parameters:
factoryClassName - the class name of the new UI factory, such as "com.foo.Bar".
Throws: ClassNotFoundException
if the specified class cannot be found.
Throws: SecurityException
if a UI factory list has been set.
See Also:
setInstalledUIFactoryList
 o deinstallUIFactory
 public static synchronized void deinstallUIFactory(String factoryClassName) throws ClassNotFoundException
Deinstalls a UI factory from the persistent list of available UI factories.

Parameters:
factoryClassName - the class name of the UI factory, such as "com.foo.Bar".
Throws: ClassNotFoundException
if the specified class cannot be found.
 o addUIChangeListener
 public static void addUIChangeListener(Window w)
Add a Window which will be notified when the default UI changes. Implementing UIManager.UpdateUI will cause the updateUI() method to be called when the default UI changes.

Parameters:
w - the Window to be notified.
 o removeUIChangeListener
 public static void removeUIChangeListener(Window w)
Remove a Window from the list of UI change notification recipients.

Parameters:
w - the Window to be removed.
 o getUI
 public static ComponentUI getUI(String widgetName,
                                 String defaultClassName,
                                 JComponent target)
Obtain a UI from the default factory.

Parameters:
widgetName - the name of the UI to get from the default factory.
defaultClassName - the default class to use if the default factory does not support widgetName.
target - the target component.

All Packages  Class Hierarchy  This Package  Previous  Next  Index