public abstract class WindowManagerWrapper extends Object implements WindowManager
A base class for wrapper implementations of the WindowManager
interface.
An instance of this class is initialized with a reference to a
WindowManager
object. All methods simply delegate to this object.
This class is especially useful if a custom implementation of
WindowManager
is 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.
Modifier | Constructor and Description |
---|---|
protected |
WindowManagerWrapper(WindowManager wrapped)
Creates a new instance of
WindowManagerWrapper and initializes it
with the wrapped WindowManager . |
Modifier and Type | Method and Description |
---|---|
Window |
createDialog(WindowBuilderData builderData,
WindowData data,
boolean modal,
Window wnd)
Creates a modal or non modal dialog.
|
Window |
createFrame(WindowBuilderData builderData,
WindowData data,
Window wnd)
Creates a frame window (a main frame).
|
Window |
createInternalFrame(WindowBuilderData builderData,
WindowData data,
Window wnd)
Creates an internal frame window.
|
WindowManager |
getWrappedWindowManager()
Returns a reference to the wrapped
WindowManager . |
protected WindowManagerWrapper(WindowManager wrapped)
WindowManagerWrapper
and initializes it
with the wrapped WindowManager
. Note: This method does not check
whether the passed in WindowManager
object 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 the getWrappedWindowManager()
method. If a
subclass needs another mechanism to access the wrapped manager, it has to
override the getWrappedWindowManager()
method.wrapped
- the wrapped WindowManager
public WindowManager getWrappedWindowManager()
WindowManager
.WindowManager
public Window createFrame(WindowBuilderData builderData, WindowData data, Window wnd) throws WindowBuilderException
WindowManager
object.createFrame
in interface WindowManager
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 initializedWindowBuilderException
- if an error occurspublic Window createInternalFrame(WindowBuilderData builderData, WindowData data, Window wnd) throws WindowBuilderException
WindowManager
object.createInternalFrame
in interface WindowManager
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 initializedWindowBuilderException
- if an error occurspublic Window createDialog(WindowBuilderData builderData, WindowData data, boolean modal, Window wnd) throws WindowBuilderException
WindowManager
object.createDialog
in interface WindowManager
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 initializedWindowBuilderException
- if an error occursCopyright © 2016 The JGUIraffe Team. All rights reserved.