< prev index next >

src/java.desktop/share/classes/java/awt/doc-files/DesktopProperties.html

Print this page


   1 <!doctype html>
   2 <html lang="en">
   3 <head>
   4   <meta charset="utf-8"/>
   5   <title>AWT Desktop Properties</title>

   6 </head>
   7 <!--
   8  Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
   9  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  10 
  11  This code is free software; you can redistribute it and/or modify it
  12  under the terms of the GNU General Public License version 2 only, as
  13  published by the Free Software Foundation.  Oracle designates this
  14  particular file as subject to the "Classpath" exception as provided
  15  by Oracle in the LICENSE file that accompanied this code.
  16 
  17  This code is distributed in the hope that it will be useful, but WITHOUT
  18  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  19  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  20  version 2 for more details (a copy is included in the LICENSE file that
  21  accompanied this code).
  22 
  23  You should have received a copy of the GNU General Public License version
  24  2 along with this work; if not, write to the Free Software Foundation,
  25  Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  26 
  27  Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  28  or visit www.oracle.com if you need additional information or have any


  40 <p>
  41 Each desktop property is named by a unique string, which
  42 is the "name" of that property.
  43 <p>
  44 Desktop properties supported by the AWT but not documented
  45 elsewhere - typically because there is no suitable
  46 method or class - are documented here.
  47 <p>
  48 Desktop properties documented elsewhere are those which are
  49 tightly coupled with a method or class which documents them.
  50 <p>
  51 Since desktop properties abstract an underlying platform
  52 setting, they may not be available in environments that do
  53 not support them. In the event that a desktop property is
  54 unavailable for any reason, the implementation will return
  55 <code>null</code>.
  56 <p>
  57 The following table summarizes the desktop properties documented
  58 here, and their value types.
  59 <br><br>
  60 <table>
  61 <tr bgcolor="#ccccff">
  62 <th>Property Name</th>
  63 <th>Value Type</th>
  64 <th>Summary Description</th>

  65 </tr>


  66 <tr>
  67 <td><A href="#awt.font.desktophints">awt.font.desktophints</A></td>
  68 <td>{@link java.util.Map java.util.Map}</td>
  69 <td>Font smoothing (text antialiasing) settings.</td>
  70 </tr>
  71 <tr>
  72 <td><A href="#sun.awt.enableExtraMouseButtons">sun.awt.enableExtraMouseButtons</A></td>
  73 <td>{@link java.lang.Boolean java.lang.Boolean}</td>
  74 <td>Controls if mouse events from extra buttons are to be generated or not</td>
  75 </tr>

  76 </table>
  77 
  78 <h2>Desktop Font Rendering Hints</h2>
  79 <b>Desktop Property: <a id="awt.font.desktophints">"awt.font.desktophints"</A></b>
  80 <p>
  81 Modern desktops support various forms of text antialiasing (font smoothing).
  82 <p>
  83 These are applied by platform-specific heavyweight components.
  84 However an application may want to render text using the same text
  85 antialiasing on a drawing surface or lightweight (non-platform) component using
  86 <a href="../Graphics2D.html"> <code>Graphics2D</code></a> methods.
  87 This is particularly important when creating
  88 <a href="../../../javax/swing/JComponent.html"> Swing components</a> which
  89 are required to appear consistent with native desktop components or other
  90 Swing components.
  91 
  92 <h3>Basic Usage</h3>
  93 The standard desktop property named
  94 <b>"awt.font.desktophints"</b>
  95 can be used to obtain the rendering hints that best match the desktop settings.


   1 <!doctype html>
   2 <html lang="en">
   3 <head>
   4   <meta charset="utf-8"/>
   5   <title>AWT Desktop Properties</title>
   6   <style type="text/css">tbody th {font-weight:normal;text-align:left}</style>
   7 </head>
   8 <!--
   9  Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
  10  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  11 
  12  This code is free software; you can redistribute it and/or modify it
  13  under the terms of the GNU General Public License version 2 only, as
  14  published by the Free Software Foundation.  Oracle designates this
  15  particular file as subject to the "Classpath" exception as provided
  16  by Oracle in the LICENSE file that accompanied this code.
  17 
  18  This code is distributed in the hope that it will be useful, but WITHOUT
  19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  20  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  21  version 2 for more details (a copy is included in the LICENSE file that
  22  accompanied this code).
  23 
  24  You should have received a copy of the GNU General Public License version
  25  2 along with this work; if not, write to the Free Software Foundation,
  26  Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  27 
  28  Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  29  or visit www.oracle.com if you need additional information or have any


  41 <p>
  42 Each desktop property is named by a unique string, which
  43 is the "name" of that property.
  44 <p>
  45 Desktop properties supported by the AWT but not documented
  46 elsewhere - typically because there is no suitable
  47 method or class - are documented here.
  48 <p>
  49 Desktop properties documented elsewhere are those which are
  50 tightly coupled with a method or class which documents them.
  51 <p>
  52 Since desktop properties abstract an underlying platform
  53 setting, they may not be available in environments that do
  54 not support them. In the event that a desktop property is
  55 unavailable for any reason, the implementation will return
  56 <code>null</code>.
  57 <p>
  58 The following table summarizes the desktop properties documented
  59 here, and their value types.
  60 <br><br>
  61 <table border=1>
  62 <thead>
  63 <tr>
  64 <th scope="col">Property Name</th>
  65 <th scope="col">Value Type</th>
  66 <th scope="col">Summary Description</th>
  67 </tr>
  68 </thead>
  69 <tbody>
  70 <tr>
  71 <th scope="row"><A href="#awt.font.desktophints">awt.font.desktophints</A></th>
  72 <td>{@link java.util.Map java.util.Map}</td>
  73 <td>Font smoothing (text antialiasing) settings.</td>
  74 </tr>
  75 <tr>
  76 <th scope="row"><A href="#sun.awt.enableExtraMouseButtons">sun.awt.enableExtraMouseButtons</A></th>
  77 <td>{@link java.lang.Boolean java.lang.Boolean}</td>
  78 <td>Controls if mouse events from extra buttons are to be generated or not</td>
  79 </tr>
  80 </tbody>
  81 </table>
  82 
  83 <h2>Desktop Font Rendering Hints</h2>
  84 <b>Desktop Property: <a id="awt.font.desktophints">"awt.font.desktophints"</A></b>
  85 <p>
  86 Modern desktops support various forms of text antialiasing (font smoothing).
  87 <p>
  88 These are applied by platform-specific heavyweight components.
  89 However an application may want to render text using the same text
  90 antialiasing on a drawing surface or lightweight (non-platform) component using
  91 <a href="../Graphics2D.html"> <code>Graphics2D</code></a> methods.
  92 This is particularly important when creating
  93 <a href="../../../javax/swing/JComponent.html"> Swing components</a> which
  94 are required to appear consistent with native desktop components or other
  95 Swing components.
  96 
  97 <h3>Basic Usage</h3>
  98 The standard desktop property named
  99 <b>"awt.font.desktophints"</b>
 100 can be used to obtain the rendering hints that best match the desktop settings.


< prev index next >