Package org.gephi.preview.spi
Interface ItemBuilder
-
public interface ItemBuilderBuilds and returns newIteminstances.Items are the visual elements representing the graph and are built by item builders from the graph object.
An item builder should build only a single type of items. Items are defined by a type
Item.getType(), which needs to be the same as the value returned bygetType(). In other words if this builder is buildingNode.Itemitems, it should returnNode.Itemas a type.Item builders are singleton services and implementations need to add the following annotation to be recognized by the system:
@ServiceProvider(service=ItemBuilder.class)- Author:
- Yudi Xue, Mathieu Bastian
-
-
Field Summary
Fields Modifier and Type Field Description static StringEDGE_BUILDERstatic StringEDGE_LABEL_BUILDERstatic StringNODE_BUILDERstatic StringNODE_LABEL_BUILDER
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Item[]getItems(Graph graph)Build items from thegraph.StringgetType()Returns the type of this builder.
-
-
-
Field Detail
-
NODE_BUILDER
static final String NODE_BUILDER
- See Also:
- Constant Field Values
-
NODE_LABEL_BUILDER
static final String NODE_LABEL_BUILDER
- See Also:
- Constant Field Values
-
EDGE_BUILDER
static final String EDGE_BUILDER
- See Also:
- Constant Field Values
-
EDGE_LABEL_BUILDER
static final String EDGE_LABEL_BUILDER
- See Also:
- Constant Field Values
-
-
Method Detail
-
getItems
Item[] getItems(Graph graph)
Build items from thegraph.- Parameters:
graph- the graph to build items from- Returns:
- an array of new items, from the same type returned by
getType()
-
getType
String getType()
Returns the type of this builder.The type should always match the type of
Itemthe builder is building. For instance if the builder is buildingItem.Nodetype, this method should returnItem.Node.- Returns:
- the builder item type.
-
-