Interface WindowWrapper


  • public interface WindowWrapper

    Definition of an interface for objects that wrap "real" windows.

    This interface is used to access an underlying GUI library specific window object, e.g. a JFrame in Swing. Windows created by the window builder library are objects implementing the Window interface. It is up to a concrete implementation of a window manager whether the returned objects are directly derived from a window class of the represented GUI library or if they are merely wrapper objects for those real windows. In the first case, to access the underlying window object, the Window instance can simply be casted to the base class. In the latter case, the used wrapper should implement this interface to return the underlying window.

    Those window wrapper objects can be nested at an arbitrary depth. This also supports different use cases, e.g. window interceptors.

    Version:
    $Id: WindowWrapper.java 205 2012-01-29 18:29:57Z oheger $
    Author:
    Oliver Heger
    • Method Detail

      • getWrappedWindow

        Object getWrappedWindow()
        Returns the underlying window object that is wrapped by this object. The returned object is either a real window implementation specific to a concrete GUI library or another WindowWrapper implementation.
        Returns:
        the wrapped window object