Outils pour utilisateurs

Outils du site


issue138:freeplane

Ceci est une ancienne révision du document !


When building a map, I often find it useful to tag or mark a node. This is especially helpful when my map is about a project or a group of projects. Freeplane's attributes feature does the trick as it lets you create a property/value pair. Freeplane keeps track of these attributes and the values you assign to them. You can even lock the list of possible values for certain attributes. In this article, I will explore the use of attributes.

Adding and Editing Attributes

There are several methods for adding and editing attributes. The most useful being Edit > Node extensions > Edit attribute in-line. You can also find Edit attribute in-line in the right-click menu. Lastly, you can use the shortcut keys ALT + F9. If the selected node doesn't have any attributes, Freeplane adds a blank pair. The left blank is for the attribute, and the right blank is for the value. You can type in a new attribute name or use the dropdown arrow to select an existing one. You can type in a value in the right blank or press the ENTER key to get a dropdown list. The list includes values already assigned to the attribute.

If there are attributes assigned to the selected node, you can use the arrow keys to move around in the table. You can change the attribute by using the dropdown list or by typing a new attribute name. When editing the value, you press the ENTER key to get a dropdown list of assigned values, or type in a new value.

If you right-click in the table, you get a context menu. ‘Optimal width’ scales the width of the table columns to fit the longest text in the column. ‘New attribute’ creates a row for you to add an attribute to the node. ‘Delete’ removes the selected attribute from the node. Up and Down moves you up and down the rows of attributes. (You can do the same things with the up and down arrow keys.) If you right-click on a value in the table, you get a context menu that includes the ability to add hyperlinks. You can add a link by choosing the file or typing in the URL/path. You can add a link to a node, too. You can use the mailto method as outlined in Part 8.

Press the ESC (Escape) key to exit the edit mode or select a different node.

When you add an attribute to a node, the menus View > Node attributes determine whether it shows. ‘Show selected attributes’ will display only the attributes tagged as selected. Later, I will show you how to set the select tag. To display all attributes below the node, select ‘Show all attributes’. ‘Hide all attributes’ will show no attributes. Use the Show icon for attributes to display the attributes icon on the node core. If you hover over a node with attributes, all the attributes will show in a pop-up.

Another way to add attributes is through a dialog. Use the menus Edit > Node extensions > Add attribute in dialog. The dialog has two dropdown lists and two buttons. From the Attribute Name dropdown list, you can select an existing attribute, or you can type in a new name. The Attribute Value dropdown list lets you select an existing value, or you can type in a new one. Click the OK button to assign the attribute to the selected node, or the Cancel button to discard.

To copy the attributes on a selected node, use the menus Edit > Node extensions > Copy attributes. Select the node you want to copy the attributes to. To paste the attributes use the menus Edit > Node extensions > Pastes attributes. It is not possible to copy selected attributes. You are copying all the attributes of the node.

Attribute Manager

The Attribute Manager lets you add, remove, and edit the attributes and values for the map. The manager dialog is a one-stop/do it all for managing the attributes in a map. You can specify which attributes are selected and which are not. To open the Attribute Manager, use the menus Edit > Node extensions > Attribute manager.

There are four columns across the top of the dialog: Attributes, Selected Visible, Restricted Set, and Edit. The Attribute column lists the active attributes in the map. You can check the Selected Visible column to change how the attribute shows in the node. If checked, the attribute will display below the node. If unchecked, the attribute shows only when you hover over the node. This is dependant on the attribute’s view settings. Restricted Set locks the values for that attribute to those already in the map. Use the Edit button to change the list of values.

The Edit dialog has a list of the current values, a text box, and buttons to add, rename, and delete. To add a value, type the new value in the text box and click the Add button. To rename a value select the value to change, make the change, and click the Rename button. You delete a value by selecting the value and clicking the Delete button. Click the Close button to return to the Attribute Manager dialog.

Four buttons line the bottom of the Attribute Manager dialog. The OK button saves your changes and closes the dialog. Click the Apply button to save your settings without closing the dialog. The Cancel button closes the dialog and discards any changes. The Import Map button opens a dialog that allows you to import attributes and values from any open maps. Select the attributes and values you want to import and click the OK button. Click the Cancel button to close the dialog without importing any attributes.

The first entry in the manager is All Attributes. This entry is used to make changes related to all attribute names. The other rows allow you to edit values of specific attributes. Checking the Selected Visible makes all attributes visible under the node. Unchecking makes all the attributes show only when the mouse hovers over a node. The Restricted Set locks the addition of any attributes except in the manager. The Edit lets you add and remove attributes from the current map. It works the same as the values dialog, but you are adding and removing attributes instead of values.

Find And Replace Attribute

In the menus, Edit > Node extensions > Find and replace attribute brings up the Extended attribute editor. The two radio buttons at the top determine the nodes affected by your search and replace queries. You can pick from Selected nodes and All visible nodes. The checkbox Skip root node determines whether to include the root node in the search. Two sets of combo boxes allow you to select or enter attribute/value pairs. The Add button applies the top attribute pair to the indicated nodes. To remove a certain attribute from the node, select it in the top pair and click Remove all values button. The Remove this value button will remove only the attribute/value from the top pair. The Replace with button will replace the top pair with the bottom pair. The Close button closes the dialog.

Attribute From Style

In the style editor, you can add attributes to a style. When you assign a node to the style, the attributes aren't added to the node. You apply the style attributes through the menus Edit > Node extensions > Attribute from style. This assumes the node is assigned to a style and the style has attributes. In the style editor, you find the attribute options in the Edit > Node extensions menu. Remove Attributes

In the menus, Edit > Node extensions > Remove attributes, you have options to Remove first, Remove last, and Remove all attributes.

Tool Panel

In the Tool Panel on the Calendar and Attributes tab, you find one more place to add attributes to nodes. But in the panel, you get a feature not found elsewhere, the ability to format the values of the attributes.

The attribute section is at the bottom of the tab. The New attribute button adds an attribute to the selected node. The Optimal width works in the same way as it does in other places. The Value format will open a list of formats. You will recognize many of these from the article on core text formatting (Part 8). Select a format to apply to the attribute value. The format is applied only to the currently selected value.

The right-click menus are the same as those when editing the attributes in-line.

Filtering and searching nodes by attributes

In the filter toolbar or the filter composer, the attribute names display in the left-hand dropdown list. The right-hand dropdown list is available for selecting defined values. Select the comparison operator from the middle dropdown list. All comparison operations consider the data type of the values (text, date, time, number). The status bar shows the type of the selected value.

Attributes are a great way to tag and identify nodes for a certain purpose. You can add attributes in-line or through the Attribute manager. In the Tool Panel, you have an option to format the values on the Calendar and Attributes tab.

issue138/freeplane.1540642795.txt.gz · Dernière modification : 2018/10/27 14:19 de auntiee