## com.sun.jna.platform
Class WindowUtils.NativeWindowUtils

    java.lang.Object
      com.sun.jna.platform.WindowUtils.NativeWindowUtils

Enclosing class:
  WindowUtils

    public abstract static class WindowUtils.NativeWindowUtils

extends java.lang.Object

Window utilities with differing native implementations.

Nested Class Summary
`protected class` `WindowUtils.NativeWindowUtils.TransparentContentPane`

Constructor Summary
`WindowUtils.NativeWindowUtils()`

Method Summary
`java.awt.GraphicsConfiguration` `getAlphaCompatibleGraphicsConfiguration()` Return the default graphics configuration.
`protected java.awt.Window` `getWindow(java.awt.Component c)`
`boolean` `isWindowAlphaSupported()` Default: no support.
`protected void` `setDoubleBuffered(java.awt.Component root, boolean buffered)`
`protected void` `setForceHeavyweightPopups(java.awt.Window w, boolean force)` Use this method to ensure heavyweight popups are used in conjunction with a given window.
`protected void` `setLayersTransparent(java.awt.Window w, boolean transparent)`
`protected void` `setMask(java.awt.Component c, java.awt.image.Raster raster)` Override this method to provide bitmap masking of the given heavyweight component.
`void` `setWindowAlpha(java.awt.Window w, float alpha)` Set the overall alpha transparency of the window.
`void` `setWindowMask(java.awt.Component w, javax.swing.Icon mask)` Set the window mask based on an Icon.
`protected void` `setWindowMask(java.awt.Component w, java.awt.image.Raster raster)` Set the window mask based on the given Raster, which should be treated as a bitmap (zero/nonzero values only).
`void` `setWindowMask(java.awt.Component w, java.awt.Shape mask)` Set the window mask based on a `Shape`.
`void` `setWindowTransparent(java.awt.Window w, boolean transparent)` Set the window to be transparent.
`protected java.awt.image.Raster` `toRaster(java.awt.Component c, javax.swing.Icon mask)`
`protected java.awt.image.Raster` `toRaster(java.awt.Shape mask)`
`protected java.awt.Shape` `toShape(java.awt.image.Raster raster)`
`protected void` `whenDisplayable(java.awt.Component w, java.lang.Runnable action)` Execute the given action when the given window becomes displayable.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### WindowUtils.NativeWindowUtils

    public WindowUtils.NativeWindowUtils()

Method Detail

### getWindow

    protected java.awt.Window getWindow(java.awt.Component c)

### whenDisplayable

    protected void whenDisplayable(java.awt.Component w,
                                   java.lang.Runnable action)

  Execute the given action when the given window becomes displayable.

### toRaster

    protected java.awt.image.Raster toRaster(java.awt.Shape mask)

### toRaster

    protected java.awt.image.Raster toRaster(java.awt.Component c,
                                             javax.swing.Icon mask)

### toShape

    protected java.awt.Shape toShape(java.awt.image.Raster raster)

### setWindowAlpha

    public void setWindowAlpha(java.awt.Window w,
                               float alpha)

  Set the overall alpha transparency of the window. An alpha of 1.0 is fully opaque, 0.0 is fully transparent.

### isWindowAlphaSupported

    public boolean isWindowAlphaSupported()

  Default: no support.

### getAlphaCompatibleGraphicsConfiguration

    public java.awt.GraphicsConfiguration getAlphaCompatibleGraphicsConfiguration()

  Return the default graphics configuration.

### setWindowTransparent

    public void setWindowTransparent(java.awt.Window w,
                                     boolean transparent)

  Set the window to be transparent. Only explicitly painted pixels will be non-transparent. All pixels will be composited with whatever is under the window using their alpha values.

### setDoubleBuffered

    protected void setDoubleBuffered(java.awt.Component root,
                                     boolean buffered)

### setLayersTransparent

    protected void setLayersTransparent(java.awt.Window w,
                                        boolean transparent)

### setMask

    protected void setMask(java.awt.Component c,
                           java.awt.image.Raster raster)

  Override this method to provide bitmap masking of the given heavyweight component.

### setWindowMask

    protected void setWindowMask(java.awt.Component w,
                                 java.awt.image.Raster raster)

  Set the window mask based on the given Raster, which should be treated as a bitmap (zero/nonzero values only). A value of `null` means to remove the mask.

### setWindowMask

    public void setWindowMask(java.awt.Component w,
                              java.awt.Shape mask)

  Set the window mask based on a `Shape`.

### setWindowMask

    public void setWindowMask(java.awt.Component w,
                              javax.swing.Icon mask)

  Set the window mask based on an Icon. All non-transparent pixels will be included in the mask.

### setForceHeavyweightPopups

    protected void setForceHeavyweightPopups(java.awt.Window w,
                                             boolean force)

  Use this method to ensure heavyweight popups are used in conjunction with a given window. This prevents the window's alpha setting or mask region from being applied to the popup.