Logo Search packages:      
Sourcecode: libjgoodies-looks-java version File versions  Download package

void com::jgoodies::looks::plastic::PlasticLookAndFeel::initClassDefaults ( UIDefaults  table  )  [inline, protected]

Initializes the class defaults, that is, overrides some UI delegates with JGoodies Plastic implementations.

Parameters:
table the UIDefaults table to work with
See also:
javax.swing.plaf.basic.BasicLookAndFeel::getDefaults()

Reimplemented in com::jgoodies::looks::plastic::PlasticXPLookAndFeel.

Definition at line 376 of file PlasticLookAndFeel.java.

References append(), and useMetalTabs.

                                                         {
            super.initClassDefaults(table);

            final String plasticPrefix = "com.jgoodies.looks.plastic.Plastic";
        final String commonPrefix  = "com.jgoodies.looks.common.ExtBasic";
        
            // Overwrite some of the uiDefaults.
            Object[] uiDefaults = {
                        // 3D effect; optional narrow margins
                        "ButtonUI",                         plasticPrefix + "ButtonUI",
                        "ToggleButtonUI",             plasticPrefix + "ToggleButtonUI",

                        // 3D effect
                        "ComboBoxUI",                       plasticPrefix + "ComboBoxUI",
                        "ScrollBarUI",                      plasticPrefix + "ScrollBarUI",
                        "SpinnerUI",                        plasticPrefix + "SpinnerUI",
                        
                        // Special borders defined by border style or header style, see LookUtils
                        "MenuBarUI",                        plasticPrefix + "MenuBarUI",
                        "ToolBarUI",                        plasticPrefix + "ToolBarUI",
                        
                        // Aligns menu icons
                "MenuUI",                   plasticPrefix + "MenuUI",
                        "MenuItemUI",                       commonPrefix + "MenuItemUI",
                        "CheckBoxMenuItemUI",         commonPrefix + "CheckBoxMenuItemUI",
                        "RadioButtonMenuItemUI",      commonPrefix + "RadioButtonMenuItemUI",

                // Provides an option for a no margin border              
                "PopupMenuUI",              plasticPrefix + "PopupMenuUI",
               
                        // Has padding above and below the separator lines                      
                    "PopupMenuSeparatorUI",           commonPrefix + "PopupMenuSeparatorUI",
                   
                // Honors the screen resolution and uses a minimum button width             
                "OptionPaneUI",             plasticPrefix + "OptionPaneUI",
               
                // Can installs an optional etched border
                        "ScrollPaneUI",                     plasticPrefix + "ScrollPaneUI",
                   
                // Uses a modified split divider
                        "SplitPaneUI",                      plasticPrefix + "SplitPaneUI",
                        
                // Renders a circle, not a star '*' in Java 1.4 and Java 5
                // Selects all text after focus gain via keyboard.
                "PasswordFieldUI",          plasticPrefix + "PasswordFieldUI",
                
                // Updates the disabled and inactive background
                "TextAreaUI",               plasticPrefix + "TextAreaUI",

                        // Modified icons and lines
                        "TreeUI",                           plasticPrefix + "TreeUI",
                        
                        // Just to use Plastic colors
                        "InternalFrameUI",                  plasticPrefix + "InternalFrameUI",
                
                // Share the UI delegate instances
                "SeparatorUI",              plasticPrefix + "SeparatorUI",
                "ToolBarSeparatorUI",       plasticPrefix + "ToolBarSeparatorUI",
                
                // Optionally looks up the system icons
                "FileChooserUI",            plasticPrefix + "FileChooserUI"

                  };
        if (!useMetalTabs) {
            // Modified tabs and ability use a version with reduced borders.
            uiDefaults = append(uiDefaults,
                    "TabbedPaneUI", plasticPrefix + "TabbedPaneUI");
        }
        if (isSelectTextOnKeyboardFocusGained()) {
            // Selects all text after focus gain via keyboard.
            uiDefaults = append(uiDefaults,
                    "TextFieldUI", plasticPrefix + "TextFieldUI");
            uiDefaults = append(uiDefaults,
                    "FormattedTextFieldUI", plasticPrefix + "FormattedTextFieldUI");
        }
            table.putDefaults(uiDefaults);
      }


Generated by  Doxygen 1.6.0   Back to index