public interface Item
ItemBuilder
and later used
by a Renderer
to be displayed.
An item simply stores the reference to the original object (e.g. node, edge) and
all the information useful for the Renderer
like the color, size or
position.
All items can be retrieved from the PreviewModel
.
Modifier and Type | Field and Description |
---|---|
static String |
EDGE |
static String |
EDGE_LABEL |
static String |
NODE |
static String |
NODE_LABEL |
Modifier and Type | Method and Description |
---|---|
<D> D |
getData(String key)
Returns data associated to this item.
|
String[] |
getKeys()
Returns all the keys.
|
Object |
getSource()
Returns the source of the item.
|
String |
getType()
Returns the type of the item.
|
void |
setData(String key,
Object value)
Sets data to this item.
|
static final String NODE
static final String EDGE
static final String NODE_LABEL
static final String EDGE_LABEL
Object getSource()
Node
or Edge
.String getType()
Item.NODE
,
Item.EDGE
, Item.NODE_LABEL
and Item.EDGE_LABEL
.<D> D getData(String key)
D
- the type of the datakey
- the keykey
, or null
if
not existvoid setData(String key, Object value)
key
- the keyvalue
- the value to be associated with key
String[] getKeys()
Copyright © 2007–2017 Gephi Consortium. All rights reserved.