< prev index next >

src/java.desktop/share/classes/javax/swing/plaf/metal/MetalLookAndFeel.java

Print this page




 273                 "ScrollBarUI", metalPackageName + "MetalScrollBarUI",
 274                "ScrollPaneUI", metalPackageName + "MetalScrollPaneUI",
 275                 "SeparatorUI", metalPackageName + "MetalSeparatorUI",
 276                    "SliderUI", metalPackageName + "MetalSliderUI",
 277                 "SplitPaneUI", metalPackageName + "MetalSplitPaneUI",
 278                "TabbedPaneUI", metalPackageName + "MetalTabbedPaneUI",
 279                 "TextFieldUI", metalPackageName + "MetalTextFieldUI",
 280              "ToggleButtonUI", metalPackageName + "MetalToggleButtonUI",
 281                   "ToolBarUI", metalPackageName + "MetalToolBarUI",
 282                   "ToolTipUI", metalPackageName + "MetalToolTipUI",
 283                      "TreeUI", metalPackageName + "MetalTreeUI",
 284                  "RootPaneUI", metalPackageName + "MetalRootPaneUI",
 285         };
 286 
 287         table.putDefaults(uiDefaults);
 288     }
 289 
 290     /**
 291      * Populates {@code table} with system colors. The following values are
 292      * added to {@code table}:
 293      * <table border="1" cellpadding="1" cellspacing="0"
 294      *         summary="Metal's system color mapping">
 295      *  <tr valign="top" style="text-align:left">
 296      *    <th style="background-color:#CCCCFF;text-align:left">Key
 297      *    <th style="background-color:#CCCCFF;text-align:left">Value




 298      *  <tr valign="top" style="text-align:left">
 299      *    <td>"desktop"
 300      *    <td>{@code theme.getDesktopColor()}
 301      *  <tr valign="top" style="text-align:left">
 302      *    <td>"activeCaption"
 303      *    <td>{@code theme.getWindowTitleBackground()}
 304      *  <tr valign="top" style="text-align:left">
 305      *    <td>"activeCaptionText"
 306      *    <td>{@code theme.getWindowTitleForeground()}
 307      *  <tr valign="top" style="text-align:left">
 308      *    <td>"activeCaptionBorder"
 309      *    <td>{@code theme.getPrimaryControlShadow()}
 310      *  <tr valign="top" style="text-align:left">
 311      *    <td>"inactiveCaption"
 312      *    <td>{@code theme.getWindowTitleInactiveBackground()}
 313      *  <tr valign="top" style="text-align:left">
 314      *    <td>"inactiveCaptionText"
 315      *    <td>{@code theme.getWindowTitleInactiveForeground()}
 316      *  <tr valign="top" style="text-align:left">
 317      *    <td>"inactiveCaptionBorder"


 356      *    <td>"controlHighlight"
 357      *    <td>{@code theme.getControlHighlight()}
 358      *  <tr valign="top" style="text-align:left">
 359      *    <td>"controlLtHighlight"
 360      *    <td>{@code theme.getControlHighlight()}
 361      *  <tr valign="top" style="text-align:left">
 362      *    <td>"controlShadow"
 363      *    <td>{@code theme.getControlShadow()}
 364      *  <tr valign="top" style="text-align:left">
 365      *    <td>"controlDkShadow"
 366      *    <td>{@code theme.getControlDarkShadow()}
 367      *  <tr valign="top" style="text-align:left">
 368      *    <td>"scrollbar"
 369      *    <td>{@code theme.getControl()}
 370      *  <tr valign="top" style="text-align:left">
 371      *    <td>"info"
 372      *    <td>{@code theme.getPrimaryControl()}
 373      *  <tr valign="top" style="text-align:left">
 374      *    <td>"infoText"
 375      *    <td>{@code theme.getPrimaryControlInfo()}

 376      * </table>
 377      * The value {@code theme} corresponds to the current {@code MetalTheme}.
 378      *
 379      * @param table the {@code UIDefaults} object the values are added to
 380      * @throws NullPointerException if {@code table} is {@code null}
 381      */
 382     protected void initSystemColorDefaults(UIDefaults table)
 383     {
 384         MetalTheme theme = getCurrentTheme();
 385         Color control = theme.getControl();
 386         Object[] systemColors = {
 387                 "desktop", theme.getDesktopColor(), /* Color of the desktop background */
 388           "activeCaption", theme.getWindowTitleBackground(), /* Color for captions (title bars) when they are active. */
 389       "activeCaptionText", theme.getWindowTitleForeground(), /* Text color for text in captions (title bars). */
 390     "activeCaptionBorder", theme.getPrimaryControlShadow(), /* Border color for caption (title bar) window borders. */
 391         "inactiveCaption", theme.getWindowTitleInactiveBackground(), /* Color for captions (title bars) when not active. */
 392     "inactiveCaptionText", theme.getWindowTitleInactiveForeground(), /* Text color for text in inactive captions (title bars). */
 393   "inactiveCaptionBorder", theme.getControlShadow(), /* Border color for inactive caption (title bar) window borders. */
 394                  "window", theme.getWindowBackground(), /* Default color for the interior of windows */
 395            "windowBorder", control, /* ??? */




 273                 "ScrollBarUI", metalPackageName + "MetalScrollBarUI",
 274                "ScrollPaneUI", metalPackageName + "MetalScrollPaneUI",
 275                 "SeparatorUI", metalPackageName + "MetalSeparatorUI",
 276                    "SliderUI", metalPackageName + "MetalSliderUI",
 277                 "SplitPaneUI", metalPackageName + "MetalSplitPaneUI",
 278                "TabbedPaneUI", metalPackageName + "MetalTabbedPaneUI",
 279                 "TextFieldUI", metalPackageName + "MetalTextFieldUI",
 280              "ToggleButtonUI", metalPackageName + "MetalToggleButtonUI",
 281                   "ToolBarUI", metalPackageName + "MetalToolBarUI",
 282                   "ToolTipUI", metalPackageName + "MetalToolTipUI",
 283                      "TreeUI", metalPackageName + "MetalTreeUI",
 284                  "RootPaneUI", metalPackageName + "MetalRootPaneUI",
 285         };
 286 
 287         table.putDefaults(uiDefaults);
 288     }
 289 
 290     /**
 291      * Populates {@code table} with system colors. The following values are
 292      * added to {@code table}:
 293      *
 294      * <table class="striped">
 295      * <caption>Metal's system color mapping</caption>
 296      * <thead>
 297      *  <tr>
 298      *    <th>Key
 299      *    <th>Value
 300      * </thead>
 301      * <tbody>
 302      *  <tr valign="top" style="text-align:left">
 303      *    <td>"desktop"
 304      *    <td>{@code theme.getDesktopColor()}
 305      *  <tr valign="top" style="text-align:left">
 306      *    <td>"activeCaption"
 307      *    <td>{@code theme.getWindowTitleBackground()}
 308      *  <tr valign="top" style="text-align:left">
 309      *    <td>"activeCaptionText"
 310      *    <td>{@code theme.getWindowTitleForeground()}
 311      *  <tr valign="top" style="text-align:left">
 312      *    <td>"activeCaptionBorder"
 313      *    <td>{@code theme.getPrimaryControlShadow()}
 314      *  <tr valign="top" style="text-align:left">
 315      *    <td>"inactiveCaption"
 316      *    <td>{@code theme.getWindowTitleInactiveBackground()}
 317      *  <tr valign="top" style="text-align:left">
 318      *    <td>"inactiveCaptionText"
 319      *    <td>{@code theme.getWindowTitleInactiveForeground()}
 320      *  <tr valign="top" style="text-align:left">
 321      *    <td>"inactiveCaptionBorder"


 360      *    <td>"controlHighlight"
 361      *    <td>{@code theme.getControlHighlight()}
 362      *  <tr valign="top" style="text-align:left">
 363      *    <td>"controlLtHighlight"
 364      *    <td>{@code theme.getControlHighlight()}
 365      *  <tr valign="top" style="text-align:left">
 366      *    <td>"controlShadow"
 367      *    <td>{@code theme.getControlShadow()}
 368      *  <tr valign="top" style="text-align:left">
 369      *    <td>"controlDkShadow"
 370      *    <td>{@code theme.getControlDarkShadow()}
 371      *  <tr valign="top" style="text-align:left">
 372      *    <td>"scrollbar"
 373      *    <td>{@code theme.getControl()}
 374      *  <tr valign="top" style="text-align:left">
 375      *    <td>"info"
 376      *    <td>{@code theme.getPrimaryControl()}
 377      *  <tr valign="top" style="text-align:left">
 378      *    <td>"infoText"
 379      *    <td>{@code theme.getPrimaryControlInfo()}
 380      * </tbody>
 381      * </table>
 382      * The value {@code theme} corresponds to the current {@code MetalTheme}.
 383      *
 384      * @param table the {@code UIDefaults} object the values are added to
 385      * @throws NullPointerException if {@code table} is {@code null}
 386      */
 387     protected void initSystemColorDefaults(UIDefaults table)
 388     {
 389         MetalTheme theme = getCurrentTheme();
 390         Color control = theme.getControl();
 391         Object[] systemColors = {
 392                 "desktop", theme.getDesktopColor(), /* Color of the desktop background */
 393           "activeCaption", theme.getWindowTitleBackground(), /* Color for captions (title bars) when they are active. */
 394       "activeCaptionText", theme.getWindowTitleForeground(), /* Text color for text in captions (title bars). */
 395     "activeCaptionBorder", theme.getPrimaryControlShadow(), /* Border color for caption (title bar) window borders. */
 396         "inactiveCaption", theme.getWindowTitleInactiveBackground(), /* Color for captions (title bars) when not active. */
 397     "inactiveCaptionText", theme.getWindowTitleInactiveForeground(), /* Text color for text in inactive captions (title bars). */
 398   "inactiveCaptionBorder", theme.getControlShadow(), /* Border color for inactive caption (title bar) window borders. */
 399                  "window", theme.getWindowBackground(), /* Default color for the interior of windows */
 400            "windowBorder", control, /* ??? */


< prev index next >