use of org.freeplane.features.mapio.mindmapmode.MMapIO in project freeplane by freeplane.
the class ControllerProxy method newMapFromTemplate.
public Map newMapFromTemplate(File templateFile) {
final MapModel oldMap = Controller.getCurrentController().getMap();
final MMapIO mapIO = (MMapIO) Controller.getCurrentModeController().getExtension(MapIO.class);
final MapModel newMap = mapIO.newMapFromTemplate(templateFile);
restartTransaction(oldMap, newMap);
return new MapProxy(newMap, scriptContext);
}
use of org.freeplane.features.mapio.mindmapmode.MMapIO in project freeplane by freeplane.
the class ControllerProxy method newMap.
public Map newMap() {
final MapModel oldMap = Controller.getCurrentController().getMap();
final MMapIO mapIO = (MMapIO) Controller.getCurrentModeController().getExtension(MapIO.class);
final MapModel newMap = mapIO.newMapFromDefaultTemplate();
restartTransaction(oldMap, newMap);
return new MapProxy(newMap, scriptContext);
}