public class mxGraphMlGraph extends Object
Constructor and Description |
---|
mxGraphMlGraph()
Constructs an empty graph.
|
mxGraphMlGraph(Element graphElement)
Constructs a graph from a xml graph element.
|
mxGraphMlGraph(String id,
String edgedefault)
Constructs a graph with id and edge default direction.
|
Modifier and Type | Method and Description |
---|---|
void |
addGraph(mxGraph graph,
Object parent)
Adds the elements represented for this graph model into the given graph.
|
static mxGraphMlData |
dataEdgeKey(mxGraphMlEdge edge)
Returns the data element inside the edge that references to the key element
with name = KEY_EDGE_NAME.
|
static mxGraphMlData |
dataNodeKey(mxGraphMlNode node)
Returns the data element inside the node that references to the key element
with name = KEY_NODE_NAME.
|
Element |
generateElement(Document document)
Generates a Key Element from this class.
|
String |
getEdgedefault() |
List<mxGraphMlEdge> |
getEdges() |
String |
getId() |
List<mxGraphMlNode> |
getNodes() |
static boolean |
hasData(mxGraphMlNode node)
Checks if the node has data elements inside.
|
boolean |
isEmpty()
Checks if the graph has child nodes or edges.
|
void |
setEdgedefault(String edgedefault) |
void |
setEdges(List<mxGraphMlEdge> edge) |
void |
setId(String id) |
void |
setNodes(List<mxGraphMlNode> node) |
public mxGraphMlGraph(String id, String edgedefault)
id
- Graph's IDedgedefault
- Edge Default direction.("directed" or "undirected")public mxGraphMlGraph()
public mxGraphMlGraph(Element graphElement)
graphElement
- Xml graph element.public void addGraph(mxGraph graph, Object parent)
graph
- Graph where the elements will be locatedparent
- Parent of the cells to be added.public static boolean hasData(mxGraphMlNode node)
node
- Gml node element.true
if the node has data elements inside.public static mxGraphMlData dataNodeKey(mxGraphMlNode node)
node
- Gml Node element.public static mxGraphMlData dataEdgeKey(mxGraphMlEdge edge)
edge
- Gml Edge element.public String getEdgedefault()
public void setEdgedefault(String edgedefault)
public String getId()
public void setId(String id)
public List<mxGraphMlNode> getNodes()
public void setNodes(List<mxGraphMlNode> node)
public List<mxGraphMlEdge> getEdges()
public void setEdges(List<mxGraphMlEdge> edge)
public boolean isEmpty()
true
if the graph hasn't child nodes or edges.Copyright (c) 2010 Gaudenz Alder, David Benson. All rights reserved.