use of net.infonode.docking.View in project freeplane by freeplane.
the class MapViewSerializer method newViewToBeRemoved.
private View newViewToBeRemoved() {
View view = new View("", null, new JPanel());
viewsToBeRemoved.add(view);
return view;
}
use of net.infonode.docking.View in project freeplane by freeplane.
the class MapViewDockingWindows method afterViewChange.
public void afterViewChange(final Component pOldMap, final Component pNewMap) {
if (pNewMap == null) {
return;
}
if (!loadingLayoutFromObjectInpusStream) {
for (int i = 0; i < mapViews.size(); ++i) {
if (mapViews.get(i) == pNewMap) {
View dockedView = getContainingDockedWindow(pNewMap);
if (dockedView.isMinimized())
dockedView.restore();
else
dockedView.restoreFocus();
focusMapViewLater((MapView) pNewMap);
return;
}
}
addDockedWindow(pNewMap);
} else if (mapViews.contains(pNewMap))
return;
mapViews.add(pNewMap);
}
use of net.infonode.docking.View 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);
}
}
}
use of net.infonode.docking.View in project freeplane by freeplane.
the class MapViewSerializer method newDockedView.
protected View newDockedView(final Component pNewMap, final String title) {
if (pNewMap.getParent() != null)
return null;
MapViewScrollPane mapViewScrollPane = new MapViewScrollPane();
mapViewScrollPane.getViewport().setView(pNewMap);
@SuppressWarnings("serial") final View viewFrame = new ConnectedToMenuView(title, null, mapViewScrollPane);
return viewFrame;
}
use of net.infonode.docking.View in project freeplane by freeplane.
the class MapViewDockingWindows method setTitle.
public void setTitle() {
if (loadingLayoutFromObjectInpusStream)
return;
for (Component mapViewComponent : mapViews) {
if (mapViewComponent instanceof MapView) {
MapView mapView = (MapView) mapViewComponent;
String name = mapView.getName();
String title;
if (mapView.getModel().isSaved())
title = name;
else
title = name + " *";
View containingDockedWindow = getContainingDockedWindow(mapViewComponent);
containingDockedWindow.getViewProperties().setTitle(title);
}
}
}
Aggregations