All Packages Class Hierarchy This Package Previous Next Index
Class com.sun.java.swing.UIFactory
java.lang.Object
|
+----com.sun.java.swing.UIFactory
- public abstract class UIFactory
- extends Object
- implements Serializable
The UI Factory is responsible for managing the interaction between a
pluggable look-and-feel and its Component clients.
-
UIFactory()
-
-
changeTopUI(Container)
- Walk though a Container's child Component hierarchy, replacing all
UI objects with ones created by this UI factory.
-
changeUI(Container)
- Change the UI object of this Container and all of its children.
-
getFactoryName()
- Returns the name of the current UI Factory, if any.
-
getFont(String, String)
- Get a default Font property from this UI factory.
-
getImage(String, String)
- Get a default Image property from this UI factory.
-
getPropertiesFile()
- Returns the name of the properties file used to define this
UI factory.
-
getProperty(String, String)
- Returns a property definition from this UI Factory.
-
getResourceDirectory()
- Returns the subdirectory which contains file resources used by
this UI factory, such as graphics files.
-
getUI(String, String, JComponent)
- Create a UI object.
-
initialize()
- Initialize a UI factory after it is loaded.
UIFactory
public UIFactory()
initialize
protected void initialize() throws Exception
- Initialize a UI factory after it is loaded.
- Throws: Exception
- if any problems occur reading the UIFactory's
property file.
getProperty
public String getProperty(String name,
String defaultName)
- Returns a property definition from this UI Factory.
If it doesn't have a definition for a requested
property, the defaultName is returned.
- Parameters:
- name - the name of the property
- defaultName - the String to return if the property isn't
defined by this factory.
changeTopUI
public void changeTopUI(Container c)
- Walk though a Container's child Component hierarchy, replacing all
UI objects with ones created by this UI factory.
- Parameters:
- c - the Container to update.
changeUI
public void changeUI(Container c)
- Change the UI object of this Container and all of its children.
- Parameters:
- c - the Container to update.
getFactoryName
public abstract String getFactoryName()
- Returns the name of the current UI Factory, if any.
getPropertiesFile
public abstract String getPropertiesFile()
- Returns the name of the properties file used to define this
UI factory.
getResourceDirectory
public abstract String getResourceDirectory()
- Returns the subdirectory which contains file resources used by
this UI factory, such as graphics files.
getFont
public Font getFont(String name,
String defaultName)
- Get a default Font property from this UI factory.
- Parameters:
- name - the name of the property.
- defaultName - the name of the Font to return if no default is
defined by this UI factory.
getImage
public Image getImage(String name,
String defaultName)
- Get a default Image property from this UI factory.
- Parameters:
- name - the name of the property.
- defaultName - the name of the Image to return if no default is
defined by this UI factory.
getUI
public ComponentUI getUI(String widgetName,
String defaultClassName,
JComponent target)
- Create a UI object.
- Parameters:
- widgetName - the name of the UI object to create.
- defaultClassName - the name of the class to create the
UI object, if the UIFactory does not have the specified widget name.
- target - the JComponent which will use this returned UI
object.
- Returns:
- the requested UI object. Note: this UI object may or may
not be unique, as some factories may choose to share UI objects
between JComponents.
All Packages Class Hierarchy This Package Previous Next Index