117 * aren't defined for the current platform. 118 * 119 * @see UIManager#setLookAndFeel 120 */ 121 public boolean isSupportedLookAndFeel() { 122 return true; 123 } 124 125 /** 126 * UIManager.setLookAndFeel calls this method before the first 127 * call (and typically the only call) to getDefaults(). Subclasses 128 * should do any one-time setup they need here, rather than 129 * in a static initializer, because look and feel class objects 130 * may be loaded just to discover that isSupportedLookAndFeel() 131 * returns false. 132 * 133 * @see #uninitialize 134 * @see UIManager#setLookAndFeel 135 */ 136 public void initialize() { 137 java.security.AccessController.doPrivileged((PrivilegedAction<?>)new sun.security.action.LoadLibraryAction("osxui")); 138 java.security.AccessController.doPrivileged(new PrivilegedAction<Object>(){ 139 @Override 140 public Object run() { 141 JRSUIControl.initJRSUI(); 142 return null; 143 } 144 }); 145 146 super.initialize(); 147 final ScreenPopupFactory spf = new ScreenPopupFactory(); 148 spf.setActive(true); 149 PopupFactory.setSharedInstance(spf); 150 151 KeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventPostProcessor(AquaMnemonicHandler.getInstance()); 152 } 153 154 /** 155 * UIManager.setLookAndFeel calls this method just before we're 156 * replaced by a new default look and feel. Subclasses may 157 * choose to free up some resources here. 158 * 159 * @see #initialize 160 */ | 117 * aren't defined for the current platform. 118 * 119 * @see UIManager#setLookAndFeel 120 */ 121 public boolean isSupportedLookAndFeel() { 122 return true; 123 } 124 125 /** 126 * UIManager.setLookAndFeel calls this method before the first 127 * call (and typically the only call) to getDefaults(). Subclasses 128 * should do any one-time setup they need here, rather than 129 * in a static initializer, because look and feel class objects 130 * may be loaded just to discover that isSupportedLookAndFeel() 131 * returns false. 132 * 133 * @see #uninitialize 134 * @see UIManager#setLookAndFeel 135 */ 136 public void initialize() { 137 java.security.AccessController.doPrivileged(new PrivilegedAction<Void>() { 138 public Void run() { 139 System.loadLibrary("osxui"); 140 return null; 141 } 142 }); 143 144 java.security.AccessController.doPrivileged(new PrivilegedAction<Void>(){ 145 @Override 146 public Void run() { 147 JRSUIControl.initJRSUI(); 148 return null; 149 } 150 }); 151 152 super.initialize(); 153 final ScreenPopupFactory spf = new ScreenPopupFactory(); 154 spf.setActive(true); 155 PopupFactory.setSharedInstance(spf); 156 157 KeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventPostProcessor(AquaMnemonicHandler.getInstance()); 158 } 159 160 /** 161 * UIManager.setLookAndFeel calls this method just before we're 162 * replaced by a new default look and feel. Subclasses may 163 * choose to free up some resources here. 164 * 165 * @see #initialize 166 */ |