use of net.infonode.docking.DockingWindow 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());
}
}
use of net.infonode.docking.DockingWindow in project freeplane by freeplane.
the class MapViewDockingWindows method setTabAreaInvisiblePolicy.
public void setTabAreaInvisiblePolicy(JFrame frame) {
DockingWindow window = (DockingWindow) (JOptionPane.getFrameForComponent(rootWindow) == frame ? rootWindow : frame.getContentPane().getComponent(0));
setTabAreaInvisiblePolicies(window);
}
use of net.infonode.docking.DockingWindow in project freeplane by freeplane.
the class MapViewDockingWindows method setTabAreaVisiblePolicy.
public void setTabAreaVisiblePolicy(JFrame frame) {
DockingWindow window = (DockingWindow) (JOptionPane.getFrameForComponent(rootWindow) == frame ? rootWindow : frame.getContentPane().getComponent(0));
setTabAreaVisiblePolicies(window);
}
use of net.infonode.docking.DockingWindow in project freeplane by freeplane.
the class MapViewDockingWindows method selectMap.
private void selectMap(final int tabIndexChange) {
final Controller controller = Controller.getCurrentController();
MapView mapView = (MapView) controller.getMapViewManager().getMapViewComponent();
if (mapView != null) {
AbstractTabWindow tabWindow = (AbstractTabWindow) SwingUtilities.getAncestorOfClass(AbstractTabWindow.class, mapView);
if (tabWindow != null) {
final DockingWindow selectedWindow = tabWindow.getSelectedWindow();
final int childWindowIndex = tabWindow.getChildWindowIndex(selectedWindow);
final int childWindowCount = tabWindow.getChildWindowCount();
final int nextWindowIndex = (childWindowIndex + childWindowCount + tabIndexChange) % childWindowCount;
final View nextWindow = (View) tabWindow.getChildWindow(nextWindowIndex);
final Component nextMapView = getContainedMapView(nextWindow);
Controller.getCurrentController().getMapViewManager().changeToMapView(nextMapView);
}
}
}
Aggregations