| Package | com.yworks.graph.model |
| Interface | public interface IGraphStructure |
| Implementors | DefaultGraphStructure |
DefaultGraph
delegates most of its work to. Normally you don't need to deal with this interface.
If a custom IGraph implementation needs to be implemented,
DefaultGraph can be used to quickly accomplish this task.
All that has to be done is provide the DefaultGraph constructor an
implementation of this relatively simple interface. Most of the work
is performed by the DefaultGraph implementation. The IGraphStructure implementation
serves as a facade to the structure of the graph.
| Property | Defined By | ||
|---|---|---|---|
| edges : Collection [read-only]
Gets a collection view over the edges in the graph. | IGraphStructure | ||
| nodes : Collection [read-only]
Gets a collection view over the nodes in the graph. | IGraphStructure | ||
| Method | Defined By | ||
|---|---|---|---|
Adds a bend to an edge at the given index. | IGraphStructure | ||
Adds a previously created edge to the collection of edges. | IGraphStructure | ||
Adds a previously created label to its owner. | IGraphStructure | ||
Adds a previously created node to the collection of nodes. | IGraphStructure | ||
Add a previously created port to a given node. | IGraphStructure | ||
clearBends(egde:IEdge):void
Removes all bends from the given edge. | IGraphStructure | ||
containsBend(bend:IBend):Boolean
Determines whether this instance contains the specified bend. | IGraphStructure | ||
containsEdge(edge:IEdge):Boolean
Determines whether this instance contains the specified edge. | IGraphStructure | ||
containsItem(item:IModelItem):Boolean
Determines whether this instance contains the specified item. | IGraphStructure | ||
containsLabel(label:ILabel):Boolean
Determines whether this instance contains the specified label. | IGraphStructure | ||
containsNode(node:INode):Boolean
Determines whether this instance contains the specified node. | IGraphStructure | ||
containsPort(port:IPort):Boolean
Determines whether this instance contains the specified port. | IGraphStructure | ||
Creates but does not add a bend for a given edge instance. | IGraphStructure | ||
Callback factory method that creates an IEdge implementation. | IGraphStructure | ||
Creates a label for a given owner using the provided model parameter. | IGraphStructure | ||
Callback factory method that creates an INode implementation. | IGraphStructure | ||
Create but don't yet add a port for a given node. | IGraphStructure | ||
Enumerates all edges that are incident to the given port. | IGraphStructure | ||
Enumerates all edges that are incident to ports owned by the given owner. | IGraphStructure | ||
removeBend(bend:IBend):void
Removes the bend from its edge. | IGraphStructure | ||
removeEdge(edge:IEdge):void
Remove an edge from the current set of edges. | IGraphStructure | ||
removeLabel(label:ILabel):void
Remove a label from its owner. | IGraphStructure | ||
removeNode(node:INode):void
Remove a node from the current set of nodes. | IGraphStructure | ||
removePort(port:IPort):void
Removes the port from its owner. | IGraphStructure | ||
Associates the style with the given edge. | IGraphStructure | ||
Sets the label model parameter for the given label. | IGraphStructure | ||
Associates the style with the given label. | IGraphStructure | ||
setLabelText(label:ILabel, text:String):void
Sets the label text for a given label to the specified text. | IGraphStructure | ||
Associates the style with the given node. | IGraphStructure | ||
Sets the location model parameter for the given port. | IGraphStructure | ||
Sets the ports of the given edge to the new values. | IGraphStructure | ||
Associates the style with the given port. | IGraphStructure | ||
| edges | property |
edges:Collection [read-only] Gets a collection view over the edges in the graph.
public function get edges():Collection| nodes | property |
nodes:Collection [read-only] Gets a collection view over the nodes in the graph.
public function get nodes():Collection| addBend | () | method |
public function addBend(forEdge:IEdge, index:int, bend:IBend):voidAdds a bend to an edge at the given index.
Parameters
forEdge:IEdge — The edge to add the bend to.
| |
index:int — The index at which the bend is to be added.
| |
bend:IBend — The bend to be added.
|
| addEdge | () | method |
public function addEdge(edge:IEdge, sourcePort:IPort, targetPort:IPort):voidAdds a previously created edge to the collection of edges.
Parameters
edge:IEdge — The edge to add.
| |
sourcePort:IPort — The source port of the edge.
| |
targetPort:IPort — The target port of the edge.
|
| addLabel | () | method |
public function addLabel(owner:ILabeledItem, label:ILabel):voidAdds a previously created label to its owner.
Parameters
owner:ILabeledItem — The item to add the label to.
| |
label:ILabel — The label to add.
|
| addNode | () | method |
public function addNode(Node:INode):voidAdds a previously created node to the collection of nodes.
Parameters
Node:INode — The node to add.
|
| addPort | () | method |
public function addPort(node:INode, port:IPort):voidAdd a previously created port to a given node.
Parameters
node:INode — The node.
| |
port:IPort — The port that is not owned by another item.
|
| clearBends | () | method |
public function clearBends(egde:IEdge):voidRemoves all bends from the given edge.
Parameters
egde:IEdge — The edge to be cleared.
|
| containsBend | () | method |
public function containsBend(bend:IBend):BooleanDetermines whether this instance contains the specified bend.
Parameters
bend:IBend — The bend.
|
Boolean — true if this graph contains the specified bend.
|
| containsEdge | () | method |
public function containsEdge(edge:IEdge):BooleanDetermines whether this instance contains the specified edge.
Parameters
edge:IEdge — The edge.
|
Boolean — true if this graph contains the specified edge.
|
| containsItem | () | method |
public function containsItem(item:IModelItem):BooleanDetermines whether this instance contains the specified item.
Parameters
item:IModelItem — The item.
|
Boolean — true if this graph contains the specified item.
|
| containsLabel | () | method |
public function containsLabel(label:ILabel):BooleanDetermines whether this instance contains the specified label.
Parameters
label:ILabel — The label.
|
Boolean — true if this graph contains the specified label.
|
| containsNode | () | method |
public function containsNode(node:INode):BooleanDetermines whether this instance contains the specified node.
Parameters
node:INode — The node.
|
Boolean — true if this graph contains the specified node.
|
| containsPort | () | method |
public function containsPort(port:IPort):BooleanDetermines whether this instance contains the specified port.
Parameters
port:IPort — The port.
|
Boolean — true if this graph contains the specified port.
|
| createBend | () | method |
public function createBend(forEdge:IEdge):IBendCreates but does not add a bend for a given edge instance.
Parameters
forEdge:IEdge — The edge to add the bend to.
|
IBend — A newly created bend.
|
| createEdge | () | method |
public function createEdge():IEdgeCallback factory method that creates an IEdge implementation.
Implementations may not add the instance to the
collection until the addEdge method is invoked.
IEdge — A non-live edge instance
|
| createLabel | () | method |
public function createLabel(owner:ILabeledItem, modelParameter:ILabelModelParameter):ILabelCreates a label for a given owner using the provided model parameter.
Parameters
owner:ILabeledItem — The owner.
| |
modelParameter:ILabelModelParameter — The model parameter.
|
ILabel — A newly created label.
|
| createNode | () | method |
public function createNode():INodeCallback factory method that creates an INode implementation.
Implementations may not add the instance to the
collection until the addNode method is invoked.
INode — A non-live node instance
|
| createPort | () | method |
public function createPort(forNode:INode):IPortCreate but don't yet add a port for a given node.
Parameters
forNode:INode |
IPort — A newly created port.
|
| getEdgesAtPort | () | method |
public function getEdgesAtPort(port:IPort, inEdges:Boolean, outEdges:Boolean):IterableEnumerates all edges that are incident to the given port.
Parameters
port:IPort — The port.
| |
inEdges:Boolean — Whether to yield edges whose target port is connected to the portOwner.
| |
outEdges:Boolean — Whether to yield edges whose source port is connected to the portOwner.
|
Iterable — An iterable that yields the adjacent edges.
|
| getEdgesAtPortOwner | () | method |
public function getEdgesAtPortOwner(portOwner:IPortOwner, inEdges:Boolean, outEdges:Boolean):IterableEnumerates all edges that are incident to ports owned by the given owner.
Parameters
portOwner:IPortOwner — The item that owns the ports.
| |
inEdges:Boolean — Whether to yield edges whose target port is connected to the portOwner.
| |
outEdges:Boolean — Whether to yield edges whose source port is connected to the portOwner.
|
Iterable — An iterable that yields the adjacent edges.
|
| removeBend | () | method |
public function removeBend(bend:IBend):voidRemoves the bend from its edge.
Parameters
bend:IBend — The bend.
|
| removeEdge | () | method |
public function removeEdge(edge:IEdge):voidRemove an edge from the current set of edges.
Parameters
edge:IEdge — The edge to remove.
|
| removeLabel | () | method |
public function removeLabel(label:ILabel):voidRemove a label from its owner.
Parameters
label:ILabel — The label to remove.
|
| removeNode | () | method |
public function removeNode(node:INode):voidRemove a node from the current set of nodes.
Parameters
node:INode — The node to remove.
|
| removePort | () | method |
public function removePort(port:IPort):voidRemoves the port from its owner.
Parameters
port:IPort — The port to be removed.
|
| setEdgeStyle | () | method |
public function setEdgeStyle(edge:IEdge, style:IEdgeStyle):voidAssociates the style with the given edge.
Parameters
edge:IEdge — The edge to associate the style with.
| |
style:IEdgeStyle — The new style instance.
|
| setLabelModelParameter | () | method |
public function setLabelModelParameter(label:ILabel, parameter:ILabelModelParameter):voidSets the label model parameter for the given label.
Parameters
label:ILabel — The label.
| |
parameter:ILabelModelParameter — The new parameter.
|
| setLabelStyle | () | method |
public function setLabelStyle(label:ILabel, style:ILabelStyle):voidAssociates the style with the given label.
Parameters
label:ILabel — The label to associate the style with.
| |
style:ILabelStyle — The new style instance.
|
| setLabelText | () | method |
public function setLabelText(label:ILabel, text:String):voidSets the label text for a given label to the specified text.
Parameters
label:ILabel — The label.
| |
text:String — The text.
|
| setNodeStyle | () | method |
public function setNodeStyle(node:INode, style:INodeStyle):voidAssociates the style with the given node.
Parameters
node:INode — The node to associate the style with.
| |
style:INodeStyle — The new style instance.
|
| setPortLocationModelParameter | () | method |
public function setPortLocationModelParameter(port:IPort, locationModelParameter:IPortLocationModelParameter):voidSets the location model parameter for the given port.
Parameters
port:IPort — The port to set the parameter.
| |
locationModelParameter:IPortLocationModelParameter — The new location model parameter for the port.
|
| setPorts | () | method |
public function setPorts(edge:IEdge, sourcePort:IPort, targetPort:IPort):voidSets the ports of the given edge to the new values. Both ports and the edge are already live in this graph.
Parameters
edge:IEdge — The edge to change the ports.
| |
sourcePort:IPort — The new source port instance.
| |
targetPort:IPort — The new target port instance.
|
| setPortStyle | () | method |
public function setPortStyle(port:IPort, style:IPortStyle):voidAssociates the style with the given port.
Parameters
port:IPort — The port to associate the style with.
| |
style:IPortStyle — The new style instance.
|