public interface AttributeAdapter
The adaptor basically just maps keyword-value pairs to however the graph elements store this information. In some cases, graph elements may just contain a Map themselves. In others, they may map an attribute to a pair of getter and setter methods.
With the editing attributes, there is always the possiblity that attributes expected by the Diva editors may collide with pre-existing attributes in your graph data structure. At present (and possibly forever) the only way around this is to used the AttributeAdapter to rename these attributes. For example, if your nodes have a "location" attribute that means something other than the position of the node's visual representation, then make the AttributeAdapter think it's called eg "fooLocation."
Modifier and Type | Method and Description |
---|---|
Iterator |
attributeNames(Object element)
Return an iterator over the names of the attributes that
this element knows about.
|
Object |
getAttribute(Object element,
String name)
Get the value of an attribute.
|
AttributeProxy |
getAttributeProxy(Object element,
String name)
Get a "proxy" for the named attribute of the given element.
|
void |
setAttribute(Object element,
String name,
Object value)
Set the value of an attribute.
|
Iterator attributeNames(Object element)
Object getAttribute(Object element, String name)
AttributeProxy getAttributeProxy(Object element, String name)
Copyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.