public abstract class AbstractGraphMLNode extends AbstractIDElement implements IGraphMLNode, ShapeType, java.lang.Cloneable
| Modifier and Type | Field and Description |
|---|---|
protected AbstractGraphMLDiagram |
diagram
The diagram.
|
idDIAMOND, 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, setURLequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcomputeSize, computeSize, getOpenedShapeNode, getRealizedShapeNode, setDefaultGeometry, setLabel, updateLabelgetDescription, getID, getURL, getURLAsString, hasDescription, hasURL, isTemplate, setDescription, setURL, setURLhasBorderColor, hasFillColor, setAutosized, setBorderColor, setBorderStyle, setDropShadow, setFillColor, setFillColor, setGeometry, setHasBorderColor, setHasFillColor, setHeightPadding, setLabel, setLabel, setType, setWidthPaddingprotected 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 IGraphMLNodeid - the nodepublic AbstractGraphMLDiagram getDiagram()
getDiagram in interface IGraphMLNodepublic void setParent(NodeParent parent)
setParent in interface IGraphMLNodeparent - the parentpublic NodeParent getParent()
getParent in interface IGraphMLNodepublic void repatriate(AbstractGraphMLDiagram diagram, boolean detach)
repatriate in interface IGraphMLNodediagram - the new diagramdetach - detach the node from its current diagrampublic void repatriate(AbstractGraphMLDiagram diagram)
repatriate in interface IGraphMLNodediagram - the new diagrampublic void computeSize(boolean recurse)
computeSize in interface IGraphMLNoderecurse - recurse on children nodespublic AbstractGraphMLNode clone()
IGraphMLNodeclone in interface IGraphMLNodeclone in class AbstractIDElementpublic java.util.Map<java.lang.String,java.util.List<GraphMLEdge>> getFromEdges()
getFromEdges in interface IGraphMLNodepublic java.util.Map<java.lang.String,java.util.List<GraphMLEdge>> getToEdges()
getToEdges in interface IGraphMLNodepublic 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 IGraphMLNodeedge - the edgepublic GraphMLEdge addEdgeTo(IGraphMLNode target)
addEdgeTo in interface IGraphMLNodetarget - the target nodepublic GraphMLEdge addEdgeFrom(IGraphMLNode source)
addEdgeFrom in interface IGraphMLNodesource - the source nodepublic boolean addToEdge(GraphMLEdge edge)
addToEdge in interface IGraphMLNodeedge - the edgeCopyright © 2021, 2022 Herve Girod. All Rights Reserved. Documentation and source under the BSD 3-Clause licence