User Tools

Site Tools


01_user_documentation:06_graph:02_node:01_attribute

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
01_user_documentation:06_graph:02_node:01_attribute [2025/01/30 10:55] – created gaetan01_user_documentation:06_graph:02_node:01_attribute [2025/10/07 16:44] (current) gaetan
Line 1: Line 1:
 ====== Attribute ====== ====== Attribute ======
  
-An attribute is a node field.+Persistent fields (in the java sense) of Node are attributes. Basically, all fields that are NOT ''static'', ''const'' nor ''transient'' are attributes. The [[:01_user_documentation:06_graph:07_persistence|persistence]] management of the Node require each attribute to have accessors, which are declared in the node.  
 + 
 +===== Accessor ===== 
 + 
 +Attribute accessors are the methods to get and set the attribute value. The accessors of a Node are automatically resolved by the compiler with the syntax:  
 +<code java> 
 +Sphere s; // has an attribute diameter 
 +s[diameter] = 5; // automatically resolve the setter 
 +float d = s[diameter]; // automatically resolve the getter 
 +</code> 
 + 
 +===== Editor ===== 
 + 
 +Additionally, some attributes can be edited with the [[:|attribute editor]]. The attribute needs to be [[:01_user_documentation:03_interacting_with_groimp:02_panels:04_attribute_editor:02_property_editors|editable]] and not ''hidden'' 
 +{{page>01_user_documentation:03_interacting_with_groimp:02_panels:04_attribute_editor&noheader}}
01_user_documentation/06_graph/02_node/01_attribute.1738230922.txt.gz · Last modified: 2025/01/30 10:55 by gaetan