|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectilog.cpl.graph.IlpAbstractGraphModel
ilog.cpl.network.IlpAbstractNetworkModel
ilog.cpl.network.IlpDefaultNetworkModel
public class IlpDefaultNetworkModel
This class is the default implementation of the 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 Summary | |
|---|---|
IlpDefaultNetworkModel()
Constructor. |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class ilog.cpl.network.IlpAbstractNetworkModel |
|---|
endChangingNetworkModel, fireAttributeValueEvent, fireNetworkModelEvent, startChangingNetworkModel |
| Methods inherited from class ilog.cpl.graph.IlpAbstractGraphModel |
|---|
addModelListener, addRootObject, addRootObjects, addToObservationScope, clear, endBatch, fireModelEvent, getChildren, getFrom, getObservationScope, getParent, getRootObjects, getTo, isInObservationScope, isLeaf, removeFromObservationScope, removeModelListener, removeRootObject, removeRootObjects, startBatch |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface ilog.cpl.network.IlpMutableNetworkModel |
|---|
endChangingNetworkModel, startChangingNetworkModel |
| Methods inherited from interface ilog.cpl.graph.IlpGraphModel |
|---|
getChildren, getFrom, getParent, getRootObjects, getTo, isLeaf |
| Methods inherited from interface ilog.cpl.graph.IlpMutableGraphModel |
|---|
addRootObject, addRootObjects, clear, removeRootObject, removeRootObjects |
| Methods inherited from interface ilog.cpl.graph.IlpGraphModel |
|---|
getChildren, getFrom, getParent, getRootObjects, getTo, isLeaf |
| Constructor Detail |
|---|
public IlpDefaultNetworkModel()
| Method Detail |
|---|
public 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 IlpAbstractGraphModel
protected void noteChildrenRemoved(IlpRepresentationNode node,
int[] indices,
IlpRepresentationNode[] children)
noteChildrenRemoved in class IlpAbstractGraphModel
protected 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.
|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||