ILinksModel
A model that supports directed link relationships between nodes, with the relationship information stored in separate link data structures.
Implementa: IDiagramModel
Propiedades
LinksSource : IEnumerable
The collection of link data objects
ValidCycle : ValidCycle
This property controls the overall graph structure that may be drawn.
ValidUnconnectedLinks : ValidUnconnectedLinks
This property controls whether link data must always connect to node data at both ends of the link.
Métodos
AddLinkCopy(object) : object
Add a copy of a link data to this model.
- linkdata
Devuelve: the newly copied link data
DoLinkAdded(object)
This method should be called when a link data has been added to the LinksSource collection.
- linkdata
DoLinkLabelChanged(object)
This method must be called when any "label" node is added, removed, or replaced.
- linkdata
DoLinkPortsChanged(object)
This method must be called when either the "from" or the "to" node (or port) has changed.
- linkdata
- a link data
DoLinkRemoved(object)
This method should be called when a link data has been removed from the LinksSource collection.
- linkdata
GetCategoryForLink(object) : string
To help distinguish between different kinds of links, each link has a "category" that is just a string.
- linkdata
Devuelve: the default category is the empty string
GetFromLinksForNode(object) : IEnumerable<object>
Find all links coming into a given node.
- nodedata
Devuelve: a sequence of link data
GetFromNodeForLink(object) : object
Returns the node from which a link comes.
- linkdata
Devuelve: a node data
GetFromParameterForLink(object) : object
Returns any "from" port parameter information.
- linkdata
Devuelve: the port parameter data
GetHasLabeledLinkForNode(object) : bool
This predicate is true if the given node data is associated with a link data as a label.
- nodedata
- a node data that is a "label"
GetHasLabelNodeForLink(object) : bool
This predicate is true if the given link data has a node label.
- linkdata
- a link data
GetIsLinkLabelForNode(object) : bool
This predicate is true if the given node data acts as a label for a link.
- nodedata
- a node data
GetLabeledLinkForNode(object) : object
Find the link data with which a label node is associated, if any.
- nodedata
- a node data that is a "label"
Devuelve: a link data, or null if there is none
GetLabelNodeForLink(object) : object
Find the node data that is the label for a link, if there is one.
- linkdata
- a link data
Devuelve: a node data, or null if there is none
GetLinksBetweenNodes(object, object, object, object) : IEnumerable<object>
Find all links connecting two nodes/ports in one direction.
- fromdata
- a node key identifying the node data from which the link comes
- fromparam
- an optional value identifying which port on the "from" node the link is connected to
- todata
- a node key identify the node data to which the link goes
- toparam
- an optional value identifying which port on the "to" node the link is connected to
Devuelve: a sequence of link data
GetLinksForNode(object, Predicate<object>) : IEnumerable<object>
Find all links connected to a node that satisfy a given predicate.
- nodedata
- predicate
- the predicate takes a single argument, the link data
Devuelve: a sequence of link data
GetLinksForNode(object) : IEnumerable<object>
Find all links connected to a node in either direction.
- nodedata
Devuelve: a sequence of link data
GetToLinksForNode(object) : IEnumerable<object>
Find all links going out of a given node.
- nodedata
Devuelve: a sequence of link data
GetToNodeForLink(object) : object
Returns the node to which a link goes.
- linkdata
Devuelve: a node data
GetToParameterForLink(object) : object
Returns any "to" port parameter information.
- linkdata
Devuelve: the port parameter data
IsLinkData(object) : bool
This predicate is true if the linkdata is in the LinksSource collection.
- linkdata
IsLinkType(object) : bool
This predicate is true if the object is non-null and is of a type that the model accepts for link data.
- linkdata
IsRelinkValid(object, object, object, object, object) : bool
This predicate is true if changing an existing link between two nodes/ports would result in a valid graph
- newfromdata
- a node key identifying the node data from which the new link would come
- newfromparam
- an optional value identifying which port on the "from" node the link would be connected to
- newtodata
- a node key identify the node data to which the new link would go
- newtoparam
- an optional value identifying which port on the "to" node the link would be connected to
- oldlinkdata
- an existing link that would be deleted
SetLinkFromPort(object, object, object)
Set the "from" node and port information for a link data.
- linkdata
- the link data being modified
- nodedata
- a node data
- portparam
SetLinkLabel(object, object)
Change the "label" node data for a link data.
- linkdata
- the link data being modified
- labelnodedata
- the new node data that is a "label"; may be null to remove the label
SetLinkToPort(object, object, object)
Set the "to" node and port information for a link data.
- linkdata
- the link data being modified
- nodedata
- a node data
- portparam