public abstract class AbstractGraphMLNode extends AbstractIDElement implements IGraphMLNode, ShapeType, java.lang.Cloneable
Modifier and Type | Field and Description |
---|---|
protected AbstractGraphMLDiagram |
diagram
The diagram.
|
id
DIAMOND, ELLIPSE, FATARROW, FATARROW2, HEXAGON, OCTAGON, PARALLELOGRAM, PARALLELOGRAM2, RECTANGLE, RECTANGLE3D, ROUNDRECTANGLE, TRIANGLE, TRIANGLE2
Constructor and Description |
---|
AbstractGraphMLNode(AbstractGraphMLDiagram diagram,
java.lang.String id)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
GraphMLEdge |
addEdgeFrom(IGraphMLNode source)
Add an edge from another node to this one.
|
GraphMLEdge |
addEdgeTo(IGraphMLNode target)
Add an edge from this node to another one.
|
boolean |
addFromEdge(GraphMLEdge edge)
Add an edge originating from another node.
|
boolean |
addToEdge(GraphMLEdge edge)
Add an edge originating from this node.
|
AbstractGraphMLNode |
clone()
Clone the node.
|
void |
computeSize(boolean recurse)
Compute the size of the node.
|
AbstractGraphMLDiagram |
getDiagram()
Return the diagram.
|
java.util.Map<java.lang.String,java.util.List<GraphMLEdge>> |
getFromEdges()
Return the Map of edges originating from other nodes.
|
NodeParent |
getParent()
Return the node parent.
|
java.util.Map<java.lang.String,java.util.List<GraphMLEdge>> |
getToEdges()
Return the Map of edges originating from this node.
|
void |
repatriate(AbstractGraphMLDiagram diagram)
Repatriate the node to another diagram.
|
void |
repatriate(AbstractGraphMLDiagram diagram,
boolean detach)
Repatriate the node to another diagram.
|
boolean |
setFromPortConstraint(short side)
Set port constraints on all edges originating from this node.
|
boolean |
setFromPortConstraint(java.lang.String side)
Set port constraints on all edges originating from this node.
|
void |
setId(java.lang.String id)
Set a new id for the node.
|
void |
setParent(NodeParent parent)
Set the node parent.
|
boolean |
setToPortConstraint(short side)
Set port constraints on all edges originating from another node.
|
boolean |
setToPortConstraint(java.lang.String side)
Set port constraints on all edges originating from this node.
|
getDescription, getID, getURL, getURLAsString, hasURL, setDescription, setURL, setURL
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
computeSize, computeSize, getOpenedShapeNode, getRealizedShapeNode, setDefaultGeometry, setLabel, updateLabel
getDescription, getID, getURL, getURLAsString, hasDescription, hasURL, isTemplate, setDescription, setURL, setURL
hasBorderColor, hasFillColor, setAutosized, setBorderColor, setBorderStyle, setDropShadow, setFillColor, setFillColor, setGeometry, setHasBorderColor, setHasFillColor, setHeightPadding, setLabel, setLabel, setType, setWidthPadding
protected AbstractGraphMLDiagram diagram
public AbstractGraphMLNode(AbstractGraphMLDiagram diagram, java.lang.String id)
diagram
- the diagramid
- the node idpublic void setId(java.lang.String id)
setId
in interface IGraphMLNode
id
- the nodepublic AbstractGraphMLDiagram getDiagram()
getDiagram
in interface IGraphMLNode
public void setParent(NodeParent parent)
setParent
in interface IGraphMLNode
parent
- the parentpublic NodeParent getParent()
getParent
in interface IGraphMLNode
public void repatriate(AbstractGraphMLDiagram diagram, boolean detach)
repatriate
in interface IGraphMLNode
diagram
- the new diagramdetach
- detach the node from its current diagrampublic void repatriate(AbstractGraphMLDiagram diagram)
repatriate
in interface IGraphMLNode
diagram
- the new diagrampublic void computeSize(boolean recurse)
computeSize
in interface IGraphMLNode
recurse
- recurse on children nodespublic AbstractGraphMLNode clone()
IGraphMLNode
clone
in interface IGraphMLNode
clone
in class AbstractIDElement
public java.util.Map<java.lang.String,java.util.List<GraphMLEdge>> getFromEdges()
getFromEdges
in interface IGraphMLNode
public java.util.Map<java.lang.String,java.util.List<GraphMLEdge>> getToEdges()
getToEdges
in interface IGraphMLNode
public boolean setFromPortConstraint(short side)
side
- the side constraintpublic boolean setFromPortConstraint(java.lang.String side)
side
- the side constraintpublic boolean setToPortConstraint(short side)
side
- the side constraintpublic boolean setToPortConstraint(java.lang.String side)
side
- the side constraintpublic boolean addFromEdge(GraphMLEdge edge)
addFromEdge
in interface IGraphMLNode
edge
- the edgepublic GraphMLEdge addEdgeTo(IGraphMLNode target)
addEdgeTo
in interface IGraphMLNode
target
- the target nodepublic GraphMLEdge addEdgeFrom(IGraphMLNode source)
addEdgeFrom
in interface IGraphMLNode
source
- the source nodepublic boolean addToEdge(GraphMLEdge edge)
addToEdge
in interface IGraphMLNode
edge
- the edgeCopyright © 2021, 2022 Herve Girod. All Rights Reserved. Documentation and source under the BSD 3-Clause licence