University of Bremen

Manual

Main->Term Representation->Node Attributes

Supported Node Attributes

Node Attribute "OBJECT"

This is the most important attribute in a graph visualization. It is used to specify the text that appears inside a node. Usually each node should have this attribute. See edge attribute OBJECT, too. The text, i.e. the attribute value, can be an arbitrary string. International characters are supported (ISO 8bit). The extension of a node in the graph visualization will automatically follow the size of the text by considering the current font, so nodes may have any size. Even multi-line text is possible using a "\n" character inside the attribute value. The default value for this attribute is the empty string "".

Node Attributes "FONTFAMILY"

This is used to visualize the text of a node in a different font. Supported values are: "lucida" (default), "times", "helvetica", and "courier". See edge attribute FONTFAMILY, too.

Node Attribute "FONTSTYLE"

This is used to visualize the text of a node in a different font. Supported values are: "normal", "bold" (default), "italic", and "bold_italic". See edge attribute FONTSTYLE, too.

Node Attribute "INFO"

This is used to define the tooltip text that appears after a delay when the mouse pointer is over the node. Tooltips can be controlled with menu Layout/General Settings.... See edge attribute INFO, too.

Node Attribute "HIDDEN"

This attribute is used to hide the subgraph of a node initially. It is the same operation available in menu Abstraction/Hide Subgraph. Supported values for this attribute are "true" and "false" ("false" is the default).

Node Attribute "BORDER"

This attribute defines the border of the geometrical object (except for "text" and "invisible"). The values for this attribute may be: "none", "single" (default) and "double". The objects "text" and "invisible" cannot lack a border at all. The default value for this attribute is "single".

Node Attribute "COLOR"

Can be used to define the background color of a node. The value of this attribute can be any X11TM colorname on UNIX® and Linux® platforms (see file lib/X11/rgb.txt in your X11TM directory). On all platforms, a RGB color specification in a format like "#0f331e" can be used. Here, "0f" is the hexadecimal value for the red part of the color, "33" is the green part and "1e" is the blue part of the color. Hence, a palette of 16.7 million colors is supported. The default color for nodes is "white". See edge attribute EDGECOLOR, too.

Node Attribute "CCOLOR"

Same as attribute COLOR, but used when the subgraph of the node is hidden using abstractions. The default value for this attribute is the value of the attribute "COLOR" or its default value.

Node Attribute "_GO" (Graphical Object)"

This attribute specifies the geometrical object used to draw a node. Supported values are: "box" (default), "circle", "ellipse", "rhombus", "triangle", "text", "invisible", "image" and "scissors" (note: value "icon", available in previous releases, has been replaced by "image", but is still supported for compatibility). Object "text" is similar to object "box", in fact it is a box without the border. With object "image", color icons can be used to visualize a graph node. Unfortunately, "image" is more complicated than the other graphical objects. The file with the image of the icon has to be specified with a second attribute IMAGE, (see below), so for icons you need two attributes: "_GO" and "IMAGE". Note: object "scissors" is usually used to display nodes with hidden subgraph. It is not recommended to use this object, because the user may be confused.

Node Attribute "_CGO" (Graphical Object)

Same as attribute _GO, but used when the subgraph of the node is hidden using abstractions. The default value for this attribute is "scissors". You also need attribute CIMAGE, if you choose the geometrical object "image" as attribute value, as described above for attribute _GO.

Node Attribute "IMAGE"

This is used as a supplement for attribute _GO when its value is set to "image". Attribute "IMAGE" specifies the file name of the image used to draw the node as icon. The file specified in the attribute value must be in GIF, XBM, XPM or BMP format. Absolute file names are not allowed as a value for this attribute. uDraw(Graph) is looking for this file in all directories given by environment variable $UDG_ICONDIR. So for example, when the icon is in file "/home/me/images/my_image.gif" (this is UNIX® notation, use "C:" and "\" on Windows®), then add "/home/me/images" to the search path of environment variable "$UDG_ICONDIR" before starting uDraw(Graph), set attribute "_GO" to "image" and attribute "IMAGE" to "my_image.gif" for a particular node. The default value for this attribute is "".

Notes about attribute "IMAGE":

  • Using attribute "IMAGE" without setting "_GO" to "image" will have no effect. Do not forget to set both attributes when you want to have icons in a graph visualization.
  • Icon images are not saved in a status file, so when you want to transfer the status file of a graph with icons, make sure to transfer the image files, too!
  • If uDraw(Graph) does not find the specified image file in the directories defined by environment variable $UDG_ICONDIR, then a default image with a question mark is used instead.

Node Attribute "ICONFILE"

Used in former releases, but replaced by IMAGE. Is still available for backward compatibility.

Node Attribute "CIMAGE"

Same as attribute IMAGE, but used when the subgraph of the node is hidden using abstractions The default value for this attribute is "". This attribute is used as a supplement for attribute _CGO when its value is set to "image".

Node Attribute "CICONFILE"

Used in former releases, but replaced by CIMAGE. Is still available for backward compatibility.

Node Attribute for Pop-Up Menu

This attribute defines a pop-up menu for a node. This has to be done with a completely different syntax. Instead of using "a(...,...)", menus are defined with "m(menus)". The syntax for the menus parameter is described in the API documentation. The pop-up menu is displayed when the user presses the right mouse button over the node. In this case, the ID of the menu is sent to the application, so this attribute does not make sense when no application is connected to the API. Please take a look in the section about user interface extension for further information regarding menus. See edge attribute for pop-up menus, too.