JNA API 3.0

com.sun.jna.examples
Class WindowUtils.NativeWindowUtils

java.lang.Object
  extended by com.sun.jna.examples.WindowUtils.NativeWindowUtils
Enclosing class:
WindowUtils

public abstract static class WindowUtils.NativeWindowUtils
extends Object

Window utilities with differing native implementations.


Constructor Summary
WindowUtils.NativeWindowUtils()
           
 
Method Summary
 GraphicsConfiguration getAlphaCompatibleGraphicsConfiguration()
          Return the default graphics configuration.
 boolean isWindowAlphaSupported()
          Default: no support.
protected  void setForceHeavyweightPopups(Window w, boolean force)
          Use this method to ensure heavyweight popups are used in conjunction with a given window.
protected  void setLayersTransparent(Window w, boolean transparent)
           
 void setWindowAlpha(Window w, float alpha)
          Set the overall alpha transparency of the window.
 void setWindowMask(Window w, Icon mask)
          Set the window mask based on an Icon.
abstract  void setWindowMask(Window w, Raster raster)
          Set the window mask based on the given Raster, which should be treated as a bitmap (zero/nonzero values only).
 void setWindowMask(Window w, Shape mask)
          Set the window mask based on a Shape.
 void setWindowTransparent(Window w, boolean transparent)
          Set the window to be transparent.
 
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

setWindowAlpha

public void setWindowAlpha(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 GraphicsConfiguration getAlphaCompatibleGraphicsConfiguration()
Return the default graphics configuration.


setWindowTransparent

public void setWindowTransparent(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.


setLayersTransparent

protected void setLayersTransparent(Window w,
                                    boolean transparent)

setWindowMask

public abstract void setWindowMask(Window w,
                                   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(Window w,
                          Shape mask)
Set the window mask based on a Shape.


setWindowMask

public void setWindowMask(Window w,
                          Icon mask)
Set the window mask based on an Icon. All non-transparent pixels will be included in the mask.


setForceHeavyweightPopups

protected void setForceHeavyweightPopups(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.


JNA API 3.0

Copyright © 2007 Timothy Wall. All Rights Reserved.