| java.lang.Object com.l2fprod.common.swing.plaf.LookAndFeelAddons
All known Subclasses: com.l2fprod.common.swing.plaf.basic.BasicLookAndFeelAddons,
LookAndFeelAddons | public class LookAndFeelAddons (Code) | | Provides additional pluggable UI for new components added by the
library. By default, the library uses the pluggable UI returned by
LookAndFeelAddons.getBestMatchAddonClassName() .
The default addon can be configured using the
swing.addon system property as follow:
- on the command line,
java -Dswing.addon=ADDONCLASSNAME ...
- at runtime and before using the library components
System.getProperties().put("swing.addon", ADDONCLASSNAME);
The addon can also be installed directly by calling the
LookAndFeelAddons.setAddon(String) method. For example, to install the
Windows addons, add the following statement
LookAndFeelAddons.setAddon("com.l2fprod.common.swing.plaf.windows.WindowsLookAndFeelAddons"); .
author: Frederic Lavigne |
contribute | public static void contribute(ComponentAddon component)(Code) | | Each new component added by the library will contribute its
default UI classes, colors and fonts to the LookAndFeelAddons.
See
ComponentAddon .
Parameters: component - |
getBestMatchAddonClassName | public static String getBestMatchAddonClassName()(Code) | | Based on the current look and feel (as returned by
UIManager.getLookAndFeel() ), this method returns
the name of the closest LookAndFeelAddons to use.
the addon matching the currently installed look and feel |
getSystemAddonClassName | public static String getSystemAddonClassName()(Code) | | Gets the addon best suited for the operating system where the
virtual machine is running.
the addon matching the native operating system platform. |
getUI | public static ComponentUI getUI(JComponent component, Class expectedUIClass)(Code) | | Workaround for IDE mixing up with classloaders and Applets environments.
Consider this method as API private. It must not be called directly.
Parameters: component - Parameters: expectedUIClass - an instance of expectedUIClass |
initialize | public void initialize()(Code) | | |
loadDefaults | public void loadDefaults(Object[] keysAndValues)(Code) | | Adds the given defaults in UIManager.
Note: the values are added only if they do not exist in the existing look
and feel defaults. This makes it possible for look and feel implementors to
override library defaults.
Note: the array is traversed in reverse order. If a key is found twice in
the array, the key/value with the highest position in the array gets
precedence over the other key in the array
Parameters: keysAndValues - |
setTrackingLookAndFeelChanges | public static synchronized void setTrackingLookAndFeelChanges(boolean tracking)(Code) | | If true, everytime the Swing look and feel is changed, the addon which
best matches the current look and feel will be automatically selected.
Parameters: tracking - true to automatically update the addon, false to not automaticallytrack the addon. Defaults to false. See Also: LookAndFeelAddons.getBestMatchAddonClassName() |
uncontribute | public static void uncontribute(ComponentAddon component)(Code) | | Removes the contribution of the given addon
Parameters: component - |
uninitialize | public void uninitialize()(Code) | | |
unloadDefaults | public void unloadDefaults(Object[] keysAndValues)(Code) | | |
|
|