## Physical style - patterns

There is a set of physical styles, also called patterns. Most patterns encompass typeface variations, such as style, font and size. But patterns can also be designed to include links to images, files, programs, etc.

You can apply a pattern to a node in one of two ways.

- Right-click on the node, pick Physical Style from the node menu, then choose the pattern you want.
- Select a node, and use the keyboard shortcut to apply a particular pattern.

> The default keyboard shortcuts are:
> apply pattern 1 = F1
> apply pattern 2 = Ctrl+Shift+N
> apply pattern 3 = F3
> apply pattern 4 = F4
> apply pattern 5 = F5
> apply pattern 6 = F6
> apply pattern 7 = F7
> apply pattern 8 = F8
> apply pattern 9 = F9
> apply pattern 10 = Ctrl+F1
> apply pattern 11 = Ctrl+F2
> apply pattern 12 = Ctrl+F3
> apply pattern 13 = Ctrl+F4
> apply pattern 14 = Ctrl+F5
> apply pattern 15 = Ctrl+F6
> apply pattern 16 = Ctrl+F7
> apply pattern 17 = Ctrl+F8
> apply pattern 18 = Ctrl+F9

> The shortcuts may be edited in the user.properties file.

You can create or change patterns by editing "patterns.xml", located in the folder "freemind" in your home directory. Pattern applies to a node, if there is a <node> tag; it applies to an edge, if there is an <edge> tag.

A typical pattern in patterns.xml looks like this:

    <pattern name="Folder">
        <node color="#CC9900">
            <font NAME="Arial" size="14" />
        </node>
    </pattern>

Note that the <node> tag has the <font> tag as a child. The <font> tag itself is terminated by the "/" at the end.

You can have a simple pattern that only changes the color:

    <pattern name="Purple">
        <node color="#993399"/>
    </pattern>

Or, the tag can included imbedded links. In this case, it's necessary to use the "&" codes for special HTML characters. The following example loads the node with a graphic that has been stored in FreeMind's images directory.

    <pattern name="Question mark">
        <node TEXT="&lt;html&gt;&lt;img src=&quot;file:///C:/Program Files/FreeMind/Images/question.gif&quot;&gt;&lt;/html&gt; ">
            <font NAME="Default" SIZE="14"/>
        </node>
    </pattern>

Be aware that the use of the "text" attribute, whether to insert actual text or HTML code, will completely overwrite any text that was already in that node.

If you're using the shortcut keys, remember that the patterns are numbered simply according to their sequence in the list. So if you add or delete a pattern in the middle, the numbering will change.