public interface mxIGraphModel
Modifier and Type | Interface and Description |
---|---|
static class |
mxIGraphModel.mxAtomicGraphModelChange
Defines the interface for an atomic change of the graph model.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
add(java.lang.Object parent,
java.lang.Object child,
int index)
Adds the specified child to the parent at the given index.
|
void |
addListener(java.lang.String eventName,
mxEventSource.mxIEventListener listener)
Binds the specified function to the given event name.
|
void |
beginUpdate()
Increments the updateLevel by one.
|
java.lang.Object[] |
cloneCells(java.lang.Object[] cells,
boolean includeChildren)
Returns an array of clones for the given array of cells.
|
boolean |
contains(java.lang.Object cell)
Returns true if the model contains the given cell.
|
void |
endUpdate()
Decrements the updateLevel by one and fires a notification event if the
updateLevel reaches 0.
|
java.lang.Object |
getChildAt(java.lang.Object parent,
int index)
Returns the child of the given parent at the given index.
|
int |
getChildCount(java.lang.Object cell)
Returns the number of children in the given cell.
|
java.lang.Object |
getEdgeAt(java.lang.Object cell,
int index)
Returns the edge of cell at the given index.
|
int |
getEdgeCount(java.lang.Object cell)
Returns the number of distinct edges connected to the given cell.
|
mxGeometry |
getGeometry(java.lang.Object cell)
Returns the geometry of the given cell.
|
java.lang.Object |
getParent(java.lang.Object child)
Returns the parent of the given cell.
|
java.lang.Object |
getRoot()
Returns the root of the model or the topmost parent of the given cell.
|
java.lang.String |
getStyle(java.lang.Object cell)
Returns the style of the given cell.
|
java.lang.Object |
getTerminal(java.lang.Object edge,
boolean isSource)
Returns the source or target terminal of the given edge depending on the
value of the boolean parameter.
|
java.lang.Object |
getValue(java.lang.Object cell)
Returns the user object of the given cell.
|
boolean |
isAncestor(java.lang.Object parent,
java.lang.Object child)
Returns true if the given parent is an ancestor of the given child.
|
boolean |
isCollapsed(java.lang.Object cell)
Returns true if the given cell is collapsed.
|
boolean |
isConnectable(java.lang.Object cell)
Returns true if the given cell is connectable.
|
boolean |
isEdge(java.lang.Object cell)
Returns true if the given cell is an edge.
|
boolean |
isVertex(java.lang.Object cell)
Returns true if the given cell is a vertex.
|
boolean |
isVisible(java.lang.Object cell)
Returns true if the given cell is visible.
|
java.lang.Object |
remove(java.lang.Object cell)
Removes the specified cell from the model.
|
void |
removeListener(mxEventSource.mxIEventListener listener)
Function: removeListener
Removes the given listener from the list of listeners.
|
void |
removeListener(mxEventSource.mxIEventListener listener,
java.lang.String eventName)
Function: removeListener
Removes the given listener from the list of listeners.
|
boolean |
setCollapsed(java.lang.Object cell,
boolean collapsed)
Sets the collapsed state of the given cell.
|
mxGeometry |
setGeometry(java.lang.Object cell,
mxGeometry geometry)
Sets the geometry of the given cell.
|
java.lang.Object |
setRoot(java.lang.Object root)
Sets the root of the model and resets all structures.
|
java.lang.String |
setStyle(java.lang.Object cell,
java.lang.String style)
Sets the style of the given cell.
|
java.lang.Object |
setTerminal(java.lang.Object edge,
java.lang.Object terminal,
boolean isSource)
Sets the source or target terminal of the given edge using.
|
java.lang.Object |
setValue(java.lang.Object cell,
java.lang.Object value)
Sets the user object of then given cell.
|
boolean |
setVisible(java.lang.Object cell,
boolean visible)
Sets the visible state of the given cell.
|
java.lang.Object getRoot()
java.lang.Object setRoot(java.lang.Object root)
root
- Cell that specifies the new root.java.lang.Object[] cloneCells(java.lang.Object[] cells, boolean includeChildren)
cells
- Array of cells to be cloned.includeChildren
- Boolean indicating if the cells should be cloned
with all descendants.boolean isAncestor(java.lang.Object parent, java.lang.Object child)
parent
- Cell that specifies the parent.child
- Cell that specifies the child.boolean contains(java.lang.Object cell)
cell
- Cell to be checked.java.lang.Object getParent(java.lang.Object child)
child
- Cell whose parent should be returned.java.lang.Object add(java.lang.Object parent, java.lang.Object child, int index)
parent
- Cell that specifies the parent to contain the child.child
- Cell that specifies the child to be inserted.index
- Integer that specifies the index of the child.java.lang.Object remove(java.lang.Object cell)
cell
- Cell that should be removed.int getChildCount(java.lang.Object cell)
cell
- Cell whose number of children should be returned.java.lang.Object getChildAt(java.lang.Object parent, int index)
parent
- Cell that represents the parent.index
- Integer that specifies the index of the child to be
returned.java.lang.Object getTerminal(java.lang.Object edge, boolean isSource)
edge
- Cell that specifies the edge.isSource
- Boolean indicating which end of the edge should be
returned.java.lang.Object setTerminal(java.lang.Object edge, java.lang.Object terminal, boolean isSource)
edge
- Cell that specifies the edge.terminal
- Cell that specifies the new terminal.isSource
- Boolean indicating if the terminal is the new source or
target terminal of the edge.int getEdgeCount(java.lang.Object cell)
cell
- Cell that represents the vertex.java.lang.Object getEdgeAt(java.lang.Object cell, int index)
cell
- Cell that specifies the vertex.index
- Integer that specifies the index of the edge to return.boolean isVertex(java.lang.Object cell)
cell
- Cell that represents the possible vertex.boolean isEdge(java.lang.Object cell)
cell
- Cell that represents the possible edge.boolean isConnectable(java.lang.Object cell)
cell
- Cell whose connectable state should be returned.java.lang.Object getValue(java.lang.Object cell)
cell
- Cell whose user object should be returned.java.lang.Object setValue(java.lang.Object cell, java.lang.Object value)
cell
- Cell whose user object should be changed.value
- Object that defines the new user object.mxGeometry getGeometry(java.lang.Object cell)
cell
- Cell whose geometry should be returned.mxGeometry setGeometry(java.lang.Object cell, mxGeometry geometry)
cell
- Cell whose geometry should be changed.geometry
- Object that defines the new geometry.java.lang.String getStyle(java.lang.Object cell)
cell
- Cell whose style should be returned.java.lang.String setStyle(java.lang.Object cell, java.lang.String style)
cell
- Cell whose style should be changed.style
- String of the form stylename[;key=value] to specify
the new cell style.boolean isCollapsed(java.lang.Object cell)
cell
- Cell whose collapsed state should be returned.boolean setCollapsed(java.lang.Object cell, boolean collapsed)
cell
- Cell whose collapsed state should be changed.collapsed
- Boolean that specifies the new collpased state.boolean isVisible(java.lang.Object cell)
cell
- Cell whose visible state should be returned.boolean setVisible(java.lang.Object cell, boolean visible)
cell
- Cell whose visible state should be changed.visible
- Boolean that specifies the new visible state.void beginUpdate()
void endUpdate()
void addListener(java.lang.String eventName, mxEventSource.mxIEventListener listener)
void removeListener(mxEventSource.mxIEventListener listener)
void removeListener(mxEventSource.mxIEventListener listener, java.lang.String eventName)
Copyright (c) 2010-2017 Gaudenz Alder, JGraph Ltd. All rights reserved.