Patterns
Patterns are a method to change the appearance of a mindmap node. Many attributes can be changed via patterns, like text and background colors, text properties, or icon assignments. And for scripting they provide the possibility to execute a script on a node.
Edit a pattern
Patterns can be edited with a visual editor accessible via the menu under Format/Patterns/Manage Patterns.... You select the pattern to edit by clicking on the pattern name in the left pane. If you want to add a pattern select Add new Pattern.
In the pattern editor you can, for each node attribute, decide if the pattern should affect the attribute by selecting [+] (change it), [-] (remove it, e.g. all icons) or [ ] to leave it as it was before.
Add a script
When you select the [+] at Script the button on the right gets activated. Clicking on it opens a script editor.
- Click on "Script" on the left panel.
- Enter a script on the right panel, e.g.
<groovy> =new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm").format(new Date()) + ": " + node.text </groovy>
This script will add the current timestamp to the node text when the pattern is added.
Note that the script will be executed only once on the first assignment of a pattern to a node.
The future: Logical styles
Patterns are a concept that is about to be replaced by Logical styles in Freeplane version 1.2, see this article in the forum. The further role of scripts in Logical styles has to be discussed but chances are that scripts will not be supported by Logical styles.