public abstract class AbstractGraphWrapper extends Object implements IGraph, IDisposable
IGraph implementation that delegates all of its work to an existing implementation.
Subclasses can override all of the methods to customize the behavior of this instance. Note that this instance will
register listeners with the wrapped graph instance, so dispose() should be called if this instance is not used
any more.
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractGraphWrapper(IGraph graph)
Creates a new instance that wraps a given
IGraph. |
| Modifier and Type | Method and Description |
|---|---|
IBend |
addBend(IEdge edge,
PointD location,
int index)
Adds a bend at the given index to the given edge using the coordinates provided.
|
void |
addBendAddedListener(IEventHandler<ItemEventArgs<IBend>> bendAddedEvent)
Adds the given listener for the
BendAdded event that occurs when a bend has been added to an edge in this
graph. |
void |
addBendLocationChangedListener(IBendLocationChangedHandler bendLocationChangedEvent)
Adds the given listener for the
BendLocationChanged event that occurs when the location of a bend has been
changed. |
void |
addBendRemovedListener(IEventHandler<BendEventArgs> bendRemovedEvent)
Adds the given listener for the
BendRemoved event that occurs when a bend has been removed from an edge in this
graph. |
void |
addBendTagChangedListener(IEventHandler<ItemChangedEventArgs<IBend,Object>> bendTagChangedEvent)
Adds the given listener for the
BendTagChanged event that occurs when the tag of a
bend has been replaced. |
void |
addDisplaysInvalidatedListener(IEventHandler<IEventArgs> displaysInvalidatedEvent)
Adds the given listener for the
DisplaysInvalidated event that occurs when the graph has changed visually and
the display should be updated to reflect the changes. |
void |
addEdgeCreatedListener(IEventHandler<ItemEventArgs<IEdge>> edgeCreatedEvent)
Adds the given listener for the
EdgeCreated event that occurs when an edge has been created. |
void |
addEdgePortsChangedListener(IEventHandler<EdgeEventArgs> edgePortsChangedEvent)
Adds the given listener for the
EdgePortsChanged event that occurs when an edge had its SourcePort
or TargetPort changed. |
void |
addEdgeRemovedListener(IEventHandler<EdgeEventArgs> edgeRemovedEvent)
Adds the given listener for the
EdgeRemoved event that occurs when an edge has been removed. |
void |
addEdgeStyleChangedListener(IEventHandler<ItemChangedEventArgs<IEdge,IEdgeStyle>> edgeStyleChangedEvent)
Adds the given listener for the
EdgeStyleChanged event that occurs when an edge style has been replaced. |
void |
addEdgeTagChangedListener(IEventHandler<ItemChangedEventArgs<IEdge,Object>> edgeTagChangedEvent)
Adds the given listener for the
EdgeTagChanged event that occurs when the tag of an
edge has been replaced. |
protected void |
addEventHandlers(IGraph graph)
Adds event handlers that propagate graph events from
graph to listeners on this instance. |
void |
addGraphTagChangedListener(IEventHandler<ItemChangedEventArgs<IGraph,Object>> graphTagChangedEvent)
Adds the given listener for the
GraphTagChanged event that occurs when the tag of the
graph has been replaced. |
void |
addIsGroupNodeChangedListener(IEventHandler<NodeEventArgs> isGroupNodeChangedEvent)
Adds the given listener for the
IsGroupNodeChanged
event. |
ILabel |
addLabel(ILabelOwner owner,
String text,
ILabelModelParameter layoutParameter,
ILabelStyle style,
SizeD preferredSize,
Object tag)
Add a label to the given item using the text as the initial label text and label model parameter, style and tag.
|
void |
addLabelAddedListener(IEventHandler<ItemEventArgs<ILabel>> labelAddedEvent)
Adds the given listener for the
LabelAdded event that occurs when a label has been added to this graph
instance. |
void |
addLabelLayoutParameterChangedListener(IEventHandler<ItemChangedEventArgs<ILabel,ILabelModelParameter>> labelLayoutParameterChangedEvent)
Adds the given listener for the
LabelLayoutParameterChanged event that occurs when the model parameter of a
label has been changed. |
void |
addLabelPreferredSizeChangedListener(IEventHandler<ItemChangedEventArgs<ILabel,SizeD>> labelPreferredSizeChangedEvent)
Adds the given listener for the
LabelPreferredSizeChanged event that occurs when the preferred size of a label
has been changed. |
void |
addLabelRemovedListener(IEventHandler<LabelEventArgs> labelRemovedEvent)
Adds the given listener for the
LabelRemoved event that occurs when a label has been removed from this graph
instance. |
void |
addLabelStyleChangedListener(IEventHandler<ItemChangedEventArgs<ILabel,ILabelStyle>> labelStyleChangedEvent)
Adds the given listener for the
LabelStyleChanged event that occurs when a label style has been replaced. |
void |
addLabelTagChangedListener(IEventHandler<ItemChangedEventArgs<ILabel,Object>> labelTagChangedEvent)
Adds the given listener for the
LabelTagChanged event that occurs when the tag of a
label has been replaced. |
void |
addLabelTextChangedListener(IEventHandler<ItemChangedEventArgs<ILabel,String>> labelTextChangedEvent)
Adds the given listener for the
LabelTextChanged event that occurs when the text of a label has been changed. |
void |
addNodeCreatedListener(IEventHandler<ItemEventArgs<INode>> nodeCreatedEvent)
Adds the given listener for the
NodeCreated event that occurs when a node has been created. |
void |
addNodeLayoutChangedListener(INodeLayoutChangedHandler nodeLayoutChangedEvent)
Adds the given listener for the
NodeLayoutChanged event that occurs when a node layout has been changed. |
void |
addNodeRemovedListener(IEventHandler<NodeEventArgs> nodeRemovedEvent)
Adds the given listener for the
NodeRemoved event that occurs when a node has been removed. |
void |
addNodeStyleChangedListener(IEventHandler<ItemChangedEventArgs<INode,INodeStyle>> nodeStyleChangedEvent)
Adds the given listener for the
NodeStyleChanged event that occurs when a node style has been replaced. |
void |
addNodeTagChangedListener(IEventHandler<ItemChangedEventArgs<INode,Object>> nodeTagChangedEvent)
Adds the given listener for the
NodeTagChanged event that occurs when the tag of a
node has been replaced. |
void |
addParentChangedListener(IEventHandler<NodeEventArgs> parentChangedEvent)
Adds the given listener for the
ParentChanged
event. |
IPort |
addPort(IPortOwner owner,
IPortLocationModelParameter locationParameter,
IPortStyle style,
Object tag)
Add a port to the given port owner using the location model parameter, style and tag.
|
void |
addPortAddedListener(IEventHandler<ItemEventArgs<IPort>> portAddedEvent)
Adds the given listener for the
PortAdded event that occurs when a port has been added to this graph instance. |
void |
addPortLocationParameterChangedListener(IEventHandler<ItemChangedEventArgs<IPort,IPortLocationModelParameter>> portLocationParameterChangedEvent)
Adds the given listener for the
PortLocationParameterChanged event that occurs when the location model parameter
of a port has been changed. |
void |
addPortRemovedListener(IEventHandler<PortEventArgs> portRemovedEvent)
Adds the given listener for the
PortRemoved event that occurs when a port has been removed from its
owner. |
void |
addPortStyleChangedListener(IEventHandler<ItemChangedEventArgs<IPort,IPortStyle>> portStyleChangedEvent)
Adds the given listener for the
PortStyleChanged event that occurs when a port style has been replaced. |
void |
addPortTagChangedListener(IEventHandler<ItemChangedEventArgs<IPort,Object>> portTagChangedEvent)
Adds the given listener for the
PortTagChanged event that occurs when the tag of a
port has been replaced. |
boolean |
contains(IModelItem item)
Determines whether this graph contains the specified item.
|
IEdge |
createEdge(INode source,
INode target,
IEdgeStyle style,
Object tag)
Convenience method that creates and returns an edge that connects to the given node instances using the given style
instance.
|
IEdge |
createEdge(IPort sourcePort,
IPort targetPort,
IEdgeStyle style,
Object tag)
Creates and returns an edge that connects to the given port instances.
|
INode |
createGroupNode(INode parent,
RectD layout,
INodeStyle style,
Object tag)
Creates a new group node using the provided style and layout as a child of
parent. |
INode |
createNode(INode parent,
RectD layout,
INodeStyle style,
Object tag)
Creates a new ordinary node as a direct descendant of
parent using the given layout and style. |
INode |
createNode(RectD layout,
INodeStyle style,
Object tag)
Creates and returns a node using the specified values for the initial geometry, style, and
Tag. |
void |
dispose()
Frees resources used by this Disposable on demand.
|
IListEnumerable<IEdge> |
edgesAt(IPort port,
AdjacencyTypes type)
Returns an
Iterable for all edges that are adjacent to the given port as a SourcePort
or TargetPort. |
IListEnumerable<IEdge> |
edgesAt(IPortOwner owner,
AdjacencyTypes type)
Returns an
IListEnumerable for all edges that have the given port owner as their target port's
or source port's Owner depending on the AdjacencyTypes. |
IListEnumerable<INode> |
getChildren(INode node)
Returns an enumerable over the children of the provided node.
|
IEdgeDefaults |
getEdgeDefaults()
Gets the defaults for normal edges.
|
IListEnumerable<IEdge> |
getEdges()
A view of the edges contained in this graph.
|
INodeDefaults |
getGroupNodeDefaults()
Gets the defaults for group nodes.
|
IListEnumerable<ILabel> |
getLabels()
A view of the node and edge labels contained in this graph.
|
ILookup |
getLookup()
Gets the lookup instance to use in
lookup(Class). |
IMapperRegistry |
getMapperRegistry()
Gets the mapper registry that is associated with this graph instance.
|
INodeDefaults |
getNodeDefaults()
Gets the defaults for normal nodes.
|
IListEnumerable<INode> |
getNodes()
A view of the nodes contained in this graph.
|
INode |
getParent(INode node)
Returns the parent node of the node or
null if node is a top-level node. |
IListEnumerable<IPort> |
getPorts()
A view of the ports contained in this graph.
|
Object |
getTag()
Gets the tag associated with this instance.
|
IGraph |
getWrappedGraph()
Gets the graph that has been wrapped by this instance.
|
void |
invalidateDisplays()
Causes the
DisplaysInvalidated event to be triggered. |
boolean |
isGroupNode(INode node)
Returns whether the given node is considered a group node.
|
<TLookup> TLookup |
lookup(Class<TLookup> type)
Returns an instance that implements the given type or
null. |
protected void |
onBendAdded(ItemEventArgs<IBend> args)
Raises the
BendAdded event. |
protected void |
onBendLocationChanged(IBend bend,
PointD oldLocation)
Raises the
BendLocationChanged event. |
protected void |
onBendRemoved(BendEventArgs args)
Raises the
BendRemoved event. |
protected void |
onBendTagChanged(ItemChangedEventArgs<IBend,Object> args)
Raises the
BendTagChanged event. |
protected void |
onEdgeCreated(ItemEventArgs<IEdge> args)
Raises the
EdgeCreated event. |
protected void |
onEdgePortsChanged(EdgeEventArgs args)
Raises the
EdgePortsChanged event. |
protected void |
onEdgeRemoved(EdgeEventArgs args)
Raises the
EdgeRemoved event. |
protected void |
onEdgeStyleChanged(ItemChangedEventArgs<IEdge,IEdgeStyle> args)
Raises the
EdgeStyleChanged event. |
protected void |
onEdgeTagChanged(ItemChangedEventArgs<IEdge,Object> args)
Raises the
EdgeTagChanged event. |
protected void |
onGraphChanged(IGraph oldGraph,
IGraph newGraph)
Called when the
WrappedGraph property value changes and after initialization of the field. |
protected void |
onGraphTagChanged(ItemChangedEventArgs<IGraph,Object> args)
Raises the
GraphTagChanged event. |
protected void |
onInvalidateDisplays(IEventArgs args)
Raises the
DisplaysInvalidated event. |
protected void |
onIsGroupNodeChanged(NodeEventArgs args)
Dispatches the
IsGroupNodeChanged event. |
protected void |
onLabelAdded(ItemEventArgs<ILabel> args)
Raises the
LabelAdded event. |
protected void |
onLabelLayoutParameterChanged(ItemChangedEventArgs<ILabel,ILabelModelParameter> args)
Raises the
LabelLayoutParameterChanged event. |
protected void |
onLabelPreferredSizeChanged(ItemChangedEventArgs<ILabel,SizeD> args)
Raises the
LabelPreferredSizeChanged event. |
protected void |
onLabelRemoved(LabelEventArgs args)
Raises the
LabelRemoved event. |
protected void |
onLabelStyleChanged(ItemChangedEventArgs<ILabel,ILabelStyle> args)
Raises the
LabelStyleChanged event. |
protected void |
onLabelTagChanged(ItemChangedEventArgs<ILabel,Object> args)
Raises the
LabelTagChanged event. |
protected void |
onLabelTextChanged(ItemChangedEventArgs<ILabel,String> args)
Raises the
LabelTextChanged event. |
protected void |
onNodeCreated(ItemEventArgs<INode> args)
Raises the
NodeCreated event. |
protected void |
onNodeLayoutChanged(INode node,
RectD oldLayout)
Raises the
NodeLayoutChanged event. |
protected void |
onNodeRemoved(NodeEventArgs args)
Raises the
NodeRemoved event. |
protected void |
onNodeStyleChanged(ItemChangedEventArgs<INode,INodeStyle> args)
Raises the
NodeStyleChanged event. |
protected void |
onNodeTagChanged(ItemChangedEventArgs<INode,Object> args)
Raises the
NodeTagChanged event. |
protected void |
onParentChanged(NodeEventArgs args)
Dispatches the
ParentChanged event. |
protected void |
onPortAdded(ItemEventArgs<IPort> args)
Raises the
PortAdded event. |
protected void |
onPortLocationParameterChanged(ItemChangedEventArgs<IPort,IPortLocationModelParameter> args)
Raises the
PortLocationParameterChanged event. |
protected void |
onPortRemoved(PortEventArgs args)
Raises the
PortRemoved event. |
protected void |
onPortStyleChanged(ItemChangedEventArgs<IPort,IPortStyle> args)
Raises the
PortStyleChanged event. |
protected void |
onPortTagChanged(ItemChangedEventArgs<IPort,Object> args)
Raises the
PortTagChanged event. |
void |
remove(IModelItem item)
Removes the given
item from this graph. |
void |
removeBendAddedListener(IEventHandler<ItemEventArgs<IBend>> bendAddedEvent)
Removes the given listener for the
BendAdded event that occurs when a bend has been added to an edge in this
graph. |
void |
removeBendLocationChangedListener(IBendLocationChangedHandler bendLocationChangedEvent)
Removes the given listener for the
BendLocationChanged event that occurs when the location of a bend has been
changed. |
void |
removeBendRemovedListener(IEventHandler<BendEventArgs> bendRemovedEvent)
Removes the given listener for the
BendRemoved event that occurs when a bend has been removed from an edge in
this graph. |
void |
removeBendTagChangedListener(IEventHandler<ItemChangedEventArgs<IBend,Object>> bendTagChangedEvent)
Removes the given listener for the
BendTagChanged event that occurs when the tag of a
bend has been replaced. |
void |
removeDisplaysInvalidatedListener(IEventHandler<IEventArgs> displaysInvalidatedEvent)
Removes the given listener for the
DisplaysInvalidated event that occurs when the graph has changed visually and
the display should be updated to reflect the changes. |
void |
removeEdgeCreatedListener(IEventHandler<ItemEventArgs<IEdge>> edgeCreatedEvent)
Removes the given listener for the
EdgeCreated event that occurs when an edge has been created. |
void |
removeEdgePortsChangedListener(IEventHandler<EdgeEventArgs> edgePortsChangedEvent)
Removes the given listener for the
EdgePortsChanged event that occurs when an edge had its SourcePort
or TargetPort changed. |
void |
removeEdgeRemovedListener(IEventHandler<EdgeEventArgs> edgeRemovedEvent)
Removes the given listener for the
EdgeRemoved event that occurs when an edge has been removed. |
void |
removeEdgeStyleChangedListener(IEventHandler<ItemChangedEventArgs<IEdge,IEdgeStyle>> edgeStyleChangedEvent)
Removes the given listener for the
EdgeStyleChanged event that occurs when an edge style has been replaced. |
void |
removeEdgeTagChangedListener(IEventHandler<ItemChangedEventArgs<IEdge,Object>> edgeTagChangedEvent)
Removes the given listener for the
EdgeTagChanged event that occurs when the tag of
an edge has been replaced. |
protected void |
removeEventHandlers(IGraph graph)
Removes event handlers for
graph that have been added with addEventHandlers(IGraph). |
void |
removeGraphTagChangedListener(IEventHandler<ItemChangedEventArgs<IGraph,Object>> graphTagChangedEvent)
Removes the given listener for the
GraphTagChanged event that occurs when the tag of
the graph has been replaced. |
void |
removeIsGroupNodeChangedListener(IEventHandler<NodeEventArgs> isGroupNodeChangedEvent)
Removes the given listener for the
IsGroupNodeChanged
event. |
void |
removeLabelAddedListener(IEventHandler<ItemEventArgs<ILabel>> labelAddedEvent)
Removes the given listener for the
LabelAdded event that occurs when a label has been added to this graph
instance. |
void |
removeLabelLayoutParameterChangedListener(IEventHandler<ItemChangedEventArgs<ILabel,ILabelModelParameter>> labelLayoutParameterChangedEvent)
Removes the given listener for the
LabelLayoutParameterChanged event that occurs when the model parameter of a
label has been changed. |
void |
removeLabelPreferredSizeChangedListener(IEventHandler<ItemChangedEventArgs<ILabel,SizeD>> labelPreferredSizeChangedEvent)
Removes the given listener for the
LabelPreferredSizeChanged event that occurs when the preferred size of a
label has been changed. |
void |
removeLabelRemovedListener(IEventHandler<LabelEventArgs> labelRemovedEvent)
Removes the given listener for the
LabelRemoved event that occurs when a label has been removed from this graph
instance. |
void |
removeLabelStyleChangedListener(IEventHandler<ItemChangedEventArgs<ILabel,ILabelStyle>> labelStyleChangedEvent)
Removes the given listener for the
LabelStyleChanged event that occurs when a label style has been replaced. |
void |
removeLabelTagChangedListener(IEventHandler<ItemChangedEventArgs<ILabel,Object>> labelTagChangedEvent)
Removes the given listener for the
LabelTagChanged event that occurs when the tag of
a label has been replaced. |
void |
removeLabelTextChangedListener(IEventHandler<ItemChangedEventArgs<ILabel,String>> labelTextChangedEvent)
Removes the given listener for the
LabelTextChanged event that occurs when the text of a label has been
changed. |
void |
removeNodeCreatedListener(IEventHandler<ItemEventArgs<INode>> nodeCreatedEvent)
Removes the given listener for the
NodeCreated event that occurs when a node has been created. |
void |
removeNodeLayoutChangedListener(INodeLayoutChangedHandler nodeLayoutChangedEvent)
Removes the given listener for the
NodeLayoutChanged event that occurs when a node layout has been changed. |
void |
removeNodeRemovedListener(IEventHandler<NodeEventArgs> nodeRemovedEvent)
Removes the given listener for the
NodeRemoved event that occurs when a node has been removed. |
void |
removeNodeStyleChangedListener(IEventHandler<ItemChangedEventArgs<INode,INodeStyle>> nodeStyleChangedEvent)
Removes the given listener for the
NodeStyleChanged event that occurs when a node style has been replaced. |
void |
removeNodeTagChangedListener(IEventHandler<ItemChangedEventArgs<INode,Object>> nodeTagChangedEvent)
Removes the given listener for the
NodeTagChanged event that occurs when the tag of a
node has been replaced. |
void |
removeParentChangedListener(IEventHandler<NodeEventArgs> parentChangedEvent)
Removes the given listener for the
ParentChanged
event. |
void |
removePortAddedListener(IEventHandler<ItemEventArgs<IPort>> portAddedEvent)
Removes the given listener for the
PortAdded event that occurs when a port has been added to this graph
instance. |
void |
removePortLocationParameterChangedListener(IEventHandler<ItemChangedEventArgs<IPort,IPortLocationModelParameter>> portLocationParameterChangedEvent)
Removes the given listener for the
PortLocationParameterChanged event that occurs when the location model
parameter of a port has been changed. |
void |
removePortRemovedListener(IEventHandler<PortEventArgs> portRemovedEvent)
Removes the given listener for the
PortRemoved event that occurs when a port has been removed from its
owner. |
void |
removePortStyleChangedListener(IEventHandler<ItemChangedEventArgs<IPort,IPortStyle>> portStyleChangedEvent)
Removes the given listener for the
PortStyleChanged event that occurs when a port style has been replaced. |
void |
removePortTagChangedListener(IEventHandler<ItemChangedEventArgs<IPort,Object>> portTagChangedEvent)
Removes the given listener for the
PortTagChanged event that occurs when the tag of a
port has been replaced. |
void |
setBendLocation(IBend bend,
PointD location)
Modifies the location of the given bend.
|
void |
setEdgeDefaults(IEdgeDefaults value)
Sets the defaults for normal edges.
|
void |
setEdgePorts(IEdge edge,
IPort sourcePort,
IPort targetPort)
Sets the ports of the given edge to the new values.
|
void |
setGroupNodeDefaults(INodeDefaults value)
Sets the defaults for group nodes.
|
void |
setIsGroupNode(INode node,
boolean isGroupNode)
Determines whether the given node should be considered a group node.
|
void |
setLabelLayoutParameter(ILabel label,
ILabelModelParameter layoutParameter)
Sets the label model parameter for the given label.
|
void |
setLabelPreferredSize(ILabel label,
SizeD preferredSize)
Sets the preferred size of the label.
|
void |
setLabelText(ILabel label,
String text)
Sets the label text of the given label.
|
void |
setLookup(ILookup lookup)
Sets the lookup instance to use in
lookup(Class). |
void |
setNodeDefaults(INodeDefaults value)
Sets the defaults for normal nodes.
|
void |
setNodeLayout(INode node,
RectD layout)
Sets the layout of the given node to the new value.
|
void |
setParent(INode node,
INode parent)
Sets the parent node for a given node.
|
void |
setPortLocationParameter(IPort port,
IPortLocationModelParameter locationParameter)
Sets a new
IPortLocationModelParameter for the given port. |
void |
setStyle(IEdge edge,
IEdgeStyle style)
Assigns the given style instance by reference to the edge.
|
void |
setStyle(ILabel label,
ILabelStyle style)
Assigns the given style instance by reference to the label.
|
void |
setStyle(INode node,
INodeStyle style)
Assigns the given style instance by reference to the node.
|
void |
setStyle(IPort port,
IPortStyle style)
Assigns the given style instance by reference to the port.
|
void |
setTag(Object value)
Sets the tag associated with this instance.
|
protected void |
setWrappedGraph(IGraph value)
Sets the graph that has been wrapped by this instance.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddBend, addBends, addLabel, addLabel, addLabel, addLabel, addPort, addPort, addPort, addPort, addPort, addPort, addRelativePort, addUndoUnit, adjustGroupNodeLayout, adjustLabelPreferredSize, applyLayout, applyLayout, beginEdit, beginEdit, beginEdit, calculateLabelPreferredSize, calculateLabelPreferredSize, calculateLabelPreferredSize, calculateLabelPreferredSize, clear, clearBends, createDefaultLabelLayoutParameter, createDefaultPortLocationParameter, createDefaultPortLocationParameter, createEdge, createEdge, createEdge, createEdge, createGroupNode, createGroupNode, createGroupNode, createGroupNode, createNode, createNode, createNode, createNode, createNode, createNode, createNode, createNode, createNode, degree, degree, edgesAt, edgesAt, getBends, getDecorator, getDefaultNodeBounds, getEdge, getEdge, getEdgeLabels, getFoldingView, getGroupingSupport, getLabelDefaults, getNodeLabels, getPortDefaults, getUndoEngine, groupNodes, groupNodes, groupNodes, inDegree, inDegree, inEdgesAt, inEdgesAt, isUndoEngineEnabled, neighbors, outDegree, outDegree, outEdgesAt, outEdgesAt, predecessors, reverse, setNodeCenter, setPortLocation, setRelativePortLocation, setUndoEngineEnabled, successorscreateDictionaryLookup, createDynamic, createSingle, createSingle, createWrapped, lookup, lookup, safeLookupcloseprotected AbstractGraphWrapper(IGraph graph)
IGraph.
Note that this instance will register listeners with the graph, so dispose()
should be called if this instance is not used any more.
graph - The graph to wrap.public IBend addBend(IEdge edge, PointD location, int index)
IGraphThe added instance will be returned.
addBend in interface IGraphedge - The edge to which the bend will be added.location - the coordinates to use for the newly created bendindex - The index for the newly added bend; a negative value (which is the default) indicates that the bend should be appended
to the end of the list of bends.IGraph.remove(IModelItem),
IGraph.setBendLocation(IBend, PointD)public final void addBendAddedListener(IEventHandler<ItemEventArgs<IBend>> bendAddedEvent)
IGraphBendAdded event that occurs when a bend has been added to an edge in this
graph.
This event is intended to provide notification of low level changes in the graph structure. Please use the BendCreated
event if you are interested only in bend creation events that result from user interaction.
Note:You may not modify the graph in the event handler for this event. Especially you may not prevent/undo
the bend creation that has triggered this event.
addBendAddedListener in interface IGraphbendAddedEvent - The listener to add.IGraph.addBend(IEdge, PointD, int),
CreateBendInputMode.addBendCreatedListener(IEventHandler),
IGraph.removeBendAddedListener(IEventHandler)public final void addBendLocationChangedListener(IBendLocationChangedHandler bendLocationChangedEvent)
IGraphBendLocationChanged event that occurs when the location of a bend has been
changed.
This event is intended to provide notification of low level changes in the graph structure. Note:You may not modify the graph in the event handler for this event.
addBendLocationChangedListener in interface IGraphbendLocationChangedEvent - The listener to add.IGraph.setBendLocation(IBend, PointD),
IGraph.removeBendLocationChangedListener(IBendLocationChangedHandler)public final void addBendRemovedListener(IEventHandler<BendEventArgs> bendRemovedEvent)
IGraphBendRemoved event that occurs when a bend has been removed from an edge in this
graph.
This event will be triggered, too, if an edge has been removed from the graph, for each of the bends that belonged to the edge.
This event is intended to provide notification of low level changes in the graph structure. Please use the DeletedItem
event if you are interested only in bend removal events that result from user interaction.
Note:You may not modify the graph in the event handler for this event. Especially you may not prevent/undo
the bend removal that has triggered this event.
addBendRemovedListener in interface IGraphbendRemovedEvent - The listener to add.IGraph.remove(IModelItem),
GraphEditorInputMode.addDeletedItemListener(IEventHandler),
IGraph.removeBendRemovedListener(IEventHandler)public final void addBendTagChangedListener(IEventHandler<ItemChangedEventArgs<IBend,Object>> bendTagChangedEvent)
IGraphBendTagChanged event that occurs when the tag of a
bend has been replaced.
This event is intended to provide notification of low level changes in the graph structure. Note:You may not modify the graph in the event handler for this event.
addBendTagChangedListener in interface IGraphbendTagChangedEvent - The listener to add.ITagOwner.getTag(),
IGraph.removeBendTagChangedListener(IEventHandler)public final void addDisplaysInvalidatedListener(IEventHandler<IEventArgs> displaysInvalidatedEvent)
IGraphDisplaysInvalidated event that occurs when the graph has changed visually and
the display should be updated to reflect the changes.
This event is invoked with IEventArgs.EMPTY per default.
addDisplaysInvalidatedListener in interface IGraphdisplaysInvalidatedEvent - The listener to add.IGraph.removeDisplaysInvalidatedListener(IEventHandler)public final void addEdgeCreatedListener(IEventHandler<ItemEventArgs<IEdge>> edgeCreatedEvent)
IGraphEdgeCreated event that occurs when an edge has been created.
This event is intended to provide notification of low level changes in the graph structure. Please use the EdgeCreated
event if you are interested only in edge creation events that result from user interaction.
Note:You may not modify the graph in the event handler for this event. Especially you may not prevent/undo
the edge creation that has triggered this event.
addEdgeCreatedListener in interface IGraphedgeCreatedEvent - The listener to add.IGraph.createEdge(IPort, IPort, IEdgeStyle, Object),
CreateEdgeInputMode.addEdgeCreatedListener(IEventHandler),
IGraph.removeEdgeCreatedListener(IEventHandler)public final void addEdgePortsChangedListener(IEventHandler<EdgeEventArgs> edgePortsChangedEvent)
IGraphEdgePortsChanged event that occurs when an edge had its SourcePort
or TargetPort changed.
This event is intended to provide notification of low level changes in the graph structure. Note:You may not modify the graph in the event handler for this event.
addEdgePortsChangedListener in interface IGraphedgePortsChangedEvent - The listener to add.IGraph.setEdgePorts(IEdge, IPort, IPort),
IGraph.removeEdgePortsChangedListener(IEventHandler)public final void addEdgeRemovedListener(IEventHandler<EdgeEventArgs> edgeRemovedEvent)
IGraphEdgeRemoved event that occurs when an edge has been removed.
This event will be triggered, too, prior to a node removal.
This event is intended to provide notification of low level changes in the graph structure. Please use the DeletedItem
event if you are interested only in edge removal events that result from user interaction.
Note:You may not modify the graph in the event handler for this event. Especially you may not prevent/undo
the edge removal that has triggered this event.
addEdgeRemovedListener in interface IGraphedgeRemovedEvent - The listener to add.IGraph.remove(IModelItem),
GraphEditorInputMode.addDeletedItemListener(IEventHandler),
IGraph.removeEdgeRemovedListener(IEventHandler)public final void addEdgeStyleChangedListener(IEventHandler<ItemChangedEventArgs<IEdge,IEdgeStyle>> edgeStyleChangedEvent)
IGraphEdgeStyleChanged event that occurs when an edge style has been replaced.
This event is intended to provide notification of low level changes in the graph structure. Note:You may not modify the graph in the event handler for this event.
addEdgeStyleChangedListener in interface IGraphedgeStyleChangedEvent - The listener to add.IGraph.setStyle(IEdge, IEdgeStyle),
IGraph.removeEdgeStyleChangedListener(IEventHandler)public final void addEdgeTagChangedListener(IEventHandler<ItemChangedEventArgs<IEdge,Object>> edgeTagChangedEvent)
IGraphEdgeTagChanged event that occurs when the tag of an
edge has been replaced.
This event is intended to provide notification of low level changes in the graph structure. Note:You may not modify the graph in the event handler for this event.
addEdgeTagChangedListener in interface IGraphedgeTagChangedEvent - The listener to add.ITagOwner.getTag(),
IGraph.removeEdgeTagChangedListener(IEventHandler)protected void addEventHandlers(IGraph graph)
graph to listeners on this instance.graph - The graph for which event propagators should be createdpublic final void addGraphTagChangedListener(IEventHandler<ItemChangedEventArgs<IGraph,Object>> graphTagChangedEvent)
IGraphGraphTagChanged event that occurs when the tag of the
graph has been replaced.
This event is intended to provide notification of low level changes in the graph structure. Note:You may not modify the graph in the event handler for this event.
addGraphTagChangedListener in interface IGraphgraphTagChangedEvent - The listener to add.ITagOwner.getTag(),
IGraph.removeGraphTagChangedListener(IEventHandler)public final void addIsGroupNodeChangedListener(IEventHandler<NodeEventArgs> isGroupNodeChangedEvent)
IGraphIsGroupNodeChanged
event.
addIsGroupNodeChangedListener in interface IGraphisGroupNodeChangedEvent - The listener to add.IGraph.removeIsGroupNodeChangedListener(IEventHandler)public ILabel addLabel(ILabelOwner owner, String text, ILabelModelParameter layoutParameter, ILabelStyle style, SizeD preferredSize, Object tag)
IGraphaddLabel in interface IGraphowner - the item to add the label to.text - the initial text of the labellayoutParameter - The label model parameter instance to use.style - The style to use for the labelpreferredSize - The initial values to use for the PreferredSize.tag - the initial Tag to assign.IGraph.addLabelAddedListener(IEventHandler),
IGraph.setLabelText(ILabel, String),
IGraph.setLabelLayoutParameter(ILabel, ILabelModelParameter),
IGraph.setStyle(ILabel, ILabelStyle),
VoidLabelStyle.INSTANCEpublic final void addLabelAddedListener(IEventHandler<ItemEventArgs<ILabel>> labelAddedEvent)
IGraphLabelAdded event that occurs when a label has been added to this graph
instance.
This event is intended to provide notification of low level changes in the graph structure. Please use the LabelAdded
event if you are interested only in label creation events that result from user interaction.
Note:You may not modify the graph in the event handler for this event. Especially you may not prevent/undo
the label creation that has triggered this event.
addLabelAddedListener in interface IGraphlabelAddedEvent - The listener to add.IGraph.addLabel(ILabelOwner, String, ILabelModelParameter, ILabelStyle, SizeD, Object),
GraphEditorInputMode.addLabelAddedListener(IEventHandler),
IGraph.removeLabelAddedListener(IEventHandler)public final void addLabelLayoutParameterChangedListener(IEventHandler<ItemChangedEventArgs<ILabel,ILabelModelParameter>> labelLayoutParameterChangedEvent)
IGraphLabelLayoutParameterChanged event that occurs when the model parameter of a
label has been changed.
This event is intended to provide notification of low level changes in the graph structure. Note:You may not modify the graph in the event handler for this event.
addLabelLayoutParameterChangedListener in interface IGraphlabelLayoutParameterChangedEvent - The listener to add.IGraph.setLabelLayoutParameter(ILabel, ILabelModelParameter),
IGraph.removeLabelLayoutParameterChangedListener(IEventHandler)public final void addLabelPreferredSizeChangedListener(IEventHandler<ItemChangedEventArgs<ILabel,SizeD>> labelPreferredSizeChangedEvent)
IGraphLabelPreferredSizeChanged event that occurs when the preferred size of a label
has been changed.
This event is intended to provide notification of low level changes in the graph structure. Note:You may not modify the graph in the event handler for this event.
addLabelPreferredSizeChangedListener in interface IGraphlabelPreferredSizeChangedEvent - The listener to add.IGraph.setLabelPreferredSize(ILabel, SizeD),
IGraph.removeLabelPreferredSizeChangedListener(IEventHandler)public final void addLabelRemovedListener(IEventHandler<LabelEventArgs> labelRemovedEvent)
IGraphLabelRemoved event that occurs when a label has been removed from this graph
instance.
This event will also be triggered, prior to the removal of the owner of the label.
This event is intended to provide notification of low level changes in the graph structure. Please use the DeletedItem
event if you are interested only in label removal events that result from user interaction.
Note:You may not modify the graph in the event handler for this event. Especially you may not prevent/undo
the label removal that has triggered this event.
addLabelRemovedListener in interface IGraphlabelRemovedEvent - The listener to add.IGraph.remove(IModelItem),
GraphEditorInputMode.addDeletedItemListener(IEventHandler),
GraphEditorInputMode.addLabelTextChangedListener(IEventHandler),
IGraph.removeLabelRemovedListener(IEventHandler)public final void addLabelStyleChangedListener(IEventHandler<ItemChangedEventArgs<ILabel,ILabelStyle>> labelStyleChangedEvent)
IGraphLabelStyleChanged event that occurs when a label style has been replaced.
This event is intended to provide notification of low level changes in the graph structure. Note:You may not modify the graph in the event handler for this event.
addLabelStyleChangedListener in interface IGraphlabelStyleChangedEvent - The listener to add.IGraph.setStyle(ILabel, ILabelStyle),
IGraph.removeLabelStyleChangedListener(IEventHandler)public final void addLabelTagChangedListener(IEventHandler<ItemChangedEventArgs<ILabel,Object>> labelTagChangedEvent)
IGraphLabelTagChanged event that occurs when the tag of a
label has been replaced.
This event is intended to provide notification of low level changes in the graph structure. Note:You may not modify the graph in the event handler for this event.
addLabelTagChangedListener in interface IGraphlabelTagChangedEvent - The listener to add.ITagOwner.getTag(),
IGraph.removeLabelTagChangedListener(IEventHandler)public final void addLabelTextChangedListener(IEventHandler<ItemChangedEventArgs<ILabel,String>> labelTextChangedEvent)
IGraphLabelTextChanged event that occurs when the text of a label has been changed.
This event is intended to provide notification of low level changes in the graph structure. Note:You may not modify the graph in the event handler for this event.
addLabelTextChangedListener in interface IGraphlabelTextChangedEvent - The listener to add.IGraph.setLabelText(ILabel, String),
IGraph.removeLabelTextChangedListener(IEventHandler)public final void addNodeCreatedListener(IEventHandler<ItemEventArgs<INode>> nodeCreatedEvent)
IGraphNodeCreated event that occurs when a node has been created.
This event is intended to provide notification of low level changes in the graph structure. Please use the NodeCreated
event if you are interested only in node creation events that result from user interaction.
Note:You may not modify the graph in the event handler for this event. Especially you may not prevent/undo
the node creation that has triggered this event.
addNodeCreatedListener in interface IGraphnodeCreatedEvent - The listener to add.IGraph.createNode(RectD, INodeStyle, Object),
IGraph.createNode(INode, RectD, INodeStyle, Object),
IGraph.createGroupNode(INode, RectD, INodeStyle, Object),
GraphEditorInputMode.addNodeCreatedListener(IEventHandler),
IGraph.removeNodeCreatedListener(IEventHandler)public final void addNodeLayoutChangedListener(INodeLayoutChangedHandler nodeLayoutChangedEvent)
IGraphNodeLayoutChanged event that occurs when a node layout has been changed.
This event is intended to provide notification of low level changes in the graph structure. Note:You may not modify the graph in the event handler for this event.
addNodeLayoutChangedListener in interface IGraphnodeLayoutChangedEvent - The listener to add.IGraph.removeNodeLayoutChangedListener(INodeLayoutChangedHandler)public final void addNodeRemovedListener(IEventHandler<NodeEventArgs> nodeRemovedEvent)
IGraphNodeRemoved event that occurs when a node has been removed.
This event is intended to provide notification of low level changes in the graph structure. Please use the DeletedItem
event if you are interested only in node removal events that result from user interaction.
Note:You may not modify the graph in the event handler for this event. Especially you may not prevent/undo
the node removal that has triggered this event.
addNodeRemovedListener in interface IGraphnodeRemovedEvent - The listener to add.IGraph.remove(IModelItem),
GraphEditorInputMode.addDeletedItemListener(IEventHandler),
IGraph.removeNodeRemovedListener(IEventHandler)public final void addNodeStyleChangedListener(IEventHandler<ItemChangedEventArgs<INode,INodeStyle>> nodeStyleChangedEvent)
IGraphNodeStyleChanged event that occurs when a node style has been replaced.
This event is intended to provide notification of low level changes in the graph structure. Note:You may not modify the graph in the event handler for this event.
addNodeStyleChangedListener in interface IGraphnodeStyleChangedEvent - The listener to add.IGraph.setStyle(INode, INodeStyle),
IGraph.removeNodeStyleChangedListener(IEventHandler)public final void addNodeTagChangedListener(IEventHandler<ItemChangedEventArgs<INode,Object>> nodeTagChangedEvent)
IGraphNodeTagChanged event that occurs when the tag of a
node has been replaced.
This event is intended to provide notification of low level changes in the graph structure. Note:You may not modify the graph in the event handler for this event.
addNodeTagChangedListener in interface IGraphnodeTagChangedEvent - The listener to add.ITagOwner.getTag(),
IGraph.removeNodeTagChangedListener(IEventHandler)public final void addParentChangedListener(IEventHandler<NodeEventArgs> parentChangedEvent)
IGraphParentChanged
event.
addParentChangedListener in interface IGraphparentChangedEvent - The listener to add.IGraph.removeParentChangedListener(IEventHandler)public IPort addPort(IPortOwner owner, IPortLocationModelParameter locationParameter, IPortStyle style, Object tag)
IGraph
The locationParameter determines the location of the port.
Depending on the implementation this method may throw an UnsupportedOperationException if the type of
the owner instance does not support adding of ports.
addPort in interface IGraphowner - the owner to add the port instance to.locationParameter - the parameter to use for the port to determine its location.style - the style to initially assign to the Style property, e.g.
VoidPortStyle.INSTANCE.tag - the initial Tag to assign.IGraph.addPortAddedListener(IEventHandler),
VoidPortStyle.INSTANCEpublic final void addPortAddedListener(IEventHandler<ItemEventArgs<IPort>> portAddedEvent)
IGraphPortAdded event that occurs when a port has been added to this graph instance.
This event is intended to provide notification of low level changes in the graph structure. Note:You may not modify the graph in the event handler for this event. Especially you may not prevent/undo the port creation that has triggered this event.
addPortAddedListener in interface IGraphportAddedEvent - The listener to add.IGraph.addPort(IPortOwner, IPortLocationModelParameter, IPortStyle, Object),
IGraph.createEdge(INode, INode, IEdgeStyle, Object),
IGraph.removePortAddedListener(IEventHandler)public final void addPortLocationParameterChangedListener(IEventHandler<ItemChangedEventArgs<IPort,IPortLocationModelParameter>> portLocationParameterChangedEvent)
IGraphPortLocationParameterChanged event that occurs when the location model parameter
of a port has been changed.
This event is intended to provide notification of low level changes in the graph structure. Note:You may not modify the graph in the event handler for this event.
addPortLocationParameterChangedListener in interface IGraphportLocationParameterChangedEvent - The listener to add.IGraph.setPortLocationParameter(IPort, IPortLocationModelParameter),
IGraph.removePortLocationParameterChangedListener(IEventHandler)public final void addPortRemovedListener(IEventHandler<PortEventArgs> portRemovedEvent)
IGraphPortRemoved event that occurs when a port has been removed from its
owner.
This event will also be triggered prior to the removal of the corresponding owner of the port.
This event is intended to provide notification of low level changes in the graph structure. Please use the DeletedItem
event if you are interested only in port removal events that result from user interaction.
Note:You may not modify the graph in the event handler for this event. Especially you may not prevent/undo
the port removal that has triggered this event.
addPortRemovedListener in interface IGraphportRemovedEvent - The listener to add.IGraph.remove(IModelItem),
GraphEditorInputMode.addDeletedItemListener(IEventHandler),
IGraph.removePortRemovedListener(IEventHandler)public final void addPortStyleChangedListener(IEventHandler<ItemChangedEventArgs<IPort,IPortStyle>> portStyleChangedEvent)
IGraphPortStyleChanged event that occurs when a port style has been replaced.
This event is intended to provide notification of low level changes in the graph structure. Note:You may not modify the graph in the event handler for this event.
addPortStyleChangedListener in interface IGraphportStyleChangedEvent - The listener to add.IGraph.setStyle(IPort, IPortStyle),
IGraph.removePortStyleChangedListener(IEventHandler)public final void addPortTagChangedListener(IEventHandler<ItemChangedEventArgs<IPort,Object>> portTagChangedEvent)
IGraphPortTagChanged event that occurs when the tag of a
port has been replaced.
This event is intended to provide notification of low level changes in the graph structure. Note:You may not modify the graph in the event handler for this event.
addPortTagChangedListener in interface IGraphportTagChangedEvent - The listener to add.ITagOwner.getTag(),
IGraph.removePortTagChangedListener(IEventHandler)public boolean contains(IModelItem item)
IGraphpublic IEdge createEdge(INode source, INode target, IEdgeStyle style, Object tag)
IGraph
The nodes must be part of this graph at the time of the invocation, and the implementation will choose the IPort
instances to which the edge will be connected. The edge will be a part of this graph after the method returns. This will
trigger the corresponding events.
createEdge in interface IGraphsource - 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.target - The 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 - The style instance that will be assigned to the newly created instance. This is done by reference.tag - The initial value of the Tag that will be assigned to the new edge.IGraph.addEdgeCreatedListener(IEventHandler),
VoidEdgeStyle.INSTANCEpublic IEdge createEdge(IPort sourcePort, IPort targetPort, IEdgeStyle style, Object tag)
IGraphThe 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.
createEdge in interface IGraphsourcePort - The source port the created edge will connect to.targetPort - The target port the created edge will connect to.style - The style instance that will be assigned to the newly created instance. This is done by reference.tag - The initial value of the Tag that will be assigned to the new edge.IGraph.addEdgeCreatedListener(IEventHandler),
VoidEdgeStyle.INSTANCEpublic INode createGroupNode(INode parent, RectD layout, INodeStyle style, Object tag)
IGraphparent.
The group node will be a direct descendant of parent.
To create group nodes interactively use the GraphEditorInputMode as input mode and
enable the grouping operations.
createGroupNode in interface IGraphparent - The node to use as the parent in the grouping hierarchy or null if the new node should become a top-level node.layout - The initial layout to use for the new node.style - The style to use for the new node.tag - The Tag to assign to the INode.public INode createNode(INode parent, RectD layout, INodeStyle style, Object tag)
IGraphparent using the given layout and style.createNode in interface IGraphparent - The node to use as the parent in the grouping hierarchy or null if the new node should become a top-level node.layout - The layout to use initially. The values will be copied to the node's Layout field.style - The style instance that will be assigned to the newly created instance. This is done by reference.tag - The Tag to assign to the INode.IGraph.setParent(INode, INode),
IGraph.createNode(RectD, INodeStyle, Object),
IGraph.createGroupNode(INode, RectD, INodeStyle, Object)public INode createNode(RectD layout, INodeStyle style, Object tag)
IGraphTag.
The node will be a part of this graph after the method returns. This will trigger the corresponding events.
createNode in interface IGraphlayout - The layout to use initially. The values will be copied to the node's Layout fieldstyle - The style instance that will be assigned to the newly created instance. This is done by reference.tag - The initial value of the Tag that will be assigned to the new node.IGraph.addNodeCreatedListener(IEventHandler),
VoidNodeStyle.INSTANCEpublic void dispose()
IDisposabledispose in interface IDisposablepublic IListEnumerable<IEdge> edgesAt(IPort port, AdjacencyTypes type)
IGraphIterable for all edges that are adjacent to the given port as a SourcePort
or TargetPort.
Note that even though edges can be accessed via index, the underlying graph structure in the default IGraph
implementation is a linked list and indexed access can be slow. In those cases it is recommended to store the edges in
your own list, if possible. This is not necessary for the first or last element or when iterating over the adjacent
edges via a foreach loop.
edgesAt in interface IGraphport - the port to checktype - The type of adjacency to consider.IGraph.edgesAt(IPort),
IGraph.inEdgesAt(IPort),
IGraph.outEdgesAt(IPort),
AdjacencyTypespublic IListEnumerable<IEdge> edgesAt(IPortOwner owner, AdjacencyTypes type)
IGraphIListEnumerable for all edges that have the given port owner as their target port's
or source port's Owner depending on the AdjacencyTypes.
Note that even though edges can be accessed via index, the underlying graph structure in the default IGraph
implementation is a linked list and indexed access can be slow. In those cases it is recommended to store the edges in
your own list, if possible. This is not necessary for the first or last element or when iterating over the adjacent
edges via a foreach loop.
edgesAt in interface IGraphowner - the port owner to checktype - The type of adjacency to consider.IGraph.edgesAt(IPortOwner),
IGraph.inEdgesAt(IPortOwner),
IGraph.outEdgesAt(IPortOwner),
AdjacencyTypespublic IListEnumerable<INode> getChildren(INode node)
IGraphgetChildren in interface IGraphnode - The node for which to return the children or null if the top-level nodes should be returned.node as their parent.public IEdgeDefaults getEdgeDefaults()
IGraphThe settings that are obtained from the instance influence newly created elements only. Setting different defaults afterwards does not influence existing elements.
getEdgeDefaults in interface IGraphIGraph.setEdgeDefaults(IEdgeDefaults)public IListEnumerable<IEdge> getEdges()
IGraphThis is a live view of the edges that always represents the current state of the graph. The same reference will be returned for each invocation.
Note that even though edges can be accessed via index, the underlying graph structure in the default IGraph
implementation is a linked list and indexed access can be slow. In those cases it is recommended to store the edges in
your own list, if possible. This is not necessary for the first or last element or when iterating over the edges via a foreach
loop.
public INodeDefaults getGroupNodeDefaults()
IGraphgetGroupNodeDefaults in interface IGraphIGraph.setGroupNodeDefaults(INodeDefaults)public IListEnumerable<ILabel> getLabels()
IGraphThis is a live view of the labels that always represents the current state of the graph. The same reference will be returned for each invocation.
Note that even though labels can be accessed via index, the underlying graph structure in the default IGraph
implementation is a linked list and indexed access can be slow. In those cases it is recommended to store the labels in
your own list, if possible. This is not necessary for the first or last element or when iterating over the labels via a
foreach loop.
public ILookup getLookup()
lookup(Class).public IMapperRegistry getMapperRegistry()
IGraphThe registry can be used to store data mappings for the items in this instance.
getMapperRegistry in interface IGraphIMapperRegistry,
IModelItem,
ITagOwner.getTag()public INodeDefaults getNodeDefaults()
IGraphThe settings that are obtained from the instance influence newly created elements only. Setting different defaults afterwards does not influence existing elements.
getNodeDefaults in interface IGraphIGraph.setNodeDefaults(INodeDefaults)public IListEnumerable<INode> getNodes()
IGraphThis is a live view of the nodes that always represents the current state of the graph. The same reference will be returned for each invocation.
Note that even though nodes can be accessed via index, the underlying graph structure in the default IGraph
implementation is a linked list and indexed access can be slow. In those cases it is recommended to store the nodes in
your own list, if possible. This is not necessary for the first or last element or when iterating over the nodes via a foreach
loop.
public INode getParent(INode node)
IGraphnull if node is a top-level node.public IListEnumerable<IPort> getPorts()
IGraphThis is a live view of the ports that always represents the current state of the graph. The same reference will be returned for each invocation.
Note that even though ports can be accessed via index, the underlying graph structure in the default IGraph
implementation is a linked list and indexed access can be slow. In those cases it is recommended to store the ports in
your own list, if possible. This is not necessary for the first or last element or when iterating over the ports via a foreach
loop.
public final Object getTag()
ITagOwnerThe implementation itself does not normally depend on the tag associated with it. It serves as storage for the object only.
getTag in interface ITagOwnerITagOwner.setTag(Object)public final IGraph getWrappedGraph()
setWrappedGraph(IGraph)public void invalidateDisplays()
IGraphDisplaysInvalidated event to be triggered.
This method may be called by client code to invalidate all views of the graph that have registered with the DisplaysInvalidated
event. Views that need to be informed if non-structural changes have been made to the graph should register with the
corresponding event.
invalidateDisplays in interface IGraphpublic boolean isGroupNode(INode node)
IGraph
Group nodes may have children but do not necessarily need to have children.
isGroupNode in interface IGraphnode - The node to check.IGraph.getChildren(INode),
IGraph.setIsGroupNode(INode, boolean)public <TLookup> TLookup lookup(Class<TLookup> type)
ILookupnull.
Typically, this method will be called in order to obtain a different view or
aspect of the current instance. This is quite similar to casting or using
a super type or interface of this instance, but is not limited to inheritance or
compile time constraints. An instance implementing this method is not
required to return non-null implementations for the types, nor does it
have to return the same instance any time. Also it depends on the
type and context whether the instance returned stays up to date or needs to
be reobtained for subsequent use.protected void onBendAdded(ItemEventArgs<IBend> args)
BendAdded event.args - The parameters for the eventprotected void onBendLocationChanged(IBend bend, PointD oldLocation)
BendLocationChanged event.bend - The bend whose location changedoldLocation - The bend location before the changeprotected void onBendRemoved(BendEventArgs args)
BendRemoved event.args - The parameters for the eventprotected void onBendTagChanged(ItemChangedEventArgs<IBend,Object> args)
BendTagChanged event.args - The parameters for the eventprotected void onEdgeCreated(ItemEventArgs<IEdge> args)
EdgeCreated event.args - The parameters for the eventprotected void onEdgePortsChanged(EdgeEventArgs args)
EdgePortsChanged event.args - The parameters for the eventprotected void onEdgeRemoved(EdgeEventArgs args)
EdgeRemoved event.args - The parameters for the eventprotected void onEdgeStyleChanged(ItemChangedEventArgs<IEdge,IEdgeStyle> args)
EdgeStyleChanged event.args - The parameters for the eventprotected void onEdgeTagChanged(ItemChangedEventArgs<IEdge,Object> args)
EdgeTagChanged event.args - The parameters for the eventprotected void onGraphChanged(IGraph oldGraph, IGraph newGraph)
WrappedGraph property value changes and after initialization of the field.
Delegates to addEventHandlers(IGraph) for newGraph and to removeEventHandlers(IGraph) for
oldGraph.
oldGraph - the old value, which may be null the first timenewGraph - the new valueprotected void onGraphTagChanged(ItemChangedEventArgs<IGraph,Object> args)
GraphTagChanged event.args - The parameters for the eventprotected void onInvalidateDisplays(IEventArgs args)
DisplaysInvalidated event.args - The parameters for the eventprotected void onIsGroupNodeChanged(NodeEventArgs args)
IsGroupNodeChanged event.args - The event args to dispatch.protected void onLabelAdded(ItemEventArgs<ILabel> args)
LabelAdded event.args - The parameters for the eventprotected void onLabelLayoutParameterChanged(ItemChangedEventArgs<ILabel,ILabelModelParameter> args)
LabelLayoutParameterChanged event.args - The parameters for the eventprotected void onLabelPreferredSizeChanged(ItemChangedEventArgs<ILabel,SizeD> args)
LabelPreferredSizeChanged event.args - The parameters for the eventprotected void onLabelRemoved(LabelEventArgs args)
LabelRemoved event.args - The parameters for the eventprotected void onLabelStyleChanged(ItemChangedEventArgs<ILabel,ILabelStyle> args)
LabelStyleChanged event.args - The parameters for the eventprotected void onLabelTagChanged(ItemChangedEventArgs<ILabel,Object> args)
LabelTagChanged event.args - The parameters for the eventprotected void onLabelTextChanged(ItemChangedEventArgs<ILabel,String> args)
LabelTextChanged event.args - The parameters for the eventprotected void onNodeCreated(ItemEventArgs<INode> args)
NodeCreated event.args - The parameters for the eventprotected void onNodeLayoutChanged(INode node, RectD oldLayout)
NodeLayoutChanged event.node - The node whose layout changedoldLayout - The node layout before the changeprotected void onNodeRemoved(NodeEventArgs args)
NodeRemoved event.args - The parameters for the eventprotected void onNodeStyleChanged(ItemChangedEventArgs<INode,INodeStyle> args)
NodeStyleChanged event.args - The parameters for the eventprotected void onNodeTagChanged(ItemChangedEventArgs<INode,Object> args)
NodeTagChanged event.args - The parameters for the eventprotected void onParentChanged(NodeEventArgs args)
ParentChanged event.args - The event args to dispatch.protected void onPortAdded(ItemEventArgs<IPort> args)
PortAdded event.args - The parameters for the eventprotected void onPortLocationParameterChanged(ItemChangedEventArgs<IPort,IPortLocationModelParameter> args)
PortLocationParameterChanged event.args - The parameters for the eventprotected void onPortRemoved(PortEventArgs args)
PortRemoved event.args - The parameters for the eventprotected void onPortStyleChanged(ItemChangedEventArgs<IPort,IPortStyle> args)
PortStyleChanged event.args - The parameters for the eventprotected void onPortTagChanged(ItemChangedEventArgs<IPort,Object> args)
PortTagChanged event.args - The parameters for the eventpublic void remove(IModelItem item)
IGraphitem from this graph.
The item must be a part of this graph.
If the item is a node the NodeRemoved event will be
triggered. The implementation will remove all adjacent edges and their corresponding ports in proper order before the
node will be removed. Also this will trigger the removal of all labels owned by this instance.
If the item is an edge the EdgeRemoved event will be
triggered. The implementation may decide to remove the corresponding ports from the node if no other edge connects to
them after the given edge has been removed. Also this will trigger the removal of all labels and bends owned by this
instance.
If the item is a bend the BendRemoved event will be
triggered.
If the item is a port the PortRemoved event will be
triggered. This will also remove all edges that are currently connected to the port.
If the item is a label the LabelRemoved event will be
triggered.
public final void removeBendAddedListener(IEventHandler<ItemEventArgs<IBend>> bendAddedEvent)
IGraphBendAdded event that occurs when a bend has been added to an edge in this
graph.
This event is intended to provide notification of low level changes in the graph structure. Please use the BendCreated
event if you are interested only in bend creation events that result from user interaction.
Note:You may not modify the graph in the event handler for this event. Especially you may not prevent/undo
the bend creation that has triggered this event.
removeBendAddedListener in interface IGraphbendAddedEvent - The listener to remove.IGraph.addBend(IEdge, PointD, int),
CreateBendInputMode.addBendCreatedListener(IEventHandler),
IGraph.addBendAddedListener(IEventHandler)public final void removeBendLocationChangedListener(IBendLocationChangedHandler bendLocationChangedEvent)
IGraphBendLocationChanged event that occurs when the location of a bend has been
changed.
This event is intended to provide notification of low level changes in the graph structure. Note:You may not modify the graph in the event handler for this event.
removeBendLocationChangedListener in interface IGraphbendLocationChangedEvent - The listener to remove.IGraph.setBendLocation(IBend, PointD),
IGraph.addBendLocationChangedListener(IBendLocationChangedHandler)public final void removeBendRemovedListener(IEventHandler<BendEventArgs> bendRemovedEvent)
IGraphBendRemoved event that occurs when a bend has been removed from an edge in
this graph.
This event will be triggered, too, if an edge has been removed from the graph, for each of the bends that belonged to the edge.
This event is intended to provide notification of low level changes in the graph structure. Please use the DeletedItem
event if you are interested only in bend removal events that result from user interaction.
Note:You may not modify the graph in the event handler for this event. Especially you may not prevent/undo
the bend removal that has triggered this event.
removeBendRemovedListener in interface IGraphbendRemovedEvent - The listener to remove.IGraph.remove(IModelItem),
GraphEditorInputMode.addDeletedItemListener(IEventHandler),
IGraph.addBendRemovedListener(IEventHandler)public final void removeBendTagChangedListener(IEventHandler<ItemChangedEventArgs<IBend,Object>> bendTagChangedEvent)
IGraphBendTagChanged event that occurs when the tag of a
bend has been replaced.
This event is intended to provide notification of low level changes in the graph structure. Note:You may not modify the graph in the event handler for this event.
removeBendTagChangedListener in interface IGraphbendTagChangedEvent - The listener to remove.ITagOwner.getTag(),
IGraph.addBendTagChangedListener(IEventHandler)public final void removeDisplaysInvalidatedListener(IEventHandler<IEventArgs> displaysInvalidatedEvent)
IGraphDisplaysInvalidated event that occurs when the graph has changed visually and
the display should be updated to reflect the changes.
This event is invoked with IEventArgs.EMPTY per default.
removeDisplaysInvalidatedListener in interface IGraphdisplaysInvalidatedEvent - The listener to remove.IGraph.addDisplaysInvalidatedListener(IEventHandler)public final void removeEdgeCreatedListener(IEventHandler<ItemEventArgs<IEdge>> edgeCreatedEvent)
IGraphEdgeCreated event that occurs when an edge has been created.
This event is intended to provide notification of low level changes in the graph structure. Please use the EdgeCreated
event if you are interested only in edge creation events that result from user interaction.
Note:You may not modify the graph in the event handler for this event. Especially you may not prevent/undo
the edge creation that has triggered this event.
removeEdgeCreatedListener in interface IGraphedgeCreatedEvent - The listener to remove.IGraph.createEdge(IPort, IPort, IEdgeStyle, Object),
CreateEdgeInputMode.addEdgeCreatedListener(IEventHandler),
IGraph.addEdgeCreatedListener(IEventHandler)public final void removeEdgePortsChangedListener(IEventHandler<EdgeEventArgs> edgePortsChangedEvent)
IGraphEdgePortsChanged event that occurs when an edge had its SourcePort
or TargetPort changed.
This event is intended to provide notification of low level changes in the graph structure. Note:You may not modify the graph in the event handler for this event.
removeEdgePortsChangedListener in interface IGraphedgePortsChangedEvent - The listener to remove.IGraph.setEdgePorts(IEdge, IPort, IPort),
IGraph.addEdgePortsChangedListener(IEventHandler)public final void removeEdgeRemovedListener(IEventHandler<EdgeEventArgs> edgeRemovedEvent)
IGraphEdgeRemoved event that occurs when an edge has been removed.
This event will be triggered, too, prior to a node removal.
This event is intended to provide notification of low level changes in the graph structure. Please use the DeletedItem
event if you are interested only in edge removal events that result from user interaction.
Note:You may not modify the graph in the event handler for this event. Especially you may not prevent/undo
the edge removal that has triggered this event.
removeEdgeRemovedListener in interface IGraphedgeRemovedEvent - The listener to remove.IGraph.remove(IModelItem),
GraphEditorInputMode.addDeletedItemListener(IEventHandler),
IGraph.addEdgeRemovedListener(IEventHandler)public final void removeEdgeStyleChangedListener(IEventHandler<ItemChangedEventArgs<IEdge,IEdgeStyle>> edgeStyleChangedEvent)
IGraphEdgeStyleChanged event that occurs when an edge style has been replaced.
This event is intended to provide notification of low level changes in the graph structure. Note:You may not modify the graph in the event handler for this event.
removeEdgeStyleChangedListener in interface IGraphedgeStyleChangedEvent - The listener to remove.IGraph.setStyle(IEdge, IEdgeStyle),
IGraph.addEdgeStyleChangedListener(IEventHandler)public final void removeEdgeTagChangedListener(IEventHandler<ItemChangedEventArgs<IEdge,Object>> edgeTagChangedEvent)
IGraphEdgeTagChanged event that occurs when the tag of
an edge has been replaced.
This event is intended to provide notification of low level changes in the graph structure. Note:You may not modify the graph in the event handler for this event.
removeEdgeTagChangedListener in interface IGraphedgeTagChangedEvent - The listener to remove.ITagOwner.getTag(),
IGraph.addEdgeTagChangedListener(IEventHandler)protected void removeEventHandlers(IGraph graph)
graph that have been added with addEventHandlers(IGraph).graph - The graph for which event propagators should be removedpublic final void removeGraphTagChangedListener(IEventHandler<ItemChangedEventArgs<IGraph,Object>> graphTagChangedEvent)
IGraphGraphTagChanged event that occurs when the tag of
the graph has been replaced.
This event is intended to provide notification of low level changes in the graph structure. Note:You may not modify the graph in the event handler for this event.
removeGraphTagChangedListener in interface IGraphgraphTagChangedEvent - The listener to remove.ITagOwner.getTag(),
IGraph.addGraphTagChangedListener(IEventHandler)public final void removeIsGroupNodeChangedListener(IEventHandler<NodeEventArgs> isGroupNodeChangedEvent)
IGraphIsGroupNodeChanged
event.
removeIsGroupNodeChangedListener in interface IGraphisGroupNodeChangedEvent - The listener to remove.IGraph.addIsGroupNodeChangedListener(IEventHandler)public final void removeLabelAddedListener(IEventHandler<ItemEventArgs<ILabel>> labelAddedEvent)
IGraphLabelAdded event that occurs when a label has been added to this graph
instance.
This event is intended to provide notification of low level changes in the graph structure. Please use the LabelAdded
event if you are interested only in label creation events that result from user interaction.
Note:You may not modify the graph in the event handler for this event. Especially you may not prevent/undo
the label creation that has triggered this event.
removeLabelAddedListener in interface IGraphlabelAddedEvent - The listener to remove.IGraph.addLabel(ILabelOwner, String, ILabelModelParameter, ILabelStyle, SizeD, Object),
GraphEditorInputMode.addLabelAddedListener(IEventHandler),
IGraph.addLabelAddedListener(IEventHandler)public final void removeLabelLayoutParameterChangedListener(IEventHandler<ItemChangedEventArgs<ILabel,ILabelModelParameter>> labelLayoutParameterChangedEvent)
IGraphLabelLayoutParameterChanged event that occurs when the model parameter of a
label has been changed.
This event is intended to provide notification of low level changes in the graph structure. Note:You may not modify the graph in the event handler for this event.
removeLabelLayoutParameterChangedListener in interface IGraphlabelLayoutParameterChangedEvent - The listener to remove.IGraph.setLabelLayoutParameter(ILabel, ILabelModelParameter),
IGraph.addLabelLayoutParameterChangedListener(IEventHandler)public final void removeLabelPreferredSizeChangedListener(IEventHandler<ItemChangedEventArgs<ILabel,SizeD>> labelPreferredSizeChangedEvent)
IGraphLabelPreferredSizeChanged event that occurs when the preferred size of a
label has been changed.
This event is intended to provide notification of low level changes in the graph structure. Note:You may not modify the graph in the event handler for this event.
removeLabelPreferredSizeChangedListener in interface IGraphlabelPreferredSizeChangedEvent - The listener to remove.IGraph.setLabelPreferredSize(ILabel, SizeD),
IGraph.addLabelPreferredSizeChangedListener(IEventHandler)public final void removeLabelRemovedListener(IEventHandler<LabelEventArgs> labelRemovedEvent)
IGraphLabelRemoved event that occurs when a label has been removed from this graph
instance.
This event will also be triggered, prior to the removal of the owner of the label.
This event is intended to provide notification of low level changes in the graph structure. Please use the DeletedItem
event if you are interested only in label removal events that result from user interaction.
Note:You may not modify the graph in the event handler for this event. Especially you may not prevent/undo
the label removal that has triggered this event.
removeLabelRemovedListener in interface IGraphlabelRemovedEvent - The listener to remove.IGraph.remove(IModelItem),
GraphEditorInputMode.addDeletedItemListener(IEventHandler),
GraphEditorInputMode.addLabelTextChangedListener(IEventHandler),
IGraph.addLabelRemovedListener(IEventHandler)public final void removeLabelStyleChangedListener(IEventHandler<ItemChangedEventArgs<ILabel,ILabelStyle>> labelStyleChangedEvent)
IGraphLabelStyleChanged event that occurs when a label style has been replaced.
This event is intended to provide notification of low level changes in the graph structure. Note:You may not modify the graph in the event handler for this event.
removeLabelStyleChangedListener in interface IGraphlabelStyleChangedEvent - The listener to remove.IGraph.setStyle(ILabel, ILabelStyle),
IGraph.addLabelStyleChangedListener(IEventHandler)public final void removeLabelTagChangedListener(IEventHandler<ItemChangedEventArgs<ILabel,Object>> labelTagChangedEvent)
IGraphLabelTagChanged event that occurs when the tag of
a label has been replaced.
This event is intended to provide notification of low level changes in the graph structure. Note:You may not modify the graph in the event handler for this event.
removeLabelTagChangedListener in interface IGraphlabelTagChangedEvent - The listener to remove.ITagOwner.getTag(),
IGraph.addLabelTagChangedListener(IEventHandler)public final void removeLabelTextChangedListener(IEventHandler<ItemChangedEventArgs<ILabel,String>> labelTextChangedEvent)
IGraphLabelTextChanged event that occurs when the text of a label has been
changed.
This event is intended to provide notification of low level changes in the graph structure. Note:You may not modify the graph in the event handler for this event.
removeLabelTextChangedListener in interface IGraphlabelTextChangedEvent - The listener to remove.IGraph.setLabelText(ILabel, String),
IGraph.addLabelTextChangedListener(IEventHandler)public final void removeNodeCreatedListener(IEventHandler<ItemEventArgs<INode>> nodeCreatedEvent)
IGraphNodeCreated event that occurs when a node has been created.
This event is intended to provide notification of low level changes in the graph structure. Please use the NodeCreated
event if you are interested only in node creation events that result from user interaction.
Note:You may not modify the graph in the event handler for this event. Especially you may not prevent/undo
the node creation that has triggered this event.
removeNodeCreatedListener in interface IGraphnodeCreatedEvent - The listener to remove.IGraph.createNode(RectD, INodeStyle, Object),
IGraph.createNode(INode, RectD, INodeStyle, Object),
IGraph.createGroupNode(INode, RectD, INodeStyle, Object),
GraphEditorInputMode.addNodeCreatedListener(IEventHandler),
IGraph.addNodeCreatedListener(IEventHandler)public final void removeNodeLayoutChangedListener(INodeLayoutChangedHandler nodeLayoutChangedEvent)
IGraphNodeLayoutChanged event that occurs when a node layout has been changed.
This event is intended to provide notification of low level changes in the graph structure. Note:You may not modify the graph in the event handler for this event.
removeNodeLayoutChangedListener in interface IGraphnodeLayoutChangedEvent - The listener to remove.IGraph.addNodeLayoutChangedListener(INodeLayoutChangedHandler)public final void removeNodeRemovedListener(IEventHandler<NodeEventArgs> nodeRemovedEvent)
IGraphNodeRemoved event that occurs when a node has been removed.
This event is intended to provide notification of low level changes in the graph structure. Please use the DeletedItem
event if you are interested only in node removal events that result from user interaction.
Note:You may not modify the graph in the event handler for this event. Especially you may not prevent/undo
the node removal that has triggered this event.
removeNodeRemovedListener in interface IGraphnodeRemovedEvent - The listener to remove.IGraph.remove(IModelItem),
GraphEditorInputMode.addDeletedItemListener(IEventHandler),
IGraph.addNodeRemovedListener(IEventHandler)public final void removeNodeStyleChangedListener(IEventHandler<ItemChangedEventArgs<INode,INodeStyle>> nodeStyleChangedEvent)
IGraphNodeStyleChanged event that occurs when a node style has been replaced.
This event is intended to provide notification of low level changes in the graph structure. Note:You may not modify the graph in the event handler for this event.
removeNodeStyleChangedListener in interface IGraphnodeStyleChangedEvent - The listener to remove.IGraph.setStyle(INode, INodeStyle),
IGraph.addNodeStyleChangedListener(IEventHandler)public final void removeNodeTagChangedListener(IEventHandler<ItemChangedEventArgs<INode,Object>> nodeTagChangedEvent)
IGraphNodeTagChanged event that occurs when the tag of a
node has been replaced.
This event is intended to provide notification of low level changes in the graph structure. Note:You may not modify the graph in the event handler for this event.
removeNodeTagChangedListener in interface IGraphnodeTagChangedEvent - The listener to remove.ITagOwner.getTag(),
IGraph.addNodeTagChangedListener(IEventHandler)public final void removeParentChangedListener(IEventHandler<NodeEventArgs> parentChangedEvent)
IGraphParentChanged
event.
removeParentChangedListener in interface IGraphparentChangedEvent - The listener to remove.IGraph.addParentChangedListener(IEventHandler)public final void removePortAddedListener(IEventHandler<ItemEventArgs<IPort>> portAddedEvent)
IGraphPortAdded event that occurs when a port has been added to this graph
instance.
This event is intended to provide notification of low level changes in the graph structure. Note:You may not modify the graph in the event handler for this event. Especially you may not prevent/undo the port creation that has triggered this event.
removePortAddedListener in interface IGraphportAddedEvent - The listener to remove.IGraph.addPort(IPortOwner, IPortLocationModelParameter, IPortStyle, Object),
IGraph.createEdge(INode, INode, IEdgeStyle, Object),
IGraph.addPortAddedListener(IEventHandler)public final void removePortLocationParameterChangedListener(IEventHandler<ItemChangedEventArgs<IPort,IPortLocationModelParameter>> portLocationParameterChangedEvent)
IGraphPortLocationParameterChanged event that occurs when the location model
parameter of a port has been changed.
This event is intended to provide notification of low level changes in the graph structure. Note:You may not modify the graph in the event handler for this event.
removePortLocationParameterChangedListener in interface IGraphportLocationParameterChangedEvent - The listener to remove.IGraph.setPortLocationParameter(IPort, IPortLocationModelParameter),
IGraph.addPortLocationParameterChangedListener(IEventHandler)public final void removePortRemovedListener(IEventHandler<PortEventArgs> portRemovedEvent)
IGraphPortRemoved event that occurs when a port has been removed from its
owner.
This event will also be triggered prior to the removal of the corresponding owner of the port.
This event is intended to provide notification of low level changes in the graph structure. Please use the DeletedItem
event if you are interested only in port removal events that result from user interaction.
Note:You may not modify the graph in the event handler for this event. Especially you may not prevent/undo
the port removal that has triggered this event.
removePortRemovedListener in interface IGraphportRemovedEvent - The listener to remove.IGraph.remove(IModelItem),
GraphEditorInputMode.addDeletedItemListener(IEventHandler),
IGraph.addPortRemovedListener(IEventHandler)public final void removePortStyleChangedListener(IEventHandler<ItemChangedEventArgs<IPort,IPortStyle>> portStyleChangedEvent)
IGraphPortStyleChanged event that occurs when a port style has been replaced.
This event is intended to provide notification of low level changes in the graph structure. Note:You may not modify the graph in the event handler for this event.
removePortStyleChangedListener in interface IGraphportStyleChangedEvent - The listener to remove.IGraph.setStyle(IPort, IPortStyle),
IGraph.addPortStyleChangedListener(IEventHandler)public final void removePortTagChangedListener(IEventHandler<ItemChangedEventArgs<IPort,Object>> portTagChangedEvent)
IGraphPortTagChanged event that occurs when the tag of a
port has been replaced.
This event is intended to provide notification of low level changes in the graph structure. Note:You may not modify the graph in the event handler for this event.
removePortTagChangedListener in interface IGraphportTagChangedEvent - The listener to remove.ITagOwner.getTag(),
IGraph.addPortTagChangedListener(IEventHandler)public void setBendLocation(IBend bend, PointD location)
IGraphsetBendLocation in interface IGraphbend - the bend whose location is to be modifiedlocation - the new location of the bendIGraph.addBend(IEdge, PointD, int)public void setEdgeDefaults(IEdgeDefaults value)
IGraphThe settings that are obtained from the instance influence newly created elements only. Setting different defaults afterwards does not influence existing elements.
setEdgeDefaults in interface IGraphvalue - The EdgeDefaults to set.IGraph.getEdgeDefaults()public void setEdgePorts(IEdge edge, IPort sourcePort, IPort targetPort)
IGraph
This will trigger an EdgePortsChanged event if source or target
ports differ from the current ones. Both ports and the edge must belong to the current graph instance.
setEdgePorts in interface IGraphedge - The edge to change the ports.sourcePort - The new source port instance.targetPort - The new target port instance.public void setGroupNodeDefaults(INodeDefaults value)
IGraphsetGroupNodeDefaults in interface IGraphvalue - The GroupNodeDefaults to set.IGraph.getGroupNodeDefaults()public void setIsGroupNode(INode node, boolean isGroupNode)
IGraph
Group nodes may have children but do not necessarily need to have one. Attempting to set a
node to the non-group-node-status while it has children at the same time will result in an
IllegalStateException.
setIsGroupNode in interface IGraphnode - The node to set the group node status for.isGroupNode - Whether to make the node a group node.IGraph.getChildren(INode),
IGraph.isGroupNode(INode)public void setLabelLayoutParameter(ILabel label, ILabelModelParameter layoutParameter)
IGraphsetLabelLayoutParameter in interface IGraphlabel - The label.layoutParameter - The new parameter.public void setLabelPreferredSize(ILabel label, SizeD preferredSize)
IGraphsetLabelPreferredSize in interface IGraphlabel - The label.preferredSize - The new preferred size.ILabel.getPreferredSize()public void setLabelText(ILabel label, String text)
IGraphsetLabelText in interface IGraphlabel - the label to modifytext - the new text of the labelILabel.getText()public void setLookup(ILookup lookup)
lookup(Class).public void setNodeDefaults(INodeDefaults value)
IGraphThe settings that are obtained from the instance influence newly created elements only. Setting different defaults afterwards does not influence existing elements.
setNodeDefaults in interface IGraphvalue - The NodeDefaults to set.IGraph.getNodeDefaults()public void setNodeLayout(INode node, RectD layout)
IGraphsetNodeLayout in interface IGraphnode - a live node that belongs to this graphlayout - The new layout of the node to assign to its Layout.INode.getLayout()public void setParent(INode node, INode parent)
IGraph
Use null as parent to make node a top-level node for this graph.
setParent in interface IGraphnode - The node to assign a new parent.parent - The parent group node to assign to node or null to make node a top-level node.IGraph.getParent(INode)public void setPortLocationParameter(IPort port, IPortLocationModelParameter locationParameter)
IGraphIPortLocationModelParameter for the given port.setPortLocationParameter in interface IGraphport - The port to modifylocationParameter - the new parameter that determines the coordinates of the portpublic void setStyle(IEdge edge, IEdgeStyle style)
IGraphStyle instances can be shared.
setStyle in interface IGraphedge - The edge that will be assigned the new stylestyle - The style instance that will be assigned to the edge.IEdge.getStyle(),
IGraph.addEdgeStyleChangedListener(IEventHandler),
VoidEdgeStyle.INSTANCEpublic void setStyle(ILabel label, ILabelStyle style)
IGraphStyle instances can be shared.
setStyle in interface IGraphlabel - The label that will be assigned the new stylestyle - The style instance that will be assigned to the label.ILabel.getStyle(),
IGraph.addLabelStyleChangedListener(IEventHandler),
VoidLabelStyle.INSTANCEpublic void setStyle(INode node, INodeStyle style)
IGraphStyle instances can be shared.
setStyle in interface IGraphnode - The node that will be assigned the new stylestyle - The style instance that will be assigned to the node.INode.getStyle(),
IGraph.addNodeStyleChangedListener(IEventHandler),
VoidNodeStyle.INSTANCEpublic void setStyle(IPort port, IPortStyle style)
IGraphStyle instances can be shared.
setStyle in interface IGraphport - The port that will be assigned the new stylestyle - The style instance that will be assigned to the port.IPort.getStyle(),
IGraph.addPortStyleChangedListener(IEventHandler),
VoidPortStyle.INSTANCEpublic final void setTag(Object value)
ITagOwnerThe implementation itself does not normally depend on the tag associated with it. It serves as storage for the object only.
setTag in interface ITagOwnervalue - The user object associated with this instance.ITagOwner.getTag()protected final void setWrappedGraph(IGraph value)
value - The graph this instance is decorating.getWrappedGraph()