public interface ItemBuilder
Item
instances.
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 by getType()
. In other words if this builder is building
Node.Item
items, it should return
Node.Item
as 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)
Modifier and Type | Field and Description |
---|---|
static String |
EDGE_BUILDER |
static String |
EDGE_LABEL_BUILDER |
static String |
NODE_BUILDER |
static String |
NODE_LABEL_BUILDER |
Modifier and Type | Method and Description |
---|---|
Item[] |
getItems(Graph graph)
Build items from the
graph . |
String |
getType()
Returns the type of this builder.
|
static final String NODE_BUILDER
static final String NODE_LABEL_BUILDER
static final String EDGE_BUILDER
static final String EDGE_LABEL_BUILDER
Item[] getItems(Graph graph)
graph
.graph
- the graph to build items fromgetType()
String getType()
The type should always match the type of
Item
the builder is building. For instance if the builder is
building
Item.Node
type, this method should return
Item.Node
.
Copyright © 2007–2017 Gephi Consortium. All rights reserved.