Interface Proxy.Controller
- All Superinterfaces:
- Controller,- ControllerRO,- HeadlessMapCreator,- Proxy.ControllerRO
- Enclosing interface:
- Proxy
- 
Method SummaryModifier and TypeMethodDescriptionvoidexports map to destination file, example:find(boolean withAncestors, boolean withDescendants, NodeCondition condition) Starting from this node, recursively searches for nodes for whichcondition.check(node)returns true and adds their ancestor or descendant nodes if required.find(NodeCondition condition) Starting from the root node, recursively searches for nodes (in breadth-first sequence) for whichclosure.call(node)returns true.findAll()Returns all nodes of the map in breadth-first order, that is, for the following map,Returns all nodes of the map in depth-first order, that is, for the following map,returns a list of export type descriptions that can be used to specify a specific export type inControllerRO.export(MindMap, File, String, boolean).returns Freeplane version.if multiple nodes are selected returns one (arbitrarily chosen) selected node or the selected node for a single node selection.A read-only list of selected nodes.getSortedSelection(boolean differentSubtrees) returnsList<? extends Node>sorted by the node's vertical position.returns the directory where user settings, logfiles, templates etc.floatgetZoom()returns the current zoom factor.booleanreturns false if the system 'nonInteractive' is set.ReturnsLoaderfor accessing or loading mind map from file.ReturnsLoaderfor accessing or loading mind map from file.ReturnsLoaderfor accessing or loading mind map from URL.Methods inherited from interface org.freeplane.api.ControllercenterOnNode, deactivateUndo, edit, editInPopup, getMainThreadExecutorService, getOpenMaps, getOpenMindMaps, load, load, load, newMap, newMap, newMapFromTemplate, newMindMap, redo, select, select, selectBranch, selectMultipleNodes, setStatusInfo, setStatusInfo, setStatusInfo, setStatusInfo, setZoom, undoMethods inherited from interface org.freeplane.api.ControllerROgetViewRootMethods inherited from interface org.freeplane.api.HeadlessMapCreatorgetAttributeValueSerializer, mapLoader, script, scriptMethods inherited from interface org.freeplane.plugin.script.proxy.Proxy.ControllerROfind, find, find
- 
Method Details- 
getSelectedNode getSelected()Description copied from interface:ControllerROif multiple nodes are selected returns one (arbitrarily chosen) selected node or the selected node for a single node selection.- Specified by:
- getSelectedin interface- ControllerRO
 
- 
getSelectedsDescription copied from interface:ControllerROA read-only list of selected nodes. That is you cannot select a node by adding it to the returned list.- Specified by:
- getSelectedsin interface- ControllerRO
 
- 
getSortedSelectionDescription copied from interface:ControllerROreturnsList<? extends Node>sorted by the node's vertical position.- Specified by:
- getSortedSelectionin interface- ControllerRO
- Parameters:
- differentSubtrees- if true children/grandchildren/grandgrandchildren/... nodes of selected parent nodes are excluded from the result.
 
- 
getFreeplaneVersionFreeplaneVersion getFreeplaneVersion()Description copied from interface:ControllerROreturns Freeplane version. Use it like this:def required = FreeplaneVersion.getVersion("1.1.2"); if (c.freeplaneVersion < required) UITools.errorMessage("Freeplane version " + c.freeplaneVersion + " not supported - update to at least " + required);- Specified by:
- getFreeplaneVersionin interface- ControllerRO
 
- 
getUserDirectoryFile getUserDirectory()Description copied from interface:ControllerROreturns the directory where user settings, logfiles, templates etc. are stored.- Specified by:
- getUserDirectoryin interface- ControllerRO
 
- 
findDescription copied from interface:ControllerROStarting from the root node, recursively searches for nodes (in breadth-first sequence) for whichclosure.call(node)returns true.A find method that uses a lambda ("block") for simple custom searches. As this closure will be called with a node as an argument (to be referenced by it) the search can evaluate every node property, like attributes, icons, node text or notes.Examples: def nodesWithNotes = c.find{ it.noteText != null } def matchingNodes = c.find{ it.text.matches(".*\\d.*") } def texts = matchingNodes.collect{ it.text } print "node texts containing numbers:\n " + texts.join("\n ")SeeNodeRO.find(NodeCondition)for searches on subtrees.- Specified by:
- findin interface- ControllerRO
- Parameters:
- condition- a lambda that returns a boolean value. The closure will receive a NodeModel as an argument which can be tested for a match.
- Returns:
- all nodes for which closure.call(NodeModel)returns true.
 
- 
findDescription copied from interface:ControllerROStarting from this node, recursively searches for nodes for whichcondition.check(node)returns true and adds their ancestor or descendant nodes if required.- Specified by:
- findin interface- ControllerRO
 
- 
findAllDescription copied from interface:ControllerROReturns all nodes of the map in breadth-first order, that is, for the following map,1 1.1 1.1.1 1.1.2 1.2 2[1, 1.1, 1.1.1, 1.1.2, 1.2, 2] is returned. SeeNodeRO.find(NodeCondition)for searches on subtrees.- Specified by:
- findAllin interface- ControllerRO
- See Also:
 
- 
findAllDepthFirstDescription copied from interface:ControllerROReturns all nodes of the map in depth-first order, that is, for the following map,1 1.1 1.1.1 1.1.2 1.2 2[1.1.1, 1.1.2, 1.1, 1.2, 1, 2] is returned. SeeNodeRO.findAllDepthFirst()for subtrees.- Specified by:
- findAllDepthFirstin interface- ControllerRO
 
- 
getZoomfloat getZoom()Description copied from interface:ControllerROreturns the current zoom factor. A value of 1 means 100%.- Specified by:
- getZoomin interface- ControllerRO
 
- 
isInteractiveboolean isInteractive()Description copied from interface:ControllerROreturns false if the system 'nonInteractive' is set. This can be used in actions to not open dialogs etc.- Specified by:
- isInteractivein interface- ControllerRO
 
- 
getExportTypeDescriptionsDescription copied from interface:ControllerROreturns a list of export type descriptions that can be used to specify a specific export type inControllerRO.export(MindMap, File, String, boolean). These descriptions are internationalized.- Specified by:
- getExportTypeDescriptionsin interface- ControllerRO
 
- 
exportvoid export(MindMap map, File destinationFile, String exportTypeDescription, boolean overwriteExisting) Description copied from interface:ControllerROexports map to destination file, example:println c.exportTypeDescriptions.join('\n') boolean overwriteExistingFile = true c.export(node.map, new File('/tmp/t.png'), 'Portable Network Graphic (PNG) (.png)', overwriteExistingFile) c.export(node.map, new File('/tmp/t.png'), 'PNG', overwriteExistingFile) c.export(node.map, new File('/tmp/t.png'), '', overwriteExistingFile)- Specified by:
- exportin interface- ControllerRO
- Parameters:
- exportTypeDescription- Use- ControllerRO.getExportTypeDescriptions()to look up available exportTypes. Note that the file format does not suffice to specify a specific export since there may be more than one, as for HTML. You can use a substring or an empty string instead of full description, if exported destination file extension matches filter desription.
 
- 
mapLoaderDescription copied from interface:ControllerReturnsLoaderfor accessing or loading mind map from file.- Specified by:
- mapLoaderin interface- Controller
- Specified by:
- mapLoaderin interface- HeadlessMapCreator
 
- 
mapLoaderDescription copied from interface:ControllerReturnsLoaderfor accessing or loading mind map from URL.- Specified by:
- mapLoaderin interface- Controller
- Specified by:
- mapLoaderin interface- HeadlessMapCreator
 
- 
mapLoaderDescription copied from interface:ControllerReturnsLoaderfor accessing or loading mind map from file.- Specified by:
- mapLoaderin interface- Controller
- Specified by:
- mapLoaderin interface- HeadlessMapCreator
 
 
-