public class GraphMLDiagram extends AbstractGraphMLDiagram implements GraphDiagram, java.lang.Cloneable
children, defaultEdgeType, defaults, edges, groupNodes, nodes
Constructor and Description |
---|
GraphMLDiagram() |
GraphMLDiagram(DiagramDefaults defaults)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
addChild(IGraphMLNode node)
Adds a child node to this graph.
|
DiagramResource |
addDiagramResource(DiagramResource resource)
Add an diagram resource.
|
boolean |
addEdge(GraphMLEdge edge,
IGraphMLNode source,
IGraphMLNode target)
Add an edge from a source to a target.
|
GraphMLEdge |
addEdge(IGraphMLNode source,
IGraphMLNode target)
Add an edge from a source to a target.
|
GraphMLEdge |
addEdgeFromTemplate(IGraphMLNode source,
IGraphMLNode target,
java.lang.String id)
Add an edge from a source to a target, using a template.
|
GraphMLEdge |
addEdgeWithLabel(IGraphMLNode source,
IGraphMLNode target,
java.lang.String text)
Add an edge from a source to a target, with a specified text.
|
GraphMLGroupNode |
addGroupNode()
Add a group node with an id specified automatically.
|
GraphMLGroupNode |
addGroupNodeFromTemplate(java.lang.String id)
Add a group node, using a template.
|
GraphMLGroupNode |
addGroupNodeFromTemplateWithLabel(java.lang.String id,
java.lang.String text)
Adds a child node to the parent, using a template, and with a specified label.
|
GraphMLGroupNode |
addGroupNodeWithLabel(java.lang.String text)
Add a group node with an id specified automatically, and with a specified label.
|
IconResource |
addIconResource()
Add an icon resource.
|
IconResourceData |
addIconResourceData()
Add an icon resource data.
|
void |
addKey(DiagramKey key)
Add a key.
|
GraphMLNode |
addNode()
Add a node with an id specified automatically.
|
GraphMLNode |
addNodeFromTemplate(java.lang.String id)
Add a node, using a template.
|
GraphMLNode |
addNodeFromTemplateWithLabel(java.lang.String id,
java.lang.String text)
Add a node with an id specified automatically.
|
GraphMLNode |
addNodeWithLabel(java.lang.String text)
Add a node with an id specified automatically, and with a specified label.
|
void |
clearDiagramResources()
Clear the diagram resources.
|
GraphMLDiagram |
clone() |
void |
computeSize()
Compute the size of the nodes.
|
void |
computeSize(float groupNodePadding)
Compute the size of the nodes.
|
DiagramResource |
getDiagramResource(int id)
Return the diagram resource of a specified ID.
|
java.util.Map<java.lang.Integer,DiagramResource> |
getDiagramResources()
Return the diagram resources.
|
java.lang.String |
getID()
Return null.
|
java.util.Map<KeyType,DiagramKey> |
getKeys()
Return the keys by key type.
|
java.util.Map<java.lang.String,DiagramKey> |
getKeysById()
Return the keys by ID.
|
NodeParent |
getNodeParent()
Return this.
|
java.lang.String |
getTitle()
Return the diagram title.
|
java.net.URL |
getURL()
Return the diagram URL.
|
boolean |
hasDiagramResource(int id)
Return true if there is a diagram resource for a specified ID.
|
void |
setTitle(java.lang.String title)
Set the diagram title.
|
void |
setURL(java.net.URL url)
Set the diagram URL.
|
addEdgeWithEndpoints, addGroupNode, addNode, addNode, addNode, addVertex, addVertex, containsEdge, containsVertex, countEdges, countGroupNodes, countNodes, detachNode, getChildren, getDefaultEdgeType, getDefaults, getDest, getDiagram, getEdgeCount, getEdgeCount, getEdges, getEdges, getEdgesView, getEdgeType, getEndpoints, getGroupNodes, getIncidentEdges, getInEdges, getNeighbors, getNodes, getOutEdges, getPredecessors, getSource, getSuccessors, getUnusedNodeID, getVertexCount, getVerticesView, hasGroupNodes, isDest, isSource, removeEdge, removeVertex, setDefaultEdgeType, setDefaults
addEdge, addEdgeWithEndPoints, addEdgeWithVertices, addEdgeWithVertices, degree, findEdge, findEdgeSet, getIncidentCount, getIncidentVertices, getNeighborCount, getOpposite, getPredecessorCount, getSuccessorCount, getValidatedEndpoints, inDegree, isIncident, isNeighbor, isPredecessor, isSuccessor, outDegree
public GraphMLDiagram()
public GraphMLDiagram(DiagramDefaults defaults)
defaults
- the diagram defaults.public GraphMLDiagram clone()
clone
in class AbstractGraphMLDiagram
public NodeParent getNodeParent()
getNodeParent
in interface GraphDiagram
public java.lang.String getID()
getID
in interface GraphDiagram
public void setURL(java.net.URL url)
url
- the URLpublic java.net.URL getURL()
public void setTitle(java.lang.String title)
title
- the titlepublic java.lang.String getTitle()
public void addKey(DiagramKey key)
key
- the keypublic java.util.Map<KeyType,DiagramKey> getKeys()
public java.util.Map<java.lang.String,DiagramKey> getKeysById()
public GraphMLNode addNode()
addNode
in interface NodeParent
addNode
in class AbstractGraphMLDiagram
public GraphMLNode addNodeWithLabel(java.lang.String text)
addNodeWithLabel
in interface NodeParent
text
- the node labelpublic GraphMLNode addNodeFromTemplate(java.lang.String id) throws TemplateAccessException
addNodeFromTemplate
in interface NodeParent
addNodeFromTemplate
in class AbstractGraphMLDiagram
id
- the template idTemplateAccessException
public GraphMLNode addNodeFromTemplateWithLabel(java.lang.String id, java.lang.String text)
addNodeFromTemplateWithLabel
in interface NodeParent
id
- the template idtext
- the node labelpublic GraphMLGroupNode addGroupNodeWithLabel(java.lang.String text)
addGroupNodeWithLabel
in interface NodeParent
text
- the group node labelpublic GraphMLGroupNode addGroupNode()
addGroupNode
in interface NodeParent
addGroupNode
in class AbstractGraphMLDiagram
public GraphMLGroupNode addGroupNodeFromTemplate(java.lang.String id) throws TemplateAccessException
addGroupNodeFromTemplate
in interface NodeParent
addGroupNodeFromTemplate
in class AbstractGraphMLDiagram
id
- the template idTemplateAccessException
public GraphMLGroupNode addGroupNodeFromTemplateWithLabel(java.lang.String id, java.lang.String text)
addGroupNodeFromTemplateWithLabel
in interface NodeParent
id
- the template idtext
- the node labelpublic boolean addChild(IGraphMLNode node)
addChild
in interface NodeParent
addChild
in class AbstractGraphMLDiagram
node
- the node to addtrue
if the add is successful, and false
otherwisejava.lang.IllegalArgumentException
- if node
is null
public boolean addEdge(GraphMLEdge edge, IGraphMLNode source, IGraphMLNode target)
addEdge
in interface Graph<IGraphMLNode,GraphMLEdge>
addEdge
in class AbstractGraphMLDiagram
edge
- the edgesource
- the edge sourcetarget
- the edge targetGraph.addEdge(Object, Object, Object, EdgeType)
public GraphMLEdge addEdge(IGraphMLNode source, IGraphMLNode target)
addEdge
in class AbstractGraphMLDiagram
source
- the edge sourcetarget
- the edge targetpublic GraphMLEdge addEdgeWithLabel(IGraphMLNode source, IGraphMLNode target, java.lang.String text)
source
- the edge sourcetarget
- the edge targetpublic GraphMLEdge addEdgeFromTemplate(IGraphMLNode source, IGraphMLNode target, java.lang.String id) throws TemplateAccessException
addEdgeFromTemplate
in class AbstractGraphMLDiagram
source
- the edge sourcetarget
- the edge targetid
- the template idTemplateAccessException
public IconResource addIconResource()
public IconResourceData addIconResourceData()
public DiagramResource addDiagramResource(DiagramResource resource)
resource
- the diagram resourcepublic java.util.Map<java.lang.Integer,DiagramResource> getDiagramResources()
public DiagramResource getDiagramResource(int id)
id
- the resource IDpublic boolean hasDiagramResource(int id)
id
- the resource IDpublic void clearDiagramResources()
public void computeSize()
public void computeSize(float groupNodePadding)
groupNodePadding
- the padding between nodes used for computing group node sizesCopyright © 2021, 2022 Herve Girod. All Rights Reserved. Documentation and source under the BSD 3-Clause licence