use of org.freeplane.view.swing.map.MapViewScrollPane 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 org.freeplane.view.swing.map.MapViewScrollPane in project freeplane by freeplane.
the class MapViewSerializer method newDockedView.
protected View newDockedView(final Component pNewMap) {
if (pNewMap.getParent() != null)
return null;
final String title = pNewMap.getName();
MapViewScrollPane mapViewScrollPane = new MapViewScrollPane();
mapViewScrollPane.getViewport().setView(pNewMap);
@SuppressWarnings("serial") final View viewFrame = new ConnectedToMenuView(title, null, mapViewScrollPane);
return viewFrame;
}
use of org.freeplane.view.swing.map.MapViewScrollPane in project freeplane by freeplane.
the class AppletViewController method init.
@Override
public void init(Controller controller) {
mapContentBox = new JPanel(new BorderLayout());
scrollPane = new MapViewScrollPane();
mapContentBox.add(scrollPane, BorderLayout.CENTER);
getContentPane().add(mapContentBox, BorderLayout.CENTER);
super.init(controller);
SwingUtilities.updateComponentTreeUI(applet);
if (!EventQueue.isDispatchThread()) {
try {
EventQueue.invokeAndWait(new Runnable() {
public void run() {
}
});
} catch (final InterruptedException e) {
LogUtils.severe(e);
} catch (final InvocationTargetException e) {
LogUtils.severe(e);
}
}
getController().selectMode(BModeController.MODENAME);
String initialMapName = ResourceController.getResourceController().getProperty("browsemode_initial_map");
if (initialMapName != null && initialMapName.startsWith(".")) {
final String locationUrl = applet.getParameter("location_href");
try {
URI uri = new URI(locationUrl).resolve(new URI(null, null, initialMapName, null));
URL documentBase = new URL(uri.getScheme(), uri.getHost(), uri.getPort(), uri.getPath());
initialMapName = documentBase.toString();
} catch (final Exception e) {
UITools.errorMessage(TextUtils.format("map_load_error", initialMapName));
System.err.println(e);
return;
}
/* end: new handling for relative urls. fc, 29.10.2003. */
}
if (initialMapName != "") {
try {
final URL mapUrl = new URL(initialMapName);
getController().getModeController().getMapController().newMap(mapUrl);
} catch (final Exception e) {
LogUtils.severe(e);
}
}
}
Aggregations