Difference between revisions of "Patterns"

From Freeplane - free mind mapping and knowledge management software
m (The future: Logical styles)
 
Line 1: Line 1:
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.
+
Up to Freeplane 1.1 patterns were a method to change the appearance of a mindmap node. Starting with Freeplane 1.2 pattern are replaced by the concept of [[Node styles]].
  
== Edit a pattern ==
+
[[Category:Unsupported]]
 
 
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 [http://sourceforge.net/projects/freeplane/forums/forum/758437/topic/3407624 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''.
 
 
 
 
 
[[Category:Function_1.2.x]]
 

Latest revision as of 00:13, 19 December 2011

Up to Freeplane 1.1 patterns were a method to change the appearance of a mindmap node. Starting with Freeplane 1.2 pattern are replaced by the concept of Node styles.