com.jniwrapper.win32.ui
Class WindowTools

java.lang.Object
  extended bycom.jniwrapper.win32.ui.WindowTools

public class WindowTools
extends java.lang.Object

This class contains utility functions for accessing native windowing system data. Functions use JAWT or internal implementation (sun.*) classes as appropriate.


Method Summary
static java.awt.Component getComponentFromHandle(int handle)
          Retrurns an AWT component that corresponds to a given native handle.
static long getWindowHandle(java.awt.Component component)
          Returns a native window handle of the given component.
static long getWindowHandle(java.awt.Component component, boolean runInCurrentThread)
          Returns a native window handle of the given component.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getWindowHandle

public static long getWindowHandle(java.awt.Component component,
                                   boolean runInCurrentThread)
Returns a native window handle of the given component. If the passed component doesn't have a native window, attempts to locate the nearest parent that does.

Parameters:
component - the component to get the native window handle for.
Returns:
handle of the native window for the given component tree, or zero if not found.

getWindowHandle

public static long getWindowHandle(java.awt.Component component)
Returns a native window handle of the given component. If the passed component doesn't have a native window, attempts to locate the nearest parent that does.

Parameters:
component - the component to get the native window handle for.
Returns:
handle of the native window for the given component tree, or zero if not found.

getComponentFromHandle

public static java.awt.Component getComponentFromHandle(int handle)
Retrurns an AWT component that corresponds to a given native handle.