public abstract class NodeProvider extends Object implements Lookup.Provider
Modifier and Type | Field and Description |
---|---|
protected boolean |
initialized |
Constructor and Description |
---|
NodeProvider(Lookup lookup)
Constructor
|
NodeProvider(Lookup lookup,
Comparator<Node> comparator)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addChangeListener(ChangeListener listener)
Add a change listener.
|
void |
addNode(Node node)
Add a Node.
|
Lookup |
getLookup() |
Collection<Node> |
getNodes()
Get the list of nodes.
|
protected Collection<Node> |
getNodes(Object dataObject)
Get the list of nodes that contain a lookup that in turn contains
an object with a matching hash code.
|
protected abstract void |
initialize() |
void |
refresh() |
void |
removeAllNodes()
Remove all nodes.
|
void |
removeChangeListener(ChangeListener listener)
Remove a change listener.
|
void |
removeNode(Node node) |
void |
setNodes(Collection<Node> newList)
Sets the list of nodes.
|
void |
setProxyNodes(Collection<Node> newList) |
public NodeProvider(Lookup lookup)
lookup
- the associated lookuppublic NodeProvider(Lookup lookup, Comparator<Node> comparator)
lookup
- the associated lookupcomparator
- the comparator to use for sorting the nodespublic Lookup getLookup()
getLookup
in interface Lookup.Provider
public Collection<Node> getNodes()
public void refresh()
protected abstract void initialize()
protected Collection<Node> getNodes(Object dataObject)
dataObject
- the data object.public void setProxyNodes(Collection<Node> newList)
public void setNodes(Collection<Node> newList)
newList
- the new list of nodespublic void addNode(Node node)
node
- the node to addpublic void removeNode(Node node)
public void removeAllNodes()
public void addChangeListener(ChangeListener listener)
listener
- the listener to add.public void removeChangeListener(ChangeListener listener)
listener
- the listener to remove.