Search in sources :

Example 1 with MapViewScrollPane

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;
}
Also used : MapViewScrollPane(org.freeplane.view.swing.map.MapViewScrollPane) View(net.infonode.docking.View) MapView(org.freeplane.view.swing.map.MapView)

Example 2 with MapViewScrollPane

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;
}
Also used : MapViewScrollPane(org.freeplane.view.swing.map.MapViewScrollPane) View(net.infonode.docking.View) MapView(org.freeplane.view.swing.map.MapView)

Example 3 with MapViewScrollPane

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);
        }
    }
}
Also used : JPanel(javax.swing.JPanel) BorderLayout(java.awt.BorderLayout) MapViewScrollPane(org.freeplane.view.swing.map.MapViewScrollPane) URI(java.net.URI) InvocationTargetException(java.lang.reflect.InvocationTargetException) URL(java.net.URL) MalformedURLException(java.net.MalformedURLException) InvocationTargetException(java.lang.reflect.InvocationTargetException)

Aggregations

MapViewScrollPane (org.freeplane.view.swing.map.MapViewScrollPane)3 View (net.infonode.docking.View)2 MapView (org.freeplane.view.swing.map.MapView)2 BorderLayout (java.awt.BorderLayout)1 InvocationTargetException (java.lang.reflect.InvocationTargetException)1 MalformedURLException (java.net.MalformedURLException)1 URI (java.net.URI)1 URL (java.net.URL)1 JPanel (javax.swing.JPanel)1