Class WindowManagerWrapper
- java.lang.Object
-
- net.sf.jguiraffe.gui.builder.window.WindowManagerWrapper
-
- All Implemented Interfaces:
WindowManager
public abstract class WindowManagerWrapper extends Object implements WindowManager
A base class for wrapper implementations of the
WindowManagerinterface.An instance of this class is initialized with a reference to a
WindowManagerobject. All methods simply delegate to this object.This class is especially useful if a custom implementation of
WindowManageris to be created based on an existing implementation. Then only the methods to be customized have to be implemented. All other methods can still delegate to the existing implementation.- Version:
- $Id: WindowManagerWrapper.java 205 2012-01-29 18:29:57Z oheger $
- Author:
- Oliver Heger
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedWindowManagerWrapper(WindowManager wrapped)Creates a new instance ofWindowManagerWrapperand initializes it with the wrappedWindowManager.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description WindowcreateDialog(WindowBuilderData builderData, WindowData data, boolean modal, Window wnd)Creates a modal or non modal dialog.WindowcreateFrame(WindowBuilderData builderData, WindowData data, Window wnd)Creates a frame window (a main frame).WindowcreateInternalFrame(WindowBuilderData builderData, WindowData data, Window wnd)Creates an internal frame window.WindowManagergetWrappedWindowManager()Returns a reference to the wrappedWindowManager.
-
-
-
Constructor Detail
-
WindowManagerWrapper
protected WindowManagerWrapper(WindowManager wrapped)
Creates a new instance ofWindowManagerWrapperand initializes it with the wrappedWindowManager. Note: This method does not check whether the passed inWindowManagerobject is null because we do not want to enforce this restriction on all subclasses. The passed in wrapped window manager is stored in an internal field and can be accessed using thegetWrappedWindowManager()method. If a subclass needs another mechanism to access the wrapped manager, it has to override thegetWrappedWindowManager()method.- Parameters:
wrapped- the wrappedWindowManager
-
-
Method Detail
-
getWrappedWindowManager
public WindowManager getWrappedWindowManager()
Returns a reference to the wrappedWindowManager.- Returns:
- the wrapped
WindowManager
-
createFrame
public Window createFrame(WindowBuilderData builderData, WindowData data, Window wnd) throws WindowBuilderException
Creates a frame window (a main frame). Just delegates to the wrappedWindowManagerobject.- Specified by:
createFramein interfaceWindowManager- Parameters:
builderData- the builder data objectdata- the data defining the window to createwnd- 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
public Window createInternalFrame(WindowBuilderData builderData, WindowData data, Window wnd) throws WindowBuilderException
Creates an internal frame window. Just delegates to the wrappedWindowManagerobject.- Specified by:
createInternalFramein interfaceWindowManager- Parameters:
builderData- the builder data objectdata- the data defining the window to createwnd- 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
public Window createDialog(WindowBuilderData builderData, WindowData data, boolean modal, Window wnd) throws WindowBuilderException
Creates a modal or non modal dialog. Just delegates to the wrappedWindowManagerobject.- Specified by:
createDialogin interfaceWindowManager- Parameters:
builderData- the builder data objectdata- the data defining the window to createmodal- the modal flagwnd- 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
-
-