Gephi Toolkit Javadoc

org.gephi.graph.api
Interface NodeData

All Superinterfaces:
Attributable, Renderable, Spatial

public interface NodeData
extends Renderable, Attributable

Contains all extended data related to a node, including access to its attributes.

The node data is unique for a node, accross all views. Nodes can be get from this node data by using getRootNode() or getNode(viewId).

Author:
Mathieu Bastian
See Also:
Node

Method Summary
 java.lang.String getId()
          Returns the string identifier of this node.
 java.lang.String getLabel()
          Returns the node label, or null if none has been set.
<T extends LayoutData>
T
getLayoutData()
          Returns the layout data object associated to this node.
 Node getNode(int viewId)
          Returns the node this node data belongs in the view that has viewId has identifier or null if the view cannot be found.
 Node getRootNode()
          Returns the node this node data belongs in the main view.
 boolean isFixed()
          Returns true if this node is fixed.
 void setFixed(boolean fixed)
          Sets this node fixed attribute.
 void setLabel(java.lang.String label)
          Sets this node label.
 void setLayoutData(LayoutData layoutData)
          Sets the layout data of this node.
 
Methods inherited from interface org.gephi.graph.api.Renderable
alpha, b, g, getModel, getRadius, getSize, getTextData, r, setAlpha, setB, setColor, setG, setModel, setR, setSize, setX, setY, setZ
 
Methods inherited from interface org.gephi.graph.api.Spatial
x, y, z
 
Methods inherited from interface org.gephi.graph.api.Attributable
getAttributes
 

Method Detail

getRootNode

Node getRootNode()
Returns the node this node data belongs in the main view. To get the node in a particular view, see getNode(int).

Returns:
the node this node data belongs in the main view
See Also:
GraphView

getNode

Node getNode(int viewId)
Returns the node this node data belongs in the view that has viewId has identifier or null if the view cannot be found.

Parameters:
viewId - the view identifier
Returns:
the node this node data belongs in the view
See Also:
GraphView

getLabel

java.lang.String getLabel()
Returns the node label, or null if none has been set.

Returns:
the node lable, or null

setLabel

void setLabel(java.lang.String label)
Sets this node label.

Parameters:
label - the label that is to be set as this node label

getId

java.lang.String getId()
Returns the string identifier of this node. This identifier can be set by users, in contrario of Node.getId() which is set by the system.

Use Graph.getNode(String) to find nodes from this id.

If no identifier has been set, returns the system integer identifier.

Returns:
the node identifier

getLayoutData

<T extends LayoutData> T getLayoutData()
Returns the layout data object associated to this node. Layout data are temporary data layout algorithms can push to nodes to save states when computing.

Type Parameters:
T - must inherit from LayoutData
Returns:
the layout data of this node, can be null

setLayoutData

void setLayoutData(LayoutData layoutData)
Sets the layout data of this node. Layout data are temporary data layout algorithms can push to nodes to save states when computing.

Parameters:
layoutData - the layout data that is to be set for this node

isFixed

boolean isFixed()
Returns true if this node is fixed. A node can be fixed to block it's position during layout.

Returns:
true if this node is fixed, false otherwise

setFixed

void setFixed(boolean fixed)
Sets this node fixed attribute. A node can be fixed to block it's position during layout.

Parameters:
fixed - the fixed attribute value

Gephi Toolkit Javadoc