static private View getContainingDockedWindow(final Component pNewMap) {
return (View) SwingUtilities.getAncestorOfClass(View.class, pNewMap);
}
protected void addDockedView(View dynamicView) {
DockingWindow lastFocusedChildWindow = getLastFocusedChildWindow(rootWindow);
if(lastFocusedChildWindow == null) {
DockingUtil.addWindow(dynamicView, rootWindow);
}
else{
Container parent = SwingUtilities.getAncestorOfClass(DockingWindow.class, lastFocusedChildWindow);
if(parent instanceof TabWindow)
((TabWindow)parent).addTab(dynamicView);
else
DockingUtil.addWindow(dynamicView, lastFocusedChildWindow.getRootWindow());
}
}