@Override
public void windowAdded(final DockingWindow addedToWindow, final DockingWindow addedWindow) {
if(addedWindow instanceof TabWindow) {
final DockingWindowProperties windowProperties = addedWindow.getWindowProperties();
windowProperties.setDockEnabled(false);
windowProperties.setUndockEnabled(false);
final TabAreaProperties tabAreaProperties = ((TabWindow)addedWindow).getTabWindowProperties().getTabbedPanelProperties().getTabAreaProperties();
if (addedToWindow == rootWindow)
tabAreaProperties.setTabAreaVisiblePolicy(TabAreaVisiblePolicy.MORE_THAN_ONE_TAB);
else
tabAreaProperties.setTabAreaVisiblePolicy(TabAreaVisiblePolicy.ALWAYS);