286 287 } 288 289 class OSXPlatformFont extends sun.awt.PlatformFont 290 { 291 public OSXPlatformFont(String name, int style) 292 { 293 super(name, style); 294 } 295 protected char getMissingGlyphCharacter() 296 { 297 // Follow up for real implementation 298 return (char)0xfff8; // see http://developer.apple.com/fonts/LastResortFont/ 299 } 300 } 301 public FontPeer getFontPeer(String name, int style) { 302 return new OSXPlatformFont(name, style); 303 } 304 305 @Override 306 protected MouseInfoPeer createMouseInfoPeerImpl() { 307 return new CMouseInfoPeer(); 308 } 309 310 @Override 311 protected int getScreenHeight() { 312 return GraphicsEnvironment.getLocalGraphicsEnvironment() 313 .getDefaultScreenDevice().getDefaultConfiguration().getBounds().height; 314 } 315 316 @Override 317 protected int getScreenWidth() { 318 return GraphicsEnvironment.getLocalGraphicsEnvironment() 319 .getDefaultScreenDevice().getDefaultConfiguration().getBounds().width; 320 } 321 322 @Override 323 protected void initializeDesktopProperties() { 324 super.initializeDesktopProperties(); 325 Map <Object, Object> fontHints = new HashMap<Object, Object>(); 326 fontHints.put(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); 327 fontHints.put(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON); 328 desktopProperties.put(SunToolkit.DESKTOPFONTHINTS, fontHints); 329 desktopProperties.put("awt.mouse.numButtons", BUTTONS); 330 | 286 287 } 288 289 class OSXPlatformFont extends sun.awt.PlatformFont 290 { 291 public OSXPlatformFont(String name, int style) 292 { 293 super(name, style); 294 } 295 protected char getMissingGlyphCharacter() 296 { 297 // Follow up for real implementation 298 return (char)0xfff8; // see http://developer.apple.com/fonts/LastResortFont/ 299 } 300 } 301 public FontPeer getFontPeer(String name, int style) { 302 return new OSXPlatformFont(name, style); 303 } 304 305 @Override 306 protected int getScreenHeight() { 307 return GraphicsEnvironment.getLocalGraphicsEnvironment() 308 .getDefaultScreenDevice().getDefaultConfiguration().getBounds().height; 309 } 310 311 @Override 312 protected int getScreenWidth() { 313 return GraphicsEnvironment.getLocalGraphicsEnvironment() 314 .getDefaultScreenDevice().getDefaultConfiguration().getBounds().width; 315 } 316 317 @Override 318 protected void initializeDesktopProperties() { 319 super.initializeDesktopProperties(); 320 Map <Object, Object> fontHints = new HashMap<Object, Object>(); 321 fontHints.put(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); 322 fontHints.put(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON); 323 desktopProperties.put(SunToolkit.DESKTOPFONTHINTS, fontHints); 324 desktopProperties.put("awt.mouse.numButtons", BUTTONS); 325 |