src/solaris/classes/sun/awt/X11/XAWTLookAndFeel.java

Print this page


   1 /*
   2  * Copyright (c) 2003, 2007, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package sun.awt.X11;
  27 
  28 import java.awt.Color;
  29 import java.awt.Font;
  30 import java.awt.SystemColor;
  31 
  32 import javax.swing.*;
  33 import javax.swing.plaf.*;
  34 import javax.swing.border.*;
  35 import javax.swing.text.DefaultEditorKit;
  36 
  37 import javax.swing.plaf.basic.BasicBorders;
  38 import com.sun.java.swing.plaf.motif.*;
  39 import sun.awt.X11.XComponentPeer;
  40 

  41 class XAWTLookAndFeel extends MotifLookAndFeel {
  42 
  43     /**
  44      * Load the SystemColors into the defaults table.  The keys
  45      * for SystemColor defaults are the same as the names of
  46      * the public fields in SystemColor.  If the table is being
  47      * created on a native Motif platform we use the SystemColor
  48      * values, otherwise we create color objects whose values match
  49      * the default CDE/Motif colors.
  50      */
  51     protected void initSystemColorDefaults(UIDefaults table) {
  52         String[] defaultSystemColors = {
  53             "desktop", "#005C5C", /* Color of the desktop background */
  54             "activeCaption", "#000080", /* Color for captions (title bars) when they are active. */
  55             "activeCaptionText", "#FFFFFF", /* Text color for text in captions (title bars). */
  56             "activeCaptionBorder", "#B24D7A", /* Border color for caption (title bar) window borders. */
  57             "inactiveCaption", "#AEB2C3", /* Color for captions (title bars) when not active. */
  58             "inactiveCaptionText", "#000000", /* Text color for text in inactive captions (title bars). */
  59             "inactiveCaptionBorder", "#AEB2C3", /* Border color for inactive caption (title bar) window borders. */
  60             "window", "#AEB2C3", /* Default color for the interior of windows */


   1 /*
   2  * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package sun.awt.X11;
  27 
  28 import java.awt.Color;
  29 import java.awt.Font;
  30 import java.awt.SystemColor;
  31 
  32 import javax.swing.*;
  33 import javax.swing.plaf.*;
  34 import javax.swing.border.*;
  35 import javax.swing.text.DefaultEditorKit;
  36 
  37 import javax.swing.plaf.basic.BasicBorders;
  38 import com.sun.java.swing.plaf.motif.*;
  39 import sun.awt.X11.XComponentPeer;
  40 
  41 @SuppressWarnings("serial") // JDK-implementation class
  42 class XAWTLookAndFeel extends MotifLookAndFeel {
  43 
  44     /**
  45      * Load the SystemColors into the defaults table.  The keys
  46      * for SystemColor defaults are the same as the names of
  47      * the public fields in SystemColor.  If the table is being
  48      * created on a native Motif platform we use the SystemColor
  49      * values, otherwise we create color objects whose values match
  50      * the default CDE/Motif colors.
  51      */
  52     protected void initSystemColorDefaults(UIDefaults table) {
  53         String[] defaultSystemColors = {
  54             "desktop", "#005C5C", /* Color of the desktop background */
  55             "activeCaption", "#000080", /* Color for captions (title bars) when they are active. */
  56             "activeCaptionText", "#FFFFFF", /* Text color for text in captions (title bars). */
  57             "activeCaptionBorder", "#B24D7A", /* Border color for caption (title bar) window borders. */
  58             "inactiveCaption", "#AEB2C3", /* Color for captions (title bars) when not active. */
  59             "inactiveCaptionText", "#000000", /* Text color for text in inactive captions (title bars). */
  60             "inactiveCaptionBorder", "#AEB2C3", /* Border color for inactive caption (title bar) window borders. */
  61             "window", "#AEB2C3", /* Default color for the interior of windows */