Search in sources :

Example 1 with Map

use of org.freeplane.plugin.script.proxy.Proxy.Map in project freeplane by freeplane.

the class ControllerProxy method getOpenMaps.

public List<Map> getOpenMaps() {
    Collection<MapModel> mapModels = getMapViewManager().getMaps().values();
    ArrayList<Map> mapProxies = new ArrayList<Map>(mapModels.size());
    for (MapModel mapModel : mapModels) {
        mapProxies.add(new MapProxy(mapModel, scriptContext));
    }
    return mapProxies;
}
Also used : ArrayList(java.util.ArrayList) MMapModel(org.freeplane.features.map.mindmapmode.MMapModel) MapModel(org.freeplane.features.map.MapModel) Map(org.freeplane.plugin.script.proxy.Proxy.Map)

Example 2 with Map

use of org.freeplane.plugin.script.proxy.Proxy.Map in project freeplane by freeplane.

the class ScriptApiTest method test_Map_close.

public void test_Map_close() {
    Map originalMap = node.getMap();
    map = c.newMap();
    map.getRoot().createChild("child 1");
    assertFalse("a new map should have been opened", originalMap.equals(map));
    map.close(true, false);
    assertEquals("the original map should be selected again", originalMap.getName(), c.getSelected().getMap().getName());
    // let tearDown() some work to do...
    map = c.newMap();
}
Also used : Map(org.freeplane.plugin.script.proxy.Proxy.Map)

Aggregations

Map (org.freeplane.plugin.script.proxy.Proxy.Map)2 ArrayList (java.util.ArrayList)1 MapModel (org.freeplane.features.map.MapModel)1 MMapModel (org.freeplane.features.map.mindmapmode.MMapModel)1