< prev index next >

src/java.desktop/windows/classes/sun/awt/windows/WToolkit.java

Print this page




 614         return config.getColorModel();
 615     }
 616 
 617     @Override
 618     public ColorModel getColorModel() {
 619         return getStaticColorModel();
 620     }
 621 
 622     @Override
 623     public Insets getScreenInsets(GraphicsConfiguration gc)
 624     {
 625         return getScreenInsets(((Win32GraphicsDevice) gc.getDevice()).getScreen());
 626     }
 627 
 628     @Override
 629     public int getScreenResolution() {
 630         Win32GraphicsEnvironment ge = (Win32GraphicsEnvironment)
 631             GraphicsEnvironment.getLocalGraphicsEnvironment();
 632         return ge.getXResolution();
 633     }

 634     @Override
 635     protected native int getScreenWidth();





 636     @Override
 637     protected native int getScreenHeight();





 638     private native Insets getScreenInsets(int screen);
 639 
 640 
 641     @Override
 642     public FontMetrics getFontMetrics(Font font) {
 643         // This is an unsupported hack, but left in for a customer.
 644         // Do not remove.
 645         FontManager fm = FontManagerFactory.getInstance();
 646         if (fm instanceof SunFontManager
 647             && ((SunFontManager) fm).usePlatformFontMetrics()) {
 648             return WFontMetrics.getFontMetrics(font);
 649         }
 650         return super.getFontMetrics(font);
 651     }
 652 
 653     @Override
 654     public FontPeer getFontPeer(String name, int style) {
 655         FontPeer retval = null;
 656         String lcName = name.toLowerCase();
 657         if (null != cacheFontPeer) {




 614         return config.getColorModel();
 615     }
 616 
 617     @Override
 618     public ColorModel getColorModel() {
 619         return getStaticColorModel();
 620     }
 621 
 622     @Override
 623     public Insets getScreenInsets(GraphicsConfiguration gc)
 624     {
 625         return getScreenInsets(((Win32GraphicsDevice) gc.getDevice()).getScreen());
 626     }
 627 
 628     @Override
 629     public int getScreenResolution() {
 630         Win32GraphicsEnvironment ge = (Win32GraphicsEnvironment)
 631             GraphicsEnvironment.getLocalGraphicsEnvironment();
 632         return ge.getXResolution();
 633     }
 634 
 635     @Override
 636     protected int getScreenWidth() {
 637         return GraphicsEnvironment.getLocalGraphicsEnvironment()
 638                 .getDefaultScreenDevice().getDefaultConfiguration()
 639                 .getBounds().width;
 640     }
 641 
 642     @Override
 643     protected int getScreenHeight() {
 644         return GraphicsEnvironment.getLocalGraphicsEnvironment()
 645                 .getDefaultScreenDevice().getDefaultConfiguration()
 646                 .getBounds().height;
 647     }
 648 
 649     private native Insets getScreenInsets(int screen);
 650 
 651 
 652     @Override
 653     public FontMetrics getFontMetrics(Font font) {
 654         // This is an unsupported hack, but left in for a customer.
 655         // Do not remove.
 656         FontManager fm = FontManagerFactory.getInstance();
 657         if (fm instanceof SunFontManager
 658             && ((SunFontManager) fm).usePlatformFontMetrics()) {
 659             return WFontMetrics.getFontMetrics(font);
 660         }
 661         return super.getFontMetrics(font);
 662     }
 663 
 664     @Override
 665     public FontPeer getFontPeer(String name, int style) {
 666         FontPeer retval = null;
 667         String lcName = name.toLowerCase();
 668         if (null != cacheFontPeer) {


< prev index next >