Package net.infonode.docking.util
Class DockingUtil
- java.lang.Object
-
- net.infonode.docking.util.DockingUtil
-
public final class DockingUtil extends java.lang.Object
Class that contains utility methods for docking windows.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
addWindow(DockingWindow window, RootWindow rootWindow)
Adds a window inside a root window.static RootWindow
createHeavyweightSupportedRootWindow(AbstractViewMap views, boolean createWindowPopupMenu)
Creates a root window with support for view serialization, popup menues and support for heavy weight components inside the views.static RootWindow
createHeavyweightSupportedRootWindow(AbstractViewMap views, ViewSerializer viewSerializer, boolean createWindowPopupMenu)
Creates a root window with support for view serialization, popup menues and support for heavyweight components inside the views.static RootWindow
createRootWindow(AbstractViewMap views, boolean createWindowPopupMenu)
Creates a root window with support for view serialization and popup menues.static RootWindow
createRootWindow(AbstractViewMap views, ViewSerializer viewSerializer, boolean createWindowPopupMenu)
Creates a root window with support for view serialization and popup menues.static FloatingWindow
getFloatingWindowFor(DockingWindow window)
Returns theFloatingWindow
for a window if the window is undocked.static TabWindow
getTabWindowFor(DockingWindow window)
Returns theTabWindow
for a window.static boolean
isAncestor(DockingWindow ancestor, DockingWindow child)
Returns true if ancestor is an ancestor of child or the windows are the same.
-
-
-
Method Detail
-
createRootWindow
public static RootWindow createRootWindow(AbstractViewMap views, boolean createWindowPopupMenu)
Creates a root window with support for view serialization and popup menues. All the views are added to a tab window which is placed in the root window.- Parameters:
views
- the views that can be shown inside the root windowcreateWindowPopupMenu
- true if a standard window popup menu should be created- Returns:
- the created root window
-
createHeavyweightSupportedRootWindow
public static RootWindow createHeavyweightSupportedRootWindow(AbstractViewMap views, boolean createWindowPopupMenu)
Creates a root window with support for view serialization, popup menues and support for heavy weight components inside the views.
All the views are added to a tab window which is placed in the root window.
- Parameters:
views
- the views that can be shown inside the root windowcreateWindowPopupMenu
- true if a standard window popup menu should be created- Returns:
- the created root window
- Since:
- IDW 1.4.0
-
createRootWindow
public static RootWindow createRootWindow(AbstractViewMap views, ViewSerializer viewSerializer, boolean createWindowPopupMenu)
Creates a root window with support for view serialization and popup menues. All the views are added to a tab window which is placed in the root window.- Parameters:
views
- contains all the static viewsviewSerializer
- the view serializer used in the createdRootWindow
createWindowPopupMenu
- true if a standard window popup menu should be created- Returns:
- the created root window
-
createHeavyweightSupportedRootWindow
public static RootWindow createHeavyweightSupportedRootWindow(AbstractViewMap views, ViewSerializer viewSerializer, boolean createWindowPopupMenu)
Creates a root window with support for view serialization, popup menues and support for heavyweight components inside the views.
All the views are added to a tab window which is placed in the root window.
- Parameters:
views
- contains all the static viewsviewSerializer
- the view serializer used in the createdRootWindow
createWindowPopupMenu
- true if a standard window popup menu should be created- Returns:
- the created root window
- Since:
- IDW 1.4.0
-
isAncestor
public static boolean isAncestor(DockingWindow ancestor, DockingWindow child)
Returns true if ancestor is an ancestor of child or the windows are the same.- Parameters:
ancestor
- the ancestor windowchild
- the child window- Returns:
- true if ancestor is an ancestor of child or the windows are the same
-
addWindow
public static void addWindow(DockingWindow window, RootWindow rootWindow)
Adds a window inside a root window. The following methods are tried in order:
- If the window already is added inside the root window nothing happens.
- The window is restored to it's last location if that location is inside the root window.
- The window is added inside the root window.
- Parameters:
window
- the window to addrootWindow
- the root window in which to add it- Since:
- IDW 1.1.0
-
getTabWindowFor
public static TabWindow getTabWindowFor(DockingWindow window)
Returns theTabWindow
for a window. This is either the window itself or the parent window.- Parameters:
window
- the window- Returns:
- the
TabWindow
for the window - Since:
- IDW 1.3.0
-
getFloatingWindowFor
public static FloatingWindow getFloatingWindowFor(DockingWindow window)
Returns theFloatingWindow
for a window if the window is undocked.- Parameters:
window
- the window- Returns:
- the
FloatingWindow
for the window or null if the window is not undocked - Since:
- IDW 1.4.0
-
-