use of net.infonode.docking.TabWindow in project freeplane by freeplane.
the class MapViewDockingWindows method addDockedView.
private void addDockedView(View oldSelected, View newView) {
DockingWindow lastFocusedChildWindow = oldSelected != null ? oldSelected : getLastFocusedChildWindow(rootWindow);
if (lastFocusedChildWindow == null) {
DockingUtil.addWindow(newView, rootWindow);
} else {
Container parent = SwingUtilities.getAncestorOfClass(DockingWindow.class, lastFocusedChildWindow);
if (parent instanceof TabWindow) {
final TabWindow tabWindow = (TabWindow) parent;
tabWindow.addTab(newView, tabWindow.getChildWindowIndex(lastFocusedChildWindow) + 1);
} else
DockingUtil.addWindow(newView, lastFocusedChildWindow.getRootWindow());
}
}
Aggregations