Interface WindowManager

  • All Known Implementing Classes:
    WindowManagerWrapper

    public interface WindowManager

    Definition of an interface for platform (or GUI library) specific window manager implementations.

    Analogous to other builder components the window builder uses an interface for executing platform specific operations or creating specific objects (in this case windows). Each supported platform (like Swing or SWT) must provide an implementation of this interface hiding the specifics of this platform.

    The methods defined by this interface in the first line deal with the creation of several window types. Creating a window is a two step process: First the object representing the window is created. In the second step it is initialized. Both steps are performed by the same methods that can check their arguments to determine whether they are in the creation or the initialization phase.

    Note: This interface is not intended to be directly implemented by client code. It is subject to change even in minor releases as new features are made available. Therefore if an application needs to provide a custom implementation of this interface, it should extend an existing implementation. For instance, the WindowManagerWrapper class is a good candidate if only a subset of methods is to be modified.

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

      • createFrame

        Window createFrame​(WindowBuilderData builderData,
                           WindowData data,
                           Window wnd)
                    throws WindowBuilderException
        Creates a frame window (a main frame).
        Parameters:
        builderData - the builder data object
        data - the data defining the window to create
        wnd - the window object; if null, a new window is to be created; otherwise this window object must be initialized
        Returns:
        the new window
        Throws:
        WindowBuilderException - if an error occurs
      • createInternalFrame

        Window createInternalFrame​(WindowBuilderData builderData,
                                   WindowData data,
                                   Window wnd)
                            throws WindowBuilderException
        Creates an internal frame window.
        Parameters:
        builderData - the builder data object
        data - the data defining the window to create
        wnd - the window object; if null, a new window is to be created; otherwise this window object must be initialized
        Returns:
        the new window
        Throws:
        WindowBuilderException - if an error occurs
      • createDialog

        Window createDialog​(WindowBuilderData builderData,
                            WindowData data,
                            boolean modal,
                            Window wnd)
                     throws WindowBuilderException
        Creates a modal or non modal dialog.
        Parameters:
        builderData - the builder data object
        data - the data defining the window to create
        modal - the modal flag
        wnd - the window object; if null, a new window is to be created; otherwise this window object must be initialized
        Returns:
        the new window
        Throws:
        WindowBuilderException - if an error occurs