Most of these properties accept a Boolean value.
If they accept a different value, that is noted. You can call them
from the command line with the -D
flag
to java
or in your code with System.setProperty
.
For example, you could set your Swing application to use the Mac
OS X menu bar with either
java -Dapple.laf.useScreenMenuBar="true" yourApplication |
or
System.setProperty("apple.laf.useScreenMenuBar", "true"); |
Integration With the Native Application Environment
Rendering Hints
Full Screen Java
Graphics Drawing Performance
Pixel Conversion Performance
Rendering Performance
Window Positioning
apple.laf.useScreenMenuBar
If you are using the Aqua look and feel, this property puts Swing menus in the Mac OS X menu bar. Note that JMenuBars in JDialogs are not moved to the Mac OS X menu bar.
The default
value is false
. Java
applications created with Xcode have this property set to true
.
apple.awt.brushMetalLook
Allows you to display your main windows with the “textured” Aqua window appearance. This property should be applied only to the primary application window, and should not affect supporting windows like dialogs or preference windows.
The default value
is false
.
apple.awt.fileDialogForDirectories
By default, the AWT File Dialog lets you choose a file. Under certain circumstances, however, it may be proper for you to choose a directory instead. If that is the case, set this property to allow for directory selection in a file dialog.
The default
value is false
.
apple.awt.showGrowBox
Most native Mac OS X windows have a resize control in the bottom-right corner. By default, Java application windows that use the Aqua look and feel show this control, but there may be circumstances where you want it to be hidden. This property is used to decide if the grow box is shown or not.
The default value is true
.
apple.awt.antialiasing
Causes graphic primitives like line, arc, rectangle,
and so on, to be painted with antialiasing. By default, text also
takes this setting, though you can override it using apple.awt.textantialiasing
.
Even with this property set to on
from
the command line, you may still set the KEY_ANTIALISING
rendering hint
for specific objects.
This option accepts either on
or off
for
its value. Although this property is off
by
default, it is set to on
when
you use the Aqua look and feel. This makes the behavior more consistent
with the native Mac OS X user interface. Note that even if you set
this to off
for an application
that uses the Aqua look and feel, Aqua user interface elements themselves
are still drawn with antialiasing.
apple.awt.textantialiasing
Sets the KEY_TEXT_ANTIALIASING
rendering
hint. Although this property inherits the same setting as apple.awt.antialiasing
,
you can override that setting explicitly.
This option accepts
either on
or off
for
its value. The default value is off
unless
you are using the Aqua look and feel.
apple.awt.rendering
Determines whether Graphics2D objects prioritize speed
or quality. This option accepts either speed
or quality
for
its value. It sets the KEY_RENDERING
hint
so that it accepts either VALUE_RENDER_SPEED
or VALUE_RENDER_QUALITY
as
an argument.
apple.awt.interpolation
Sets the KEY_INTERPOLATION
rendering
hint to determine which algorithm is used in image transformations.
This option accepts either nearestneighbor
, bilinear
,
or bicubic
for its value.
Setting this option passes VALUE_INTERPOLATION_NEAREST_NEIGHBOR
, VALUE_INTERPOLATION_BILINEAR
,
or VALUE_INTERPOLATION_BICUBIC
,
respectively, to KEY_INTERPOLATION
.
apple.awt.fractionalmetrics
Sets the KEY_FRACTIONALMETRICS
to
use floating point font metrics instead of the default integer metrics.
Options include on
and off
to
set VALUE_FRACTIONALMETRICS_ON or VALUE_FRACTIONALMETRICS_OFF.
apple.awt.fakefullscreen
Causes full screen applications to be displayed in a window. You might want to use this property during development of full screen Java applications.
The default value is false
.
apple.awt.fullscreencapturealldisplays
When you have multiple displays, entering full-screen
mode normally darkens the secondary screens. Setting this property
to false
overrides the default
behavior and secondary screens are not darkened. You might want
to override the default behavior for development purposes like debugging.
The
default value is true
.
apple.awt.fullscreenhidecursor
Hides the mouse cursor when in full-screen mode.
The
default value is true
.
apple.awt.fullscreenusefade
If you change the screen resolution when entering full-screen mode, the screen transitions by fading out of the old resolution and back in with the new resolution. If you do not change screen resolution, you normally do not see this fade effect. This property enables that fade effect regardless of whether you have changed the screen resolution.
The default value is false
.
apple.awt.graphics.OptimizeShapes
By default, Java in Mac OS X tries to use graphics primitives
in place of the relatively more complex shape objects if there is
an appropriate mapping. For example, a call to draw a simple shapes
like draw(new Rectangle2D.Float(0, 0, 10, 10)
is
mapped to drawRect(0, 0, 10, 10)
.
If you do not want this automatic optimization, set this value to false
.
The
default value is true
.
apple.awt.graphics.EnableLazyDrawing
By default, drawing actions for graphics primitives
are queued before being sent to the renderer. This keeps the renderer
primed and improves the graphics performance for rendering simple
primitives like lines, rectangles, arcs, and ovals. This is referred
to as lazy drawing. You may disable lazy drawing by setting this
value to false
.
The
default value is true
.
apple.awt.graphics.EnableLazyDrawingQueueSize
If lazy drawing optimization is enabled, this option sets the size of the queue used. This property takes an integer value which represents the number of graphics primitives cached. Each graphics primitive requires about 10 entries. Each entry requires 4 bytes (1 entry = 4 bytes).
The default value is t
.
apple.awt.graphics.EnableQ2DX
Quartz 2D acceleration is a feature included in Mac OS X v.10.4 for development purposes. It uses hardware acceleration to speed up rendering of simple primitives like images, lines, rects, and simple characters. In addition to using this flag, you need to enable Quartz 2D acceleration in the Quartz Debug application, included with the Xcode Developer Tools for Mac OS X v.10.4.
This is strictly a developer option. Java applications intended for use on Mac OS X v.10.4 should not rely on the presence of Quartz 2D acceleration.
The default value is false
.
apple.awt.graphics.EnableDeferredUpdates
Mac OS X v.10.4 uses deferred drawing updates, which eliminates visual tearing, but blocks those applications that flush too often. Deferred drawing updates are not supported for Java applications. If you want to enable deferred drawing throughout your application, use this system property.
This is strictly a developer option. Java applications intended for use on Mac OS X v.10.4 should not rely on deferred drawing updates.
The default value
is false
.
apple.awt.graphics.EnableLazyPixelConversion
By default, the Java implementation in Mac OS X optimizes pixel conversion for image formats that are not natively supported by the underlying operating system. Image formats that are not supported natively by Core Graphics include:
TYPE_3BYTE_BGR
TYPE_4BYTE_ABGR
TYPE_4BYTE_ABGR_PRE
TYPE_BYTE_BINARY
TYPE_BYTE_INDEXED
TYPE_CUSTOM
TYPE_INT_ARGB
TYPE_INT_BGR
TYPE_USHORT_565_RGB
TYPE_USHORT_GRAY
You may override
the default behavior by setting this property to false
.
The
default value is true
.
apple.awt.graphics.UseTwoImageLazyPixelConversion
Optimize pixel conversion of BufferedImage.TYPE_INT_ARGB images by using either Java or native based pixels as needed. (This is only used when the image is the source.)
The default value
is true
.
The following properties all allow you to turn off specific
aspects of rendering. These are useful if you are debugging performance
issues and need to pinpoint where a particular performance issue
is occurring in your code. The default setting for all of them is true
, where
the indicated item is rendered. Setting any of these properties
to false
will cause that
particular item not to be rendered.
For example, if you notice a significant slowdown in your
program and suspect that it might be occurring when you the renderer
is filling rectangles, you could pass in apple.awt.graphics.RenderFillRect=false
and
note whether that significantly speeds up the performance of your
code.
apple.awt.graphics.RenderLine
Determines whether lines are rendered.
The default
value is true
.
apple.awt.graphics.RenderDrawRect
Determines whether rectangles are drawn by the renderer.
The
default value is true
.
apple.awt.graphics.RenderFillRect
Determines whether rectangles are filled by the renderer.
The
default value is true
.
apple.awt.graphics.RenderDrawRoundRect
Determines whether round rectangles are drawn by the renderer.
The default value is true
.
apple.awt.graphics.RenderFillRoundRect
Determines whether round rectangles are filled by the renderer.
The default value is true
.
apple.awt.graphics.RenderDrawOval
Determines whether ovals are drawn by the renderer.
The
default value is true
.
apple.awt.graphics.RenderFillOval
Determines whether ovals are filled by the renderer.
The
default value is true
.
apple.awt.graphics.RenderDrawArc
Determines whether arcs are drawn by the renderer.
The
default value is true
.
apple.awt.graphics.RenderFillArc
Determines whether arcs are filled by the renderer.
The
default value is true
.
apple.awt.graphics.RenderDrawPolygon
Determines whether polygons are drawn by the renderer.
The
default value is true
.
apple.awt.graphics.RenderFillPolygon
Determines whether polygons are filled by the renderer.
The
default value is true
.
apple.awt.graphics.RenderDrawShape
Determines whether shapes are drawn by the renderer.
The
default value is true
.
apple.awt.graphics.RenderFillShape
Determines whether shapes are filled by the renderer.
The
default value is true
.
apple.awt.graphics.RenderImage
Determines whether any images are drawn by the renderer.
The
default value is true
.
apple.awt.graphics.RenderString
Determines whether strings are rendered.
The default
value is true
.
apple.awt.graphics.RenderGlyphs
Determines whether glyphs are rendered.
The default
value is true
.
apple.awt.graphics.RenderUnicodes
Determines whether Unicode text is rendered.
The
default value is true
.
apple.awt.window.position.forceSafeCreation
Enforces the creation of new windows on screen. New windows are not created offscreen where users would not be able to access them.
The default value is false
.
apple.awt.window.position.forceSafeProgrammaticPositioning
Prohibits windows from being moved programatically into
a position where users are unable to access them. The true
setting
promotes optimal interaction between the Java environment and the
native window server. Setting this property to false
may
result in unpredictable behavior in the windowing environment.
The
default value is true
.
apple.awt.window.position.forceSafeUserPositioning
Prohibits users from moving windows into a position where they would no longer be able to access them.
The default
value is false
.
© 2004, 2005 Apple Computer, Inc. All Rights Reserved. (Last updated: 2005-04-29)