| Package | com.yworks.graph.model |
| Class | public class DefaultGraph |
| Inheritance | DefaultGraph flash.events.EventDispatcher |
| Implements | IGraph, IMutableLookup |
IGraph interface.
This class uses an instance of IGraphStructure to delegate the
actual work of holding the structure of the graph to.
This implementation deals with the proper firing of events and handling default values.
This implementation has inherent support for undoability.
If the undoEngineEnabled property is set to true,
changes to the structure of the graph will automatically be recorded using
the UndoEngine instance that can be queried from this instance's lookup method.
Clients that wish to enqueue custom undo events or that need to make non-structural changes to the graph
can use the IUndoSupport implementation to do so.
An implementation of this interface can also be queried using the lookup method of this instance.
Also there is an implementation of IGraphUndoUnitSupport in the lookup that will be used
by this instance to create the actual undo units for structural changes in the graph's structure.
If clients need to customize these events, they can decorate the lookup of this instance
and wrap the provided implementation.
This implementation also carries an instance of IMapperRegistry
in its ILookup. It can be used to register IMapper instances with the graph.
| Property | Defined by | ||
|---|---|---|---|
| autoAdjustPreferredLabelSize : Boolean
Whether to automatically adjust the preferred size of a label.
| DefaultGraph | ||
| autoCleanupPorts : Boolean
Determines whether unused ports should automatically be removed from their owners
as soon as no further edge is connected to them.
| DefaultGraph | ||
| bends : ICollectionModel
[read-only]
A collection view over the bends of the edges contained in this graph.
| DefaultGraph | ||
| collectionModel : ICollectionModel
[read-only]
Offers a view over all elements that make up the graph.
| DefaultGraph | ||
| defaultEdgeLabelModel : ILabelModel
Gets or sets the DefaultEdgeLabelModel property.
| DefaultGraph | ||
| defaultEdgeLabelModelParameter : ILabelModelParameter
Gets or sets the default
"ILabelModelParameter that will be used for
newly created edge labels if no other parameter is specified. | DefaultGraph | ||
| defaultEdgeLabelStyle : ILabelStyle
Gets or sets the DefaultEdgeLabelModel property.
| DefaultGraph | ||
| defaultEdgeStyle : IEdgeStyle
Gets or sets the defaultEdgeStyle property.
| DefaultGraph | ||
| defaultNodeLabelModel : ILabelModel
Gets or sets the DefaultNodeLabelModel property.
| DefaultGraph | ||
| defaultNodeLabelModelParameter : ILabelModelParameter
Gets or sets the default
"ILabelModelParameter that will be used for
newly created node labels if no other parameter is specified. | DefaultGraph | ||
| defaultNodeLabelStyle : ILabelStyle
Gets or sets the defaultNodeLabelStyle property.
| DefaultGraph | ||
| defaultNodeSize : ISize
Gets or sets the default node size.
| DefaultGraph | ||
| defaultNodeStyle : INodeStyle
Gets or sets the defaultNodeStyle property.
| DefaultGraph | ||
| defaultPortStyle : IPortStyle
Gets or sets the defaultPortStyle property.
| DefaultGraph | ||
| edgeLabels : ICollectionModel
[read-only]
A collection view over the labels attached to edges contained in this graph.
| DefaultGraph | ||
| edges : ICollectionModel
[read-only]
A collection view over the edges contained in this graph.
| DefaultGraph | ||
| groupingSupported : Boolean
Convenience method that enables or disables grouping capabilities
for this instance.
| DefaultGraph | ||
| mapperRegistry : IMapperRegistry
[read-only]
A registry that can be used to store and retrieve arbitrary information for items in this graph.
| DefaultGraph | ||
| nodeLabels : ICollectionModel
[read-only]
A collection view over the labels attached to nodes contained in this graph.
| DefaultGraph | ||
| nodes : ICollectionModel
[read-only]
A collection view over the nodes contained in this graph.
| DefaultGraph | ||
| ports : PortCollectionModel [read-only]
A collection view over the ports contained in this graph.
| DefaultGraph | ||
| shareDefaultEdgeLabelModelParameter : Boolean
Gets or sets a property that determines whether newly
created edge labels should share the currently set
defaultEdgeLabelModelParameter instance. | DefaultGraph | ||
| shareDefaultEdgeLabelStyleInstance : Boolean
Gets or sets a property that determines whether newly created
ports should share the currently set
defaultEdgeLabelStyle. | DefaultGraph | ||
| shareDefaultEdgeStyleInstance : Boolean
Gets or sets a property that determines whether newly created
edges should share the currently set
defaultEdgeStyle. | DefaultGraph | ||
| shareDefaultNodeLabelModelParameter : Boolean
Gets or sets a property that determines whether newly
created node labels should share the currently set
defaultNodeLabelModelParameter instance. | DefaultGraph | ||
| shareDefaultNodeLabelStyleInstance : Boolean
Gets or sets a property that determines whether newly created
ports should share the currently set
defaultNodeLabelStyle. | DefaultGraph | ||
| shareDefaultNodeStyleInstance : Boolean
Gets or sets a property that determines whether newly created
edges labels should share the currently set
defaultEdgeLabelStyle. | DefaultGraph | ||
| shareDefaultPortStyleInstance : Boolean
Gets or sets a property that determines whether newly created
ports should share the currently set
defaultPortStyle. | DefaultGraph | ||
| undoEngineEnabled : Boolean
Determines whether the
UndoEngine used for this instance should be enabled. | DefaultGraph | ||
| usePortCandidateProviders : Boolean
Gets or sets a property that determines whether
createEdgeBetweenNodes
should use IPortCandidateProvider implementations to
find the ports to connect the newly created edge to. | DefaultGraph | ||
| Property | Defined by | ||
|---|---|---|---|
| graphStructure : IGraphStructure
[read-only]
Gets the graphstructure instance used internally.
| DefaultGraph | ||
| Method | Defined by | ||
|---|---|---|---|
|
DefaultGraph(graphStructure:IGraphStructure = null)
Creates a new instance of a graph that provides an
ILookupDecorator for all of its entities. | DefaultGraph | ||
|
Adds a bend at the given index to the given edge using the coordinates provided.
| DefaultGraph | ||
|
addLabel(item:ILabeledItem, text:String, parameter:ILabelModelParameter = null, style:ILabelStyle = null):ILabel
Add a label to the given item using the text as the initial label text and label model parameter and style.
| DefaultGraph | ||
|
addLookup(lookup:IContextLookupChainLink):void
Adds the chain element to the lookup for this instance.
| DefaultGraph | ||
|
Add a port to the given port owner using the coordinates as the new initial position of
he port anchor.
| DefaultGraph | ||
|
adjustPreferredSize(label:ILabel):void
Adjusts the
ILabel.preferredSize property of a label to
fit the suggested size of its ILabelStyleRenderer. | DefaultGraph | ||
|
clear():void
Clears the internal queue.
| DefaultGraph | ||
|
clearBends(edge:IEdge):void
Removes all bends from the given edge.
| DefaultGraph | ||
|
contains(item:IModelItem):Boolean
Determines whether this instance contains the given element.
| DefaultGraph | ||
|
Creates and returns an edge that connects to the given port instances.
| DefaultGraph | ||
|
Convenience method that creates and returns an edge that connects to the given node instances using the
given style instance.
| DefaultGraph | ||
|
Creates and returns a node using default values for the style and the specified initial geometry.
| DefaultGraph | ||
|
createNodeAt(x:Number, y:Number):INode
Creates and returns a node using default values for the style and the specified initial geometry.
| DefaultGraph | ||
|
Returns an
Iterable for all edges that are adjacent to the given
port as a IEdge.sourcePort or IEdge.targetPort. | DefaultGraph | ||
|
Returns an
Iterable for all edges that have the given port owner as their
IEdge.targetPort's or IEdge.sourcePort's. | DefaultGraph | ||
|
Calculates the bounds of this graph using the
INode.layout, source port and target port IPort.location | DefaultGraph | ||
|
Returns an
Iterable for all edges that have the given port as a
IEdge.targetPort. | DefaultGraph | ||
|
Returns an
Iterable for all edges that have the given port owner as their
IEdge.targetPort's IPort.owner. | DefaultGraph | ||
|
invalidateDisplays():void
Triggers the displaysInvalidated event.
| DefaultGraph | ||
|
lookup(type:Class):Object
Returns an instance that implements the given type or
null. | DefaultGraph | ||
|
Returns an
Iterable for all edges that have the given port as a
IEdge.sourcePort. | DefaultGraph | ||
|
Returns an
Iterable for all edges that have the given port owner as their
IEdge.sourcePort's IPort.owner. | DefaultGraph | ||
|
registerLookup(type:Class, instance:Object):void
Register an implementation for the given type that should be returned
when
lookup is called with this given type. | DefaultGraph | ||
|
removeBend(bend:IBend):void
Removes the given bend instance from its edge.
| DefaultGraph | ||
|
removeEdge(edge:IEdge):void
Removes the given edge instance from this graph.
| DefaultGraph | ||
|
removeLabel(label:ILabel):void
Removes the given label from its owner.
| DefaultGraph | ||
|
removeLookup(lookup:IContextLookupChainLink):void
Removes a previously added lookup chain element from the lookup of
this. | DefaultGraph | ||
|
removeNode(node:INode):void
Removes the given node instance from this graph.
| DefaultGraph | ||
|
removePort(port:IPort):void
Removes the port from its owner.
| DefaultGraph | ||
|
setBendLocation(bend:IBend, x:Number, y:Number):void
Modifies the location of the given bend.
| DefaultGraph | ||
|
Sets the bounds of the given node to the new values.
| DefaultGraph | ||
|
Assigns the given style instance by reference to the edge.
| DefaultGraph | ||
|
Sets the label model parameter for the given label.
| DefaultGraph | ||
|
Assigns the given style instance by reference to the label.
| DefaultGraph | ||
|
setLabelText(label:ILabel, text:String):void
Sets the label text of the given label.
| DefaultGraph | ||
|
Assigns the given style instance by reference to the node.
| DefaultGraph | ||
|
setPortLocation(port:IPort, x:Number, y:Number):void
Sets the coordinates of the given port to the given values.
| DefaultGraph | ||
|
Sets the ports of the given edge to the new values.
| DefaultGraph | ||
|
Assigns the given style instance by reference to the port.
| DefaultGraph | ||
|
setPreferredSize(label:ILabel, width:Number, height:Number):void
Sets the preferred size of the label.
| DefaultGraph | ||
| Method | Defined by | ||
|---|---|---|---|
|
Factory method for the defaultEdgeLabelModel property.
| DefaultGraph | ||
|
Factory method that obtains a
ILabelModelParameter
to use for a newly created edge label. | DefaultGraph | ||
|
Factory method for the DefaultEdgeLabelStyle property.
| DefaultGraph | ||
|
Factory method for the defaultEdgeStyle property.
| DefaultGraph | ||
|
Factory method for the defaultNodeLabelModel property.
| DefaultGraph | ||
|
Factory method that obtains a
ILabelModelParameter
to use for a newly created node label. | DefaultGraph | ||
|
Factory method for the DefaultNodeLabelStyle property.
| DefaultGraph | ||
|
Factory method for the DefaultNodeStyle property.
| DefaultGraph | ||
|
Factory method for the DefaultPortStyle property.
| DefaultGraph | ||
|
Factory method that creates and returns a label model parameter to use for newly created
edge labels.
| DefaultGraph | ||
|
Factory callback that returns an
ILabelStyle for newly created edge labels. | DefaultGraph | ||
|
Factory callback that returns an
IEdgeStyle for newly created edges. | DefaultGraph | ||
|
Factory method that creates and returns a label model parameter to use for newly created
node labels.
| DefaultGraph | ||
|
Factory callback that returns an
ILabelStyle for newly created node labels. | DefaultGraph | ||
|
Factory callback that returns an
INodeStyle for newly created nodes. | DefaultGraph | ||
|
Factory callback that returns an
IPortStyle for newly created ports. | DefaultGraph | ||
|
Creates an
UndoEngine instance that automatically triggers
invalidateDisplays() upon each invocation of UndoEngine.undo()
and UndoEngine.Redo. | DefaultGraph | ||
|
Creates the
IUndoSupport instance that can be found in the lookup
of this instance. | DefaultGraph | ||
|
Determines a
IPort instance to use for the creation
of a new edge that starts at the given node. | DefaultGraph | ||
|
Determines a
IPort instance to use for the creation
of a new edge that ends at the given node. | DefaultGraph | ||
|
Called when a bend is going to be added to an edge.
| DefaultGraph | ||
|
Callback method that will be called just before an edge label is added to a edge.
| DefaultGraph | ||
|
Callback method that will be called just before a node label is added to a node.
| DefaultGraph | ||
|
Called when a port is going to be added to a node.
| DefaultGraph | ||
|
onBendAdded(bend:IBend):void
Callback that is invoked after a bend has been added to this graph's structure.
| DefaultGraph | ||
|
Callback method that is inovked just after a bend has been removed from its edge.
| DefaultGraph | ||
|
onChangingEdge(edge:IEdge):void
Callback that is invoked before an edge will change.
| DefaultGraph | ||
|
onChangingLabel(label:ILabel):void
Callback that is invoked before a label will change.
| DefaultGraph | ||
|
onChangingNode(node:INode):void
Callback that is invoked before a node will change.
| DefaultGraph | ||
|
onChangingPort(port:IPort):void
Callback that is invoked before a port is being changed.
| DefaultGraph | ||
|
onCreatingEdge(edge:IEdge):void
Callback that is invoked before the edge is added to this graph's structure.
| DefaultGraph | ||
|
onCreatingNode(node:INode):void
Callback that is invoked before the node is added to this graph's structure.
| DefaultGraph | ||
|
onEdgeChanged(edge:IEdge):void
Callback that is invoked after an edge has changed.
| DefaultGraph | ||
|
onEdgeCreated(edge:IEdge):void
Callback that triggers the
GraphEvent.GRAPH_CHANGED event with the
GraphEventKind.EDGE_CREATED type. | DefaultGraph | ||
|
onEdgeLabelAdded(label:ILabel):void
Called after a label has been added to an edge.
| DefaultGraph | ||
|
Called after a label has been removed from its edge.
| DefaultGraph | ||
|
onEdgeRemoved(edge:IEdge):void
Callback that triggers the
GraphEvent.GRAPH_CHANGED event with the
GraphEventKind.EDGE_REMOVED type. | DefaultGraph | ||
|
onInvalidateDisplays():void
Triggers the
displaysInvalidated event. | DefaultGraph | ||
|
onLabelChanged(label:ILabel):void
Callback that is invoked after a label has changed.
| DefaultGraph | ||
|
onNodeChanged(node:INode):void
Callback that is invoked after a node has changed.
| DefaultGraph | ||
|
onNodeCreated(node:INode):void
Callback that triggers the
GraphEvent.GRAPH_CHANGED event with the
GraphEventKind.NODE_CREATED type. | DefaultGraph | ||
|
onNodeLabelAdded(label:ILabel):void
Called after a label has been added to a node.
| DefaultGraph | ||
|
Called after a label has been removed from its node.
| DefaultGraph | ||
|
onNodeRemoved(node:INode):void
Callback that triggers the
GraphEvent.GRAPH_CHANGED event with the
GraphEventKind.NODE_REMOVED type. | DefaultGraph | ||
|
onPortAdded(port:IPort):void
Called when a port has been added to a node.
| DefaultGraph | ||
|
onPortChanged(port:IPort):void
Callback that is invoked after a port has changed.
| DefaultGraph | ||
|
Callback method that is called just after a port has been removed from its owner.
| DefaultGraph | ||
|
onRemovingBend(bend:IBend):void
Callback method that is invoked just before a bend is removed.
| DefaultGraph | ||
|
onRemovingEdge(edge:IEdge):void
Callback that is invoked before the edge is removed from this graph's structure.
| DefaultGraph | ||
|
onRemovingEdgeLabel(label:ILabel):void
Callback method that will be called just before an edge label is removed from its edge.
| DefaultGraph | ||
|
onRemovingNode(node:INode):void
Callback that is invoked before the node is removed from this graph's structure.
| DefaultGraph | ||
|
onRemovingNodeLabel(label:ILabel):void
Callback method that will be called just before a node label is removed from its node.
| DefaultGraph | ||
|
onRemovingPort(port:IPort):void
Callback method that is called just before a port
will be removed.
| DefaultGraph | ||
| Constant | Defined by | ||
|---|---|---|---|
| MAPPER_KEY_EDGE_2_ID : String = "edge-2-id" [static]
Key for an
IMapper which maps the graph's edges to an ID
| DefaultGraph | ||
| MAPPER_KEY_NODE_2_ID : String = "node-2-id" [static]
Key for an
IMapper which maps the graph's nodes to an ID
| DefaultGraph | ||
| autoAdjustPreferredLabelSize | property |
autoAdjustPreferredLabelSize:Boolean [read-write]Whether to automatically adjust the preferred size of a label.
On a call to setLabelText or setLabelStyle>/code>, the
preferred size of the label will automatically be adjusted to the preferred size that
is suggested by the label's style renderer, if this property is set to true.
The default value is true.
public function get autoAdjustPreferredLabelSize():Boolean
public function set autoAdjustPreferredLabelSize(value:Boolean):void
See also
| autoCleanupPorts | property |
autoCleanupPorts:Boolean [read-write]Determines whether unused ports should automatically be removed from their owners as soon as no further edge is connected to them.
The default value is true.
public function get autoCleanupPorts():Boolean
public function set autoCleanupPorts(value:Boolean):void
See also
| bends | property |
bends:ICollectionModel [read-only]A collection view over the bends of the edges contained in this graph.
This is a readonly live view of the entities, i.e. the same reference will be returned for each invocation, that always represents the current state of the graph.
Implementation public function get bends():ICollectionModel
| collectionModel | property |
collectionModel:ICollectionModel [read-only]Offers a view over all elements that make up the graph. This is a combined view of all nodes, edges, labels, ports, and bends.
Implementation public function get collectionModel():ICollectionModel
| defaultEdgeLabelModel | property |
defaultEdgeLabelModel:ILabelModel [read-write]Gets or sets the DefaultEdgeLabelModel property.
If the field has not yet been initialized upon first access, the
factory method createDefaultEdgeLabelModel will be called.
This property can be used as the source for data binding.
Implementation public function get defaultEdgeLabelModel():ILabelModel
public function set defaultEdgeLabelModel(value:ILabelModel):void
| defaultEdgeLabelModelParameter | property |
defaultEdgeLabelModelParameter:ILabelModelParameter [read-write]
Gets or sets the default "ILabelModelParameter that will be used for
newly created edge labels if no other parameter is specified.
Depending on the setting of shareDefaultEdgeLabelModelParameter, this
implementation will use the same instance for each newly created label or will create a clone of it.
public function get defaultEdgeLabelModelParameter():ILabelModelParameter
public function set defaultEdgeLabelModelParameter(value:ILabelModelParameter):void
| defaultEdgeLabelStyle | property |
defaultEdgeLabelStyle:ILabelStyle [read-write]Gets or sets the DefaultEdgeLabelModel property.
If the field has not yet been initialized upon first access, the
factory method createDefaultEdgeLabelModel will be called.
This property can be used as the source for data binding.
Implementation public function get defaultEdgeLabelStyle():ILabelStyle
public function set defaultEdgeLabelStyle(value:ILabelStyle):void
| defaultEdgeStyle | property |
defaultEdgeStyle:IEdgeStyle [read-write]Gets or sets the defaultEdgeStyle property.
By default this field is populated with an instance of ISPolylineEdgeStyle.
If the field has not yet been initialized upon first access, the
factory method createDefaultEdgeStyle will be called.
This property can be used as the source for data binding.
Implementation public function get defaultEdgeStyle():IEdgeStyle
public function set defaultEdgeStyle(value:IEdgeStyle):void
| defaultNodeLabelModel | property |
defaultNodeLabelModel:ILabelModel [read-write]Gets or sets the DefaultNodeLabelModel property.
If the field has not yet been initialized upon first access, the
factory method createDefaultNodeLabelModel will be called.
This property can be used as the source for data binding.
Implementation public function get defaultNodeLabelModel():ILabelModel
public function set defaultNodeLabelModel(value:ILabelModel):void
| defaultNodeLabelModelParameter | property |
defaultNodeLabelModelParameter:ILabelModelParameter [read-write]
Gets or sets the default "ILabelModelParameter that will be used for
newly created node labels if no other parameter is specified.
Depending on the setting of shareDefaultNodeLabelModelParameter, this
implementation will use the same instance for each newly created label or will create a clone of it.
public function get defaultNodeLabelModelParameter():ILabelModelParameter
public function set defaultNodeLabelModelParameter(value:ILabelModelParameter):void
| defaultNodeLabelStyle | property |
defaultNodeLabelStyle:ILabelStyle [read-write]Gets or sets the defaultNodeLabelStyle property.
If the field has not yet been initialized upon first access, the
factory method createDefaultNodeLabelStyle will be called.
This property can be used as the source for data binding.
Implementation public function get defaultNodeLabelStyle():ILabelStyle
public function set defaultNodeLabelStyle(value:ILabelStyle):void
| defaultNodeSize | property |
defaultNodeSize:ISize [read-write]Gets or sets the default node size.
The values of this size will be used by the createNode
and createNodeAt methods.
public function get defaultNodeSize():ISize
public function set defaultNodeSize(value:ISize):void
| defaultNodeStyle | property |
defaultNodeStyle:INodeStyle [read-write]Gets or sets the defaultNodeStyle property.
By default this field is populated with an instance of IShapeNodeStyle.
If the field has not yet been initialized upon first access, the
factory method createDefaultNodeStyle will be called.
This property can be used as the source for data binding.
Implementation public function get defaultNodeStyle():INodeStyle
public function set defaultNodeStyle(value:INodeStyle):void
| defaultPortStyle | property |
defaultPortStyle:IPortStyle [read-write]Gets or sets the defaultPortStyle property.
If the field has not yet been initialized upon first access, the
factory method createDefaultNodeStyle will be called.
This property can be used as the source for data binding.
Implementation public function get defaultPortStyle():IPortStyle
public function set defaultPortStyle(value:IPortStyle):void
| edgeLabels | property |
edgeLabels:ICollectionModel [read-only]A collection view over the labels attached to edges contained in this graph.
This is a readonly live view of the entities, i.e. the same reference will be returned for each invocation, that always represents the current state if the graph.
Implementation public function get edgeLabels():ICollectionModel
| edges | property |
edges:ICollectionModel [read-only]A collection view over the edges contained in this graph.
This is a readonly live view of the entities, i.e. the same reference will be returned for each invocation, that always represents the current state of the graph.
Implementation public function get edges():ICollectionModel
| graphStructure | property |
graphStructure:IGraphStructure [read-only]Gets the graphstructure instance used internally.
This is a convenience for subclass implementations.
Implementation protected function get graphStructure():IGraphStructure
| groupingSupported | property |
groupingSupported:Boolean [read-write]Convenience method that enables or disables grouping capabilities for this instance.
If this property is set to true, an instance of
IGroupedGraph can be queried from this instance's
lookup method.
public function get groupingSupported():Boolean
public function set groupingSupported(value:Boolean):void
See also
| mapperRegistry | property |
mapperRegistry:IMapperRegistry [read-only]A registry that can be used to store and retrieve arbitrary information for items in this graph.
Implementation public function get mapperRegistry():IMapperRegistry
| nodeLabels | property |
nodeLabels:ICollectionModel [read-only]A collection view over the labels attached to nodes contained in this graph.
This is a readonly live view of the entities, i.e. the same reference will be returned for each invocation, that always represents the current state if the graph.
Implementation public function get nodeLabels():ICollectionModel
| nodes | property |
nodes:ICollectionModel [read-only]A collection view over the nodes contained in this graph.
This is a readonly live view of the nodes, i.e. the same reference will be returned for each invocation, that always represents the current state of the graph.
Implementation public function get nodes():ICollectionModel
| ports | property |
ports:PortCollectionModel [read-only]A collection view over the ports contained in this graph.
This is a readonly live view of the entities, i.e. the same reference will be returned for each invocation, that always represents the current state of the graph.
Implementation public function get ports():PortCollectionModel
| shareDefaultEdgeLabelModelParameter | property |
shareDefaultEdgeLabelModelParameter:Boolean [read-write]
Gets or sets a property that determines whether newly
created edge labels should share the currently set defaultEdgeLabelModelParameter instance.
If this property is set to false, the factory method createEdgeLabelModelParameter
used by the creational methods will try to clone the currently set parameter instance instead of returning
it directly.
The default value is false.
public function get shareDefaultEdgeLabelModelParameter():Boolean
public function set shareDefaultEdgeLabelModelParameter(value:Boolean):void
| shareDefaultEdgeLabelStyleInstance | property |
shareDefaultEdgeLabelStyleInstance:Boolean [read-write]
Gets or sets a property that determines whether newly created
ports should share the currently set defaultEdgeLabelStyle.
If this property is set to false, the createEdgeLabelStyle factory
method used by the creational method will try to clone the currently
set style instance instead of returning it directly.
The default value is false.
public function get shareDefaultEdgeLabelStyleInstance():Boolean
public function set shareDefaultEdgeLabelStyleInstance(value:Boolean):void
| shareDefaultEdgeStyleInstance | property |
shareDefaultEdgeStyleInstance:Boolean [read-write]
Gets or sets a property that determines whether newly created
edges should share the currently set defaultEdgeStyle.
If this property is set to false, the createEdgeStyle factory
method used by the creational method will try to clone the currently
set style instance instead of returning it directly.
The default value is false.
public function get shareDefaultEdgeStyleInstance():Boolean
public function set shareDefaultEdgeStyleInstance(value:Boolean):void
| shareDefaultNodeLabelModelParameter | property |
shareDefaultNodeLabelModelParameter:Boolean [read-write]
Gets or sets a property that determines whether newly
created node labels should share the currently set defaultNodeLabelModelParameter instance.
If this property is set to false, the factory method createNodeLabelModelParameter
used by the creational methods will try to clone the currently set parameter instance instead of returning
it directly.
The default value is false.
public function get shareDefaultNodeLabelModelParameter():Boolean
public function set shareDefaultNodeLabelModelParameter(value:Boolean):void
| shareDefaultNodeLabelStyleInstance | property |
shareDefaultNodeLabelStyleInstance:Boolean [read-write]
Gets or sets a property that determines whether newly created
ports should share the currently set defaultNodeLabelStyle.
If this property is set to false, the createNodeLabelStyle factory
method used by the creational method will try to clone the currently
set style instance instead of returning it directly.
The default value is false.
public function get shareDefaultNodeLabelStyleInstance():Boolean
public function set shareDefaultNodeLabelStyleInstance(value:Boolean):void
| shareDefaultNodeStyleInstance | property |
shareDefaultNodeStyleInstance:Boolean [read-write]
Gets or sets a property that determines whether newly created
edges labels should share the currently set defaultEdgeLabelStyle.
If this property is set to false, the createEdgeLabelStyle factory
method used by the creational method will try to clone the currently
set style instance instead of returning it directly.
The default value is false.
public function get shareDefaultNodeStyleInstance():Boolean
public function set shareDefaultNodeStyleInstance(value:Boolean):void
| shareDefaultPortStyleInstance | property |
shareDefaultPortStyleInstance:Boolean [read-write]
Gets or sets a property that determines whether newly created
ports should share the currently set defaultPortStyle.
If this property is set to false, the createPortStyle factory
method used by the creational method will try to clone the currently
set style instance instead of returning it directly.
The default value is false.
public function get shareDefaultPortStyleInstance():Boolean
public function set shareDefaultPortStyleInstance(value:Boolean):void
| undoEngineEnabled | property |
undoEngineEnabled:Boolean [read-write]
Determines whether the UndoEngine used for this instance should be enabled.
In order to enable undoability for this instance, set this property to true
and lookup the UndoEngine type.
The default value is false.
public function get undoEngineEnabled():Boolean
public function set undoEngineEnabled(value:Boolean):void
| usePortCandidateProviders | property |
usePortCandidateProviders:Boolean [read-write]
Gets or sets a property that determines whether
createEdgeBetweenNodes
should use IPortCandidateProvider implementations to
find the ports to connect the newly created edge to.
If this property is set to true the implementation
in getNewSourcePort and getNewTargetPort
will try to query an IPortCandidateProvider from the
respective nodes in order to determine what ports to use.
If no such provider can be found or no suitable candidate can be found
this implementation will add a new portto the nodes.
The default value is false.
public function get usePortCandidateProviders():Boolean
public function set usePortCandidateProviders(value:Boolean):void
| DefaultGraph | () | constructor |
public function DefaultGraph(graphStructure:IGraphStructure = null)
Creates a new instance of a graph that provides an ILookupDecorator for all of its entities.
graphStructure:IGraphStructure (default = null) — An IGraphStructure implementation this Graph is based on.
If none is provided, a new instance will be created. Note that this instance
is not an instance of DefaultGraphStructure
|
| addBend | () | method |
public function addBend(edge:IEdge, index:int, x:Number, y:Number):IBendAdds a bend at the given index to the given edge using the coordinates provided. The added instance will be returned.
Parametersedge:IEdge — The edge to which the bend will be added.
|
|
index:int — The index for the newly added bend.
|
|
x:Number — The x-coordinate to use for the newly created bend.
|
|
y:Number — The y-coordinate to use for the newly created bend.
|
IBend —
A newly created live bend.
|
| addLabel | () | method |
public function addLabel(item:ILabeledItem, text:String, parameter:ILabelModelParameter = null, style:ILabelStyle = null):ILabelAdd a label to the given item using the text as the initial label text and label model parameter and style.
Parametersitem:ILabeledItem — The item to add the label to.
|
|
text:String — The initial text of the label
|
|
parameter:ILabelModelParameter (default = null) — The label model parameter instance to use. If null, default label model parameters will be used.
|
|
style:ILabelStyle (default = null) — The style to use for the label. If null a default label style will be used.
|
ILabel —
The newly created label.
|
| addLookup | () | method |
public function addLookup(lookup:IContextLookupChainLink):voidAdds the chain element to the lookup for this instance.
Parameterslookup:IContextLookupChainLink — The lookup to decorate the current instance with.
|
| addPort | () | method |
public function addPort(portOwner:IPortOwner, x:Number, y:Number):IPortAdd a port to the given port owner using the coordinates as the new initial position of he port anchor.
Depending on the implementation this method may throw an IllegalOperationError
if the type of the portOwner instance does not support adding of ports.
This will trigger the nodeChanged or edgeChanged
event correspondingly.
portOwner:IPortOwner — The owner to add the port instance to.
|
|
x:Number — the new absolute x coordinate in the world coordinate system.
|
|
y:Number — the new absolute y coordinate in the world coordinate system.
|
IPort —
the newly created port
|
| adjustPreferredSize | () | method |
public function adjustPreferredSize(label:ILabel):void
Adjusts the ILabel.preferredSize property of a label to
fit the suggested size of its ILabelStyleRenderer.
This implementation uses the style's renderer for the label to determine the preferred rendering size. This is useful after the label's content or style have been changed. Parameters
label:ILabel — The label to adjust the size for.
|
See also
| clear | () | method |
public function clear():voidClears the internal queue.
| clearBends | () | method |
public function clearBends(edge:IEdge):voidRemoves all bends from the given edge.
The edge must be part of this graph at the time of the incovation. This will trigger the corresponding events.
Parametersedge:IEdge — The edge whose bends will be removed.
|
| contains | () | method |
public function contains(item:IModelItem):BooleanDetermines whether this instance contains the given element.
Parametersitem:IModelItem — the element.
|
Boolean — true if this instance contains the element.
|
| createDefaultEdgeLabelModel | () | method |
protected function createDefaultEdgeLabelModel():ILabelModel
Factory method for the defaultEdgeLabelModel property. This method will be called
upon first access to the defaultEdgeLabelModel property.
ILabelModel —
A new instance of ILabelModel.
|
| createDefaultEdgeLabelModelParameter | () | method |
protected function createDefaultEdgeLabelModelParameter():ILabelModelParameter
Factory method that obtains a ILabelModelParameter
to use for a newly created edge label.
This implementation returns the default parameter for the current
defaultEdgeLabelModel
ILabelModelParameter —
A new instance of DefaultEdgeLabelModelParameter
|
See also
| createDefaultEdgeLabelStyle | () | method |
protected function createDefaultEdgeLabelStyle():ILabelStyle
Factory method for the DefaultEdgeLabelStyle property. This method will be called
upon first access to the defaultEdgeLabelStyle property.
ILabelStyle —
A new instance of ILabelStyle.
|
| createDefaultEdgeStyle | () | method |
protected function createDefaultEdgeStyle():IEdgeStyle
Factory method for the defaultEdgeStyle property. This method will be called
upon first access to the defaultEdgeStyle property.
IEdgeStyle —
A new instance of IEdgeStyle.
|
| createDefaultNodeLabelModel | () | method |
protected function createDefaultNodeLabelModel():ILabelModel
Factory method for the defaultNodeLabelModel property. This method will be called
upon first access to the defaultNodeLabelModel property.
ILabelModel —
A new instance of ILabelModel.
|
| createDefaultNodeLabelModelParameter | () | method |
protected function createDefaultNodeLabelModelParameter():ILabelModelParameter
Factory method that obtains a ILabelModelParameter
to use for a newly created node label.
This implementation returns the default parameter for the current
defaultNodeLabelModel
ILabelModelParameter —
A new instance of DefaultNodeLabelModelParameter
|
See also
| createDefaultNodeLabelStyle | () | method |
protected function createDefaultNodeLabelStyle():ILabelStyle
Factory method for the DefaultNodeLabelStyle property. This method will be called
upon first access to the defaultNodeLabelStyle property.
ILabelStyle —
A new instance of ILabelStyle.
|
| createDefaultNodeStyle | () | method |
protected function createDefaultNodeStyle():INodeStyle
Factory method for the DefaultNodeStyle property. This method will be called
upon first access to the defaultNodeStyle property.
INodeStyle —
A new instance of INodeStyle.
|
| createDefaultPortStyle | () | method |
protected function createDefaultPortStyle():IPortStyle
Factory method for the DefaultPortStyle property. This method will be called
upon first access to the defaultPortStyle property.
IPortStyle —
A new instance of IPortStyle.
|
| createEdge | () | method |
public function createEdge(sourcePort:IPort, targetPort:IPort, style:IEdgeStyle = null):IEdgeCreates and returns an edge that connects to the given port instances.
The ports must be part of this graph at the time of the invocation. The edge will be a part of this graph after the method returns. This will trigger the corresponding events.
ParameterssourcePort:IPort — The source port the created edge will connect to.
|
|
targetPort:IPort — The target port the created edge will connect to.
|
|
style:IEdgeStyle (default = null) — The style instance that will be assigned to the newly created instance.
If null, a default style will be used.
|
IEdge —
A newly created edge instance
|
| createEdgeBetweenNodes | () | method |
public function createEdgeBetweenNodes(sourceNode:INode, targetNode:INode, style:IEdgeStyle = null):IEdgeConvenience method that creates and returns an edge that connects to the given node instances using the given style instance.
The nodes must be part
of this graph at the time of the invocation, and the implementation will choose the
The edge will be a part of this graph after the method returns.
This will trigger the corresponding events.
sourceNode:INode — The source node the created edge will connect to. It is up to the implementation
to decide which port to use at the given node. The implementation may create a new port of the edge.
|
|
targetNode:INode — he target node the created edge will connect to. It is up to the implementation
to decide which port to use at the given node. The implementation may create a new port of the edge.
|
|
style:IEdgeStyle (default = null) — The style instance that will be assigned to the newly created instance.
If null, a default style will be used.
|
IEdge —
the newly created edge instance
|
| createEdgeCore | () | method |
yworks_internal function createEdgeCore(edge:IEdge, sourcePort:IPort, targetPort:IPort, style:IEdgeStyle):voidParameters
edge:IEdge |
|
sourcePort:IPort |
|
targetPort:IPort |
|
style:IEdgeStyle |
| createEdgeLabelModelParameter | () | method |
protected function createEdgeLabelModelParameter():ILabelModelParameterFactory method that creates and returns a label model parameter to use for newly created edge labels.
Depending on the value of the shareDefaultEdgeLabelModelParameter
this method will simply return the defaultEdgeLabelModelParameter or create
a ICloneable.clone of it.
ILabelModelParameter —
A newly created label model parameter for edge labels
|