org.jdesktop.swingx.plaf
Class AbstractComponentAddon

java.lang.Object
  extended by org.jdesktop.swingx.plaf.AbstractComponentAddon
All Implemented Interfaces:
ComponentAddon
Direct Known Subclasses:
BusyLabelAddon, ColumnControlButtonAddon, DatePickerAddon, ErrorPaneAddon, HeaderAddon, HyperlinkAddon, LoginPaneAddon, MonthViewAddon, MultiThumbSliderAddon, StatusBarAddon, TableAddon, TableHeaderAddon, TaskPaneAddon, TaskPaneContainerAddon, TipOfTheDayAddon, TitledPanelAddon, UIColorHighlighterAddon, XListAddon

public abstract class AbstractComponentAddon
extends Object
implements ComponentAddon

Ease the work of creating an addon for a component.


Constructor Summary
protected AbstractComponentAddon(String name)
           
 
Method Summary
protected  void addBasicDefaults(LookAndFeelAddons addon, DefaultsList defaults)
          Adds default key/value pairs to the given list.
protected  void addLinuxDefaults(LookAndFeelAddons addon, DefaultsList defaults)
          Default implementation calls addBasicDefaults(LookAndFeelAddons, DefaultsList)
protected  void addMacDefaults(LookAndFeelAddons addon, DefaultsList defaults)
          Default implementation calls addBasicDefaults(LookAndFeelAddons, DefaultsList)
protected  void addMetalDefaults(LookAndFeelAddons addon, DefaultsList defaults)
          Default implementation calls addBasicDefaults(LookAndFeelAddons, DefaultsList)
protected  void addMotifDefaults(LookAndFeelAddons addon, DefaultsList defaults)
          Default implementation calls addBasicDefaults(LookAndFeelAddons, DefaultsList)
protected  void addNimbusDefaults(LookAndFeelAddons addon, DefaultsList defaults)
          Default implementation calls addBasicDefaults(LookAndFeelAddons, DefaultsList)
protected  void addWindowsDefaults(LookAndFeelAddons addon, DefaultsList defaults)
          Default implementation calls addBasicDefaults(LookAndFeelAddons, DefaultsList)
 String getName()
           
 void initialize(LookAndFeelAddons addon)
          Initializes this addon (i.e register UI classes, colors, fonts, borders, any UIResource used by the component class).
protected  boolean isLinux(LookAndFeelAddons addon)
           
protected  boolean isMac(LookAndFeelAddons addon)
           
protected  boolean isMetal(LookAndFeelAddons addon)
           
protected  boolean isMotif(LookAndFeelAddons addon)
           
protected  boolean isNimbus(LookAndFeelAddons addon)
           
protected  boolean isPlastic()
           
protected  boolean isSynth()
           
protected  boolean isWindows(LookAndFeelAddons addon)
           
 void uninitialize(LookAndFeelAddons addon)
          Uninitializes this addon.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractComponentAddon

protected AbstractComponentAddon(String name)
Method Detail

getName

public final String getName()
Specified by:
getName in interface ComponentAddon
Returns:
the name of this addon

initialize

public void initialize(LookAndFeelAddons addon)
Description copied from interface: ComponentAddon
Initializes this addon (i.e register UI classes, colors, fonts, borders, any UIResource used by the component class). When initializing, the addon can register different resources based on the addon or the current look and feel.

Specified by:
initialize in interface ComponentAddon
Parameters:
addon - the current addon

uninitialize

public void uninitialize(LookAndFeelAddons addon)
Description copied from interface: ComponentAddon
Uninitializes this addon.

Specified by:
uninitialize in interface ComponentAddon

addBasicDefaults

protected void addBasicDefaults(LookAndFeelAddons addon,
                                DefaultsList defaults)
Adds default key/value pairs to the given list.

Parameters:
addon -
defaults -

addMacDefaults

protected void addMacDefaults(LookAndFeelAddons addon,
                              DefaultsList defaults)
Default implementation calls addBasicDefaults(LookAndFeelAddons, DefaultsList)

Parameters:
addon -
defaults -

addMetalDefaults

protected void addMetalDefaults(LookAndFeelAddons addon,
                                DefaultsList defaults)
Default implementation calls addBasicDefaults(LookAndFeelAddons, DefaultsList)

Parameters:
addon -
defaults -

addMotifDefaults

protected void addMotifDefaults(LookAndFeelAddons addon,
                                DefaultsList defaults)
Default implementation calls addBasicDefaults(LookAndFeelAddons, DefaultsList)

Parameters:
addon -
defaults -

addWindowsDefaults

protected void addWindowsDefaults(LookAndFeelAddons addon,
                                  DefaultsList defaults)
Default implementation calls addBasicDefaults(LookAndFeelAddons, DefaultsList)

Parameters:
addon -
defaults -

addLinuxDefaults

protected void addLinuxDefaults(LookAndFeelAddons addon,
                                DefaultsList defaults)
Default implementation calls addBasicDefaults(LookAndFeelAddons, DefaultsList)

Parameters:
addon -
defaults -

addNimbusDefaults

protected void addNimbusDefaults(LookAndFeelAddons addon,
                                 DefaultsList defaults)
Default implementation calls addBasicDefaults(LookAndFeelAddons, DefaultsList)

Parameters:
addon -
defaults -

isWindows

protected boolean isWindows(LookAndFeelAddons addon)
Returns:
true if the addon is the Windows addon or its subclasses

isMetal

protected boolean isMetal(LookAndFeelAddons addon)
Returns:
true if the addon is the Metal addon or its subclasses

isMac

protected boolean isMac(LookAndFeelAddons addon)
Returns:
true if the addon is the Mac OS X addon or its subclasses

isMotif

protected boolean isMotif(LookAndFeelAddons addon)
Returns:
true if the addon is the Motif addon or its subclasses

isLinux

protected boolean isLinux(LookAndFeelAddons addon)
Returns:
true if the current look and feel is Linux

isNimbus

protected boolean isNimbus(LookAndFeelAddons addon)
Returns:
true if the current look and feel is Nimbus

isPlastic

protected boolean isPlastic()
Returns:
true if the current look and feel is one of JGoodies Plastic l&fs

isSynth

protected boolean isSynth()
Returns:
true if the current look and feel is Synth l&f