public class IlpDefaultNetworkModel extends IlpAbstractNetworkModel implements IlpMutableNetworkModel
IlpNetworkModel
interface. It contains a number of nodes (instances of
IlpNetworkNode), links (instances of IlpNetworkLink)
and possibly other representation objects.
This class attaches RepresentationNodeListeners to the
objects in the model. It is automatically notified when the list of
children of an object changes.
Note: If a link is added to the model before its end nodes have been added, the view will not display it until both end nodes have also been added to the model.
| Constructor and Description |
|---|
IlpDefaultNetworkModel()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addNetworkModelListener(NetworkModelListener listener)
Adds a listener that is notified each time a change to this model occurs.
|
boolean |
isLink(IlpRepresentationObject object)
Returns
true if a network object is a link in this model. |
boolean |
isNode(IlpRepresentationObject object)
Returns
true if a network object is a node in this model. |
protected void |
noteChildrenAdded(IlpRepresentationNode node,
int[] indices,
IlpRepresentationNode[] children) |
protected void |
noteChildrenRemoved(IlpRepresentationNode node,
int[] indices,
IlpRepresentationNode[] children) |
protected void |
noteEndChanged(IlpRepresentationLink link,
boolean origin,
IlpRepresentationNode oldEnd,
IlpRepresentationNode newEnd) |
protected void |
noteRootAdded(IlpRepresentationNode root) |
protected void |
noteRootRemoved(IlpRepresentationNode root) |
protected void |
noteRootsAdded(Collection roots) |
protected void |
noteRootsRemoved(Collection roots) |
void |
removeNetworkModelListener(NetworkModelListener listener)
Removes a listener previously added with
addModelListener. |
endChangingNetworkModel, fireAttributeValueEvent, fireNetworkModelEvent, startChangingNetworkModeladdModelListener, addRootObject, addRootObjects, addToObservationScope, clear, endBatch, fireModelEvent, getChildren, getFrom, getObservationScope, getParent, getRootObjects, getTo, isInObservationScope, isLeaf, removeFromObservationScope, removeModelListener, removeRootObject, removeRootObjects, startBatchclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitendChangingNetworkModel, startChangingNetworkModeladdRootObject, addRootObjects, clear, removeRootObject, removeRootObjectsgetChildren, getFrom, getParent, getRootObjects, getTo, isLeafpublic boolean isNode(IlpRepresentationObject object)
true if a network object is a node in this model.isNode in interface IlpGraphModelisNode in class IlpAbstractGraphModelobject - The object to be checked.true if the object is an instance of
IlpNetworkNode and not an instance of
IlpNetworkLink.IlpGraphModel.isLink(ilog.cpl.model.IlpRepresentationObject)public boolean isLink(IlpRepresentationObject object)
true if a network object is a link in this model.
In this implementation, true is returned if the object is an instance of
IlpNetworkLink.
isLink in interface IlpGraphModelisLink in class IlpAbstractGraphModelobject - The object to be checked.true if the object is a link in this model;
false otherwise.IlpGraphModel.isNode(ilog.cpl.model.IlpRepresentationObject)protected void noteChildrenAdded(IlpRepresentationNode node, int[] indices, IlpRepresentationNode[] children)
noteChildrenAdded in class IlpAbstractGraphModelprotected void noteChildrenRemoved(IlpRepresentationNode node, int[] indices, IlpRepresentationNode[] children)
noteChildrenRemoved in class IlpAbstractGraphModelprotected void noteEndChanged(IlpRepresentationLink link, boolean origin, IlpRepresentationNode oldEnd, IlpRepresentationNode newEnd)
noteEndChanged in class IlpAbstractGraphModelprotected void noteRootAdded(IlpRepresentationNode root)
noteRootAdded in class IlpAbstractGraphModelprotected void noteRootsAdded(Collection roots)
noteRootsAdded in class IlpAbstractGraphModelprotected void noteRootRemoved(IlpRepresentationNode root)
noteRootRemoved in class IlpAbstractGraphModelprotected void noteRootsRemoved(Collection roots)
noteRootsRemoved in class IlpAbstractGraphModelpublic void addNetworkModelListener(NetworkModelListener listener)
addNetworkModelListener in interface IlpNetworkModeladdNetworkModelListener in class IlpAbstractNetworkModellistener - The listener to be registered.public void removeNetworkModelListener(NetworkModelListener listener)
addModelListener.removeNetworkModelListener in interface IlpNetworkModelremoveNetworkModelListener in class IlpAbstractNetworkModellistener - The listener to be unregistered.© Copyright Rogue Wave Software, Inc. 1997, 2017. All Rights Reserved.