src/macosx/classes/com/apple/laf/AquaLookAndFeel.java

Print this page




  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 com.apple.laf;
  27 
  28 import java.awt.*;
  29 import java.security.PrivilegedAction;
  30 import java.util.*;
  31 
  32 import javax.swing.*;
  33 import javax.swing.border.Border;
  34 import javax.swing.plaf.*;
  35 import javax.swing.plaf.basic.BasicBorders;
  36 import javax.swing.plaf.basic.BasicLookAndFeel;
  37 import static javax.swing.UIDefaults.LazyValue;
  38 import sun.swing.*;
  39 import apple.laf.*;
  40 

  41 public class AquaLookAndFeel extends BasicLookAndFeel {
  42     static final String sOldPropertyPrefix = "com.apple.macos."; // old prefix for things like 'useScreenMenuBar'
  43     static final String sPropertyPrefix = "apple.laf."; // new prefix for things like 'useScreenMenuBar'
  44 
  45     // for lazy initalizers. Following the pattern from metal.
  46     private static final String PKG_PREFIX = "com.apple.laf.";
  47 
  48     /**
  49      * Return a short string that identifies this look and feel, e.g.
  50      * "CDE/Motif".  This string should be appropriate for a menu item.
  51      * Distinct look and feels should have different names, e.g.
  52      * a subclass of MotifLookAndFeel that changes the way a few components
  53      * are rendered should be called "CDE/Motif My Way"; something
  54      * that would be useful to a user trying to select a L&F from a list
  55      * of names.
  56      */
  57     public String getName() {
  58         return "Mac OS X";
  59     }
  60 




  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 com.apple.laf;
  27 
  28 import java.awt.*;
  29 import java.security.PrivilegedAction;
  30 import java.util.*;
  31 
  32 import javax.swing.*;
  33 import javax.swing.border.Border;
  34 import javax.swing.plaf.*;
  35 import javax.swing.plaf.basic.BasicBorders;
  36 import javax.swing.plaf.basic.BasicLookAndFeel;
  37 import static javax.swing.UIDefaults.LazyValue;
  38 import sun.swing.*;
  39 import apple.laf.*;
  40 
  41 @SuppressWarnings("serial") // Superclass is not serializable across versions
  42 public class AquaLookAndFeel extends BasicLookAndFeel {
  43     static final String sOldPropertyPrefix = "com.apple.macos."; // old prefix for things like 'useScreenMenuBar'
  44     static final String sPropertyPrefix = "apple.laf."; // new prefix for things like 'useScreenMenuBar'
  45 
  46     // for lazy initalizers. Following the pattern from metal.
  47     private static final String PKG_PREFIX = "com.apple.laf.";
  48 
  49     /**
  50      * Return a short string that identifies this look and feel, e.g.
  51      * "CDE/Motif".  This string should be appropriate for a menu item.
  52      * Distinct look and feels should have different names, e.g.
  53      * a subclass of MotifLookAndFeel that changes the way a few components
  54      * are rendered should be called "CDE/Motif My Way"; something
  55      * that would be useful to a user trying to select a L&F from a list
  56      * of names.
  57      */
  58     public String getName() {
  59         return "Mac OS X";
  60     }
  61