public class IlvLookAndFeelSupport extends Object
IlvLookAndFeelSupport
provides two basic facilities that allow
the Swing calendar components and their LAF implementations to integrate
seamlessly into the Swing framework:
UIManager
.
UIManager
.
LookAndFeel
implementations
handle this registration for the standard Swing components when the LAF is
installed. However, the LookAndFeel
implementations contain
hard-coded lists of the standard Swing components, their UI delegate
implementations, and their fonts and colors. Therefore, custom components
cannot be simply added to the existing LookAndFeel
implementations. Instead, this class listens for notification that a
LookAndFeel
has been installed and then supplements the
initialization of the standard Swing components into the UIManager
with initialization of the custom components.Modifier | Constructor and Description |
---|---|
protected |
IlvLookAndFeelSupport()
Creates a new
IlvLookAndFeelSupport . |
Modifier and Type | Method and Description |
---|---|
protected String |
getDefaultUIDelegate(String uiClassID,
String lafID)
Returns the UI delegate implementation for the specified component and the
specified LAF.
|
static IlvLookAndFeelSupport |
getInstance()
Returns the shared support instance that is handling the look and feel
integration into Swing for the calendar components.
|
protected List<String> |
getUIClassIDs()
Returns a list of the component UI class IDs that have been mapped
to UI delegate implementations by the
setDefaultUIDelegate(java.lang.String, java.lang.String, java.lang.String) method. |
protected void |
initComponentDefaults(UIDefaults defaults,
LookAndFeel laf)
Updates the specified defaults table with the default component properties
for the specified look and feel.
|
protected void |
initDefaultUIDelegates()
Initializes the mapping between components and their UI delegate implementations
for each LAF.
|
static void |
initialize()
Initializes the shared support instance, if necessary, that will handle the
look and feel integration into Swing for the calendar components.
|
protected void |
setDefaultUIDelegate(String uiClassID,
String lafID,
String uiClassName)
Sets the mapping between a component and its UI delegate implementation for
a specific LAF.
|
static void |
setInstance(IlvLookAndFeelSupport lafManager)
Sets the shared support instance that will handle the look and feel
integration into Swing for the calendar components.
|
protected IlvLookAndFeelSupport()
IlvLookAndFeelSupport
.public static final IlvLookAndFeelSupport getInstance()
public static final void setInstance(IlvLookAndFeelSupport lafManager)
lafManager
- The look and feel support manager.public static final void initialize()
updateUI
method in every custom
component class whose look and feel is being managed by this class:
public void updateUI() { IlvLookAndFeelSupport.initialize(); setUI((...)UIManager.getUI(this)); }
protected final List<String> getUIClassIDs()
setDefaultUIDelegate(java.lang.String, java.lang.String, java.lang.String)
method.protected final void setDefaultUIDelegate(String uiClassID, String lafID, String uiClassName)
initDefaultUIDelegates()
to initialize the mapping between components and their UI delegate
implementations for each LAF.uiClassID
- The component's UI class ID. For example: "CalendarPanelUI".lafID
- The ID of the look and feel. The "Metal" ID sets the default
for LAFs that you do not explicitly specify.uiClassName
- The fully qualified class name of the UI delegate.getDefaultUIDelegate(java.lang.String, java.lang.String)
protected final String getDefaultUIDelegate(String uiClassID, String lafID)
specified a delegate
for the LAF, the UI
delegate implementation that you specified for the Metal look and feel will
be returned.uiClassID
- The component's UI class ID. For example: "CalendarPanelUI".lafID
- The ID of the look and feel.setDefaultUIDelegate(java.lang.String, java.lang.String, java.lang.String)
protected void initDefaultUIDelegates()
setDefaultUIDelegate(java.lang.String, java.lang.String, java.lang.String)
method to
establish the mappings.protected void initComponentDefaults(UIDefaults defaults, LookAndFeel laf)
defaults
- The defaults table.laf
- The look and feel.© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.