com::mxgraph::mxGraph Class Reference

Implements a graph object that allows to create diagrams from a graph model and stylesheet. More...

List of all members.

Public Member Functions

 mxGraph ()
 Constructs a new graph with an empty graph model.
 mxGraph (mxIGraphModel model)
 Constructs a new graph for the specified model. If no model is specified, then a new, empty graph model is used.
 mxGraph (mxStylesheet stylesheet)
 Constructs a new graph for the specified model. If no model is specified, then a new, empty graph model is used.
 mxGraph (mxIGraphModel model, mxStylesheet stylesheet)
 Constructs a new graph for the specified model. If no model is specified, then a new, empty graph model is used.
double Snap (double value)
 Snaps the given numeric value to the grid if gridEnabled is true.
Object GetDefaultParent ()
 Returns the first child of the root in the model, that is, the first or default layer of the diagram.
string ConvertValueToString (Object cell)
 Returns the textual representation for the given cell.
string GetLabel (Object cell)
 Returns a string or markup that represents the label for the given cell. This implementation uses ConvertValueToString if labelsVisible is true. Otherwise it returns an empty string.
mxPoint GetChildOffsetForCell (Object cell)
 Returns the offset to be used for the cells inside the given cell. The root and layer cells may be identified using mxGraphModel.isRoot and mxGraphModel.isLayer. This implementation returns null.
bool IsOrthogonal (mxCellState edge)
 Returns true if perimeter points should be computed such that the resulting edge has only horizontal or vertical segments.
bool IsSwimlane (Object cell)
 Returns true if the given cell is a swimlane.
bool IsCellMovable (Object cell)
 Returns true if the given cell is movable. This implementation always returns true.
bool IsCellVisible (Object cell)
 Returns true if the given cell is visible. This implementation returns true if the visible state of the cell in the model is true.
bool IsCellCollapsed (Object cell)
 Returns true if the given cell is collapsed. This implementation returns true if the collapsed state of the cell in the model is true.
bool IsCellConnectable (Object cell)
 Returns true if the given cell is connectable. This implementation returns true if the connectable state of the cell in the model is true.
mxGeometry GetCellGeometry (Object cell)
 Returns the geometry for the given cell.
Dictionary< string, Object > GetCellStyle (Object cell)
 Returns the style for the given cell.
void AddImageBundle (mxImageBundle bundle)
 Adds the specified bundle.
void RemoveImageBundle (mxImageBundle bundle)
 Removes the specified bundle.
String GetImageFromBundles (String key)
 Searches all bundles for the specified key and returns the value for the first match or null if the key is not found.
void SetCellStyles (String key, String value, Object[] cells)
 Sets the key to value in the styles of the given cells. This will modify the existing cell styles in-place and override any existing assignment for the given key. If no cells are specified, then the selection cells are changed. If no value is specified, then the respective key is removed from the styles.
Object InsertVertex (Object parent, string id, Object value, double x, double y, double width, double height)
 Creates and adds a new vertex with an empty style, see AddVertex.
Object InsertVertex (Object parent, string id, Object value, double x, double y, double width, double height, string style)
 Creates and adds a new vertex with an empty style, see AddVertex.
Object InsertVertex (Object parent, string id, Object value, double x, double y, double width, double height, string style, bool relative)
 Adds a new vertex into the given parent using value as the user object and the given coordinates as the geometry of the new vertex. The id and style are used for the respective properties of the new cell, which is returned.
Object CreateVertex (Object parent, string id, Object value, double x, double y, double width, double height, string style)
 Creates a new vertex to be used in insertVertex.
Object CreateVertex (Object parent, string id, Object value, double x, double y, double width, double height, string style, bool relative)
 Creates a new vertex to be used in insertVertex.
Object InsertEdge (Object parent, string id, Object value, Object source, Object target)
 Creates and adds a new edge with an empty style.
Object InsertEdge (Object parent, string id, Object value, Object source, Object target, string style)
 Adds a new edge into the given parent using value as the user object and the given source and target as the terminals of the new edge. The Id and style are used for the respective properties of the new cell, which is returned.
Object CreateEdge (Object parent, string id, Object value, Object source, Object target, string style)
 Creates the edge to be used in insertEdge. This implementation does not set the source and target of the edge, these are set when the edge is added to the model.
mxRectangle GetGraphBounds ()
 Returns the bounds of the visible graph.
mxRectangle GetCellBounds (Object cell)
 Returns the bounds of the given cell.
mxRectangle GetCellBounds (Object cell, bool includeEdges)
 Returns the bounds of the given cell including all connected edges if includeEdge is true.
mxRectangle GetCellBounds (Object cell, bool includeEdges, bool includeDescendants)
 Returns the bounds of the given cell including all connected edges if includeEdge is true.
mxRectangle GetBoundingBox (Object cell)
 Returns the bounds of the given cell.
mxRectangle GetBoundingBox (Object cell, bool includeEdges)
 Returns the bounding box of the given cell including all connected edges if includeEdge is true.
mxRectangle GetBoundingBox (Object cell, bool includeEdges, bool includeDescendants)
 Returns the bounding box of the given cell including all connected edges if includeEdge is true.
mxRectangle GetPaintBounds (Object[] cells)
 Returns the bounding box of the given cells and their descendants.
mxRectangle GetBoundsForCells (Object[] cells, bool includeEdges, bool includeDescendants, bool boundingBox)
 Returns the bounds for the given cells.
mxRectangle GetCellBounds (Object cell, bool includeEdges, bool includeDescendants, bool boundingBox)
 Returns the bounds of the given cell including all connected edges if includeEdge is true.
mxConnectionConstraint GetConnectionConstraint (mxCellState edge, mxCellState terminal, bool source)
 Returns a connection constraint that describes the given connection point. This result can then be passed to getConnectionPoint.
mxPoint GetConnectionPoint (mxCellState vertex, mxConnectionConstraint constraint)
 Returns the nearest point in the list of absolute points or the center of the opposite terminal.
Object GetCellAt (int x, int y)
 Returns the cell at the given location.
Object GetCellAt (int x, int y, bool hitSwimlaneContent)
 Returns the cell at the given location.
Object GetCellAt (int x, int y, bool hitSwimlaneContent, Object parent)
 Returns the bottom-most cell that intersects the given point (x, y) in the cell hierarchy starting at the given parent.
bool Intersects (mxCellState state, Rectangle rect)
 Returns the bottom-most cell that intersects the given point (x, y) in the cell hierarchy that starts at the given parent.
bool HitsSwimlaneContent (Object swimlane, int x, int y)
 Returns true if the given point is inside the content area of the given swimlane. (The content area of swimlanes is transparent to events.) This implementation does not check if the given state is a swimlane, it is assumed that the caller has checked this before using this method.
Object[] GetChildVertices (Object parent)
 Returns the visible child vertices of the given parent.
Object[] GetChildEdges (Object parent)
 Returns the visible child edges of the given parent.
Object[] GetChildCells (Object parent)
 Returns the visible children of the given parent.
Object[] GetChildCells (Object parent, bool vertices, bool edges)
 Returns the visible child vertices or edges in the given parent. If vertices and edges is false, then all children are returned.
Object[] GetConnections (Object cell)
 Returns all visible edges connected to the given cell without loops.
Object[] GetConnections (Object cell, Object parent)
 Returns all visible edges connected to the given cell without loops.
Object[] GetIncomingEdges (Object cell)
 Returns all incoming visible edges connected to the given cell without loops.
Object[] GetIncomingEdges (Object cell, Object parent)
 Returns the visible incoming edges for the given cell. If the optional parent argument is specified, then only child edges of the given parent are returned.
Object[] GetOutgoingEdges (Object cell)
 Returns all outgoing visible edges connected to the given cell without loops.
Object[] GetOutgoingEdges (Object cell, Object parent)
 Returns the visible outgoing edges for the given cell. If the optional parent argument is specified, then only child edges of the given parent are returned.
Object[] GetEdges (Object cell)
 Returns all visible edges connected to the given cell including loops.
Object[] GetEdges (Object cell, Object parent)
 Returns all visible edges connected to the given cell including loops.
Object[] GetEdges (Object cell, Object parent, bool incoming, bool outgoing, bool includeLoops)
 Returns the incoming and/or outgoing edges for the given cell. If the optional parent argument is specified, then only edges are returned where the opposite is in the given parent cell. If at least one of incoming or outgoing is true, then loops are ignored, if both are false, then all edges connected to the given cell are returned including loops.
Object[] GetEdges (Object cell, Object parent, bool incoming, bool outgoing, bool includeLoops, bool recurse)
 Returns the incoming and/or outgoing edges for the given cell. If the optional parent argument is specified, then only edges are returned where the opposite is in the given parent cell. If at least one of incoming or outgoing is true, then loops are ignored, if both are false, then all edges connected to the given cell are returned including loops.
bool IsValidAncestor (Object cell, Object parent, bool recurse)
 Returns whether or not the specified parent is a valid ancestor of the specified cell, either direct or indirectly based on whether ancestor recursion is enabled.
Object[] GetOpposites (Object[] edges, Object terminal)
 Returns all distinct visible opposite cells of the terminal on the given edges.
Object[] GetOpposites (Object[] edges, Object terminal, bool sources, bool targets)
 Returns all distincts visible opposite cells for the specified terminal on the given edges.
Object[] GetEdgesBetween (Object source, Object target)
 Returns the edges between the given source and target. This takes into account collapsed and invisible cells and returns the connected edges as displayed on the screen.
Object[] GetEdgesBetween (Object source, Object target, bool directed)
 Returns the edges between the given source and target. This takes into account collapsed and invisible cells and returns the connected edges as displayed on the screen.
List< Object > FindTreeRoots (Object parent)
 Returns all children in the given parent which do not have incoming edges. If the result is empty then the with the greatest difference between incoming and outgoing edges is returned.
List< Object > FindTreeRoots (Object parent, bool isolate)
 Returns all children in the given parent which do not have incoming edges. If the result is empty then the with the greatest difference between incoming and outgoing edges is returned.
List< Object > FindTreeRoots (Object parent, bool isolate, bool invert)
 Returns all children in the given parent which do not have incoming edges. If the result is empty then the with the greatest difference between incoming and outgoing edges is returned.
void DrawGraph (mxICanvas canvas)
 Draws the graph onto the given canvas.
void DrawCell (mxICanvas canvas, Object cell)
 Draws the given cell onto the specified canvas.
void DrawState (mxICanvas canvas, mxCellState state, String label)
 Draws the given cell and label onto the specified canvas. No children or descendants are painted.
void GraphModelChanged ()
 Called when the graph model has changed to invalidate the view.

Public Attributes

const String VERSION = "1.10.4.0"
 Holds the version number of this release. Current version is 1.10.4.0.

Protected Member Functions

mxStylesheet CreateStylesheet ()
 Constructs a new stylesheet to be used in this graph.
mxGraphView CreateGraphView ()
 Constructs a new view to be used in this graph.
Dictionary< string, Object > PostProcessCellStyle (Dictionary< string, Object > style)
 Tries to resolve the value for the image style in the image bundles and turns short data URIs as defined in mxImageBundle to data URIs as defined in RFC 2397 of the IETF.

Protected Attributes

mxIGraphModel model
 Holds the model that contains the cells to be displayed.
mxStylesheet stylesheet
 Holds the stylesheet that defines the appearance of the cells.
mxGraphView view
 Holds the view that caches the cell states.
mxEdgeStyleFunction defaultLoopStyle = mxEdgeStyle.Loop
 Specifies the default style for loops.
int tolerance = 4
 Specifies the tolerance for mouse clicks. Default is 4.
bool labelsVisible = true
 Specifies if labels should be visible. This is used in GetLabel. Default is true.
int gridSize = 10
 Specifies the grid size. Default is 10.
bool gridEnabled = true
 Specifies if the grid is enabled. Default is true.
List< mxImageBundleimageBundles = new List<mxImageBundle>()
 Holds the list of image bundles.

Properties

mxIGraphModel Model [get, set]
 Sets or returns the graph model that contains the graph data.
mxStylesheet Stylesheet [get, set]
 Sets or returns the stylesheet that provides the style.
mxGraphView View [get, set]
 Sets or returns the view that contains the cell states.
mxEdgeStyleFunction DefaultLoopStyle [get, set]
 Sets or returns the default edge style for loops.
bool GridEnabled [get, set]
 Sets or returns the enabled state of the grid.
int GridSize [get, set]
 Sets or returns the grid size.
bool LabelsVisible [get, set]
 Sets or returns if labels are visible.
List< mxImageBundleImageBundles [get, set]
 Sets or returns the image bundles.

Detailed Description

Implements a graph object that allows to create diagrams from a graph model and stylesheet.


Constructor & Destructor Documentation

com::mxgraph::mxGraph::mxGraph (  )  [inline]

Constructs a new graph with an empty graph model.

com::mxgraph::mxGraph::mxGraph ( mxIGraphModel  model  )  [inline]

Constructs a new graph for the specified model. If no model is specified, then a new, empty graph model is used.

com::mxgraph::mxGraph::mxGraph ( mxStylesheet  stylesheet  )  [inline]

Constructs a new graph for the specified model. If no model is specified, then a new, empty graph model is used.

com::mxgraph::mxGraph::mxGraph ( mxIGraphModel  model,
mxStylesheet  stylesheet 
) [inline]

Constructs a new graph for the specified model. If no model is specified, then a new, empty graph model is used.


Member Function Documentation

void com::mxgraph::mxGraph::AddImageBundle ( mxImageBundle  bundle  )  [inline]

Adds the specified bundle.

string com::mxgraph::mxGraph::ConvertValueToString ( Object  cell  )  [inline]

Returns the textual representation for the given cell.

Parameters:
cell Cell to be converted to a string.
Returns:
Returns the textual representation of the cell.
Object com::mxgraph::mxGraph::CreateEdge ( Object  parent,
string  id,
Object  value,
Object  source,
Object  target,
string  style 
) [inline]

Creates the edge to be used in insertEdge. This implementation does not set the source and target of the edge, these are set when the edge is added to the model.

mxGraphView com::mxgraph::mxGraph::CreateGraphView (  )  [inline, protected]

Constructs a new view to be used in this graph.

Returns:
mxStylesheet com::mxgraph::mxGraph::CreateStylesheet (  )  [inline, protected]

Constructs a new stylesheet to be used in this graph.

Returns:
Object com::mxgraph::mxGraph::CreateVertex ( Object  parent,
string  id,
Object  value,
double  x,
double  y,
double  width,
double  height,
string  style,
bool  relative 
) [inline]

Creates a new vertex to be used in insertVertex.

Object com::mxgraph::mxGraph::CreateVertex ( Object  parent,
string  id,
Object  value,
double  x,
double  y,
double  width,
double  height,
string  style 
) [inline]

Creates a new vertex to be used in insertVertex.

void com::mxgraph::mxGraph::DrawCell ( mxICanvas  canvas,
Object  cell 
) [inline]

Draws the given cell onto the specified canvas.

Parameters:
canvas Canvas onto which the cell should be drawn.
cell Cell that should be drawn onto the canvas.
void com::mxgraph::mxGraph::DrawGraph ( mxICanvas  canvas  )  [inline]

Draws the graph onto the given canvas.

Parameters:
canvas Canvas onto which the graph should be drawn.
void com::mxgraph::mxGraph::DrawState ( mxICanvas  canvas,
mxCellState  state,
String  label 
) [inline]

Draws the given cell and label onto the specified canvas. No children or descendants are painted.

List<Object> com::mxgraph::mxGraph::FindTreeRoots ( Object  parent,
bool  isolate,
bool  invert 
) [inline]

Returns all children in the given parent which do not have incoming edges. If the result is empty then the with the greatest difference between incoming and outgoing edges is returned.

Parameters:
parent Cell whose children should be checked.
isolate Specifies if edges should be ignored if the opposite end is not a child of the given parent cell.
invert Specifies if outgoing or incoming edges should be counted for a tree root. If false then outgoing edges will be counted.
Returns:
Array of tree roots in parent.
List<Object> com::mxgraph::mxGraph::FindTreeRoots ( Object  parent,
bool  isolate 
) [inline]

Returns all children in the given parent which do not have incoming edges. If the result is empty then the with the greatest difference between incoming and outgoing edges is returned.

Parameters:
parent Cell whose children should be checked.
isolate Specifies if edges should be ignored if the opposite end is not a child of the given parent cell.
Returns:
Array of tree roots in parent.
List<Object> com::mxgraph::mxGraph::FindTreeRoots ( Object  parent  )  [inline]

Returns all children in the given parent which do not have incoming edges. If the result is empty then the with the greatest difference between incoming and outgoing edges is returned.

Parameters:
parent Cell whose children should be checked.
Returns:
mxRectangle com::mxgraph::mxGraph::GetBoundingBox ( Object  cell,
bool  includeEdges,
bool  includeDescendants 
) [inline]

Returns the bounding box of the given cell including all connected edges if includeEdge is true.

mxRectangle com::mxgraph::mxGraph::GetBoundingBox ( Object  cell,
bool  includeEdges 
) [inline]

Returns the bounding box of the given cell including all connected edges if includeEdge is true.

mxRectangle com::mxgraph::mxGraph::GetBoundingBox ( Object  cell  )  [inline]

Returns the bounds of the given cell.

mxRectangle com::mxgraph::mxGraph::GetBoundsForCells ( Object[]  cells,
bool  includeEdges,
bool  includeDescendants,
bool  boundingBox 
) [inline]

Returns the bounds for the given cells.

Object com::mxgraph::mxGraph::GetCellAt ( int  x,
int  y,
bool  hitSwimlaneContent,
Object  parent 
) [inline]

Returns the bottom-most cell that intersects the given point (x, y) in the cell hierarchy starting at the given parent.

Parameters:
x X-coordinate of the location to be checked.
y Y-coordinate of the location to be checked.
hitSwimlaneContent 
parent that should be used as the root of the recursion.
Returns:
Returns the child at the given location.
Object com::mxgraph::mxGraph::GetCellAt ( int  x,
int  y,
bool  hitSwimlaneContent 
) [inline]

Returns the cell at the given location.

Object com::mxgraph::mxGraph::GetCellAt ( int  x,
int  y 
) [inline]

Returns the cell at the given location.

mxRectangle com::mxgraph::mxGraph::GetCellBounds ( Object  cell,
bool  includeEdges,
bool  includeDescendants,
bool  boundingBox 
) [inline]

Returns the bounds of the given cell including all connected edges if includeEdge is true.

mxRectangle com::mxgraph::mxGraph::GetCellBounds ( Object  cell,
bool  includeEdges,
bool  includeDescendants 
) [inline]

Returns the bounds of the given cell including all connected edges if includeEdge is true.

mxRectangle com::mxgraph::mxGraph::GetCellBounds ( Object  cell,
bool  includeEdges 
) [inline]

Returns the bounds of the given cell including all connected edges if includeEdge is true.

mxRectangle com::mxgraph::mxGraph::GetCellBounds ( Object  cell  )  [inline]

Returns the bounds of the given cell.

mxGeometry com::mxgraph::mxGraph::GetCellGeometry ( Object  cell  )  [inline]

Returns the geometry for the given cell.

Parameters:
cell Cell whose geometry should be returned.
Returns:
Returns the geometry of the cell.
Dictionary<string, Object> com::mxgraph::mxGraph::GetCellStyle ( Object  cell  )  [inline]

Returns the style for the given cell.

Parameters:
cell Cell whose style should be returned.
Returns:
Returns the style of the cell.
Object [] com::mxgraph::mxGraph::GetChildCells ( Object  parent,
bool  vertices,
bool  edges 
) [inline]

Returns the visible child vertices or edges in the given parent. If vertices and edges is false, then all children are returned.

Parameters:
parent Cell whose children should be returned.
vertices Specifies if child vertices should be returned.
edges Specifies if child edges should be returned.
Returns:
Object [] com::mxgraph::mxGraph::GetChildCells ( Object  parent  )  [inline]

Returns the visible children of the given parent.

Object [] com::mxgraph::mxGraph::GetChildEdges ( Object  parent  )  [inline]

Returns the visible child edges of the given parent.

Parameters:
parent Cell whose children should be returned.
Returns:
mxPoint com::mxgraph::mxGraph::GetChildOffsetForCell ( Object  cell  )  [inline]

Returns the offset to be used for the cells inside the given cell. The root and layer cells may be identified using mxGraphModel.isRoot and mxGraphModel.isLayer. This implementation returns null.

Parameters:
cell Cell whose offset should be returned.
Returns:
Returns the child offset for the given cell.
Object [] com::mxgraph::mxGraph::GetChildVertices ( Object  parent  )  [inline]

Returns the visible child vertices of the given parent.

Parameters:
parent Cell whose children should be returned.
Returns:
mxConnectionConstraint com::mxgraph::mxGraph::GetConnectionConstraint ( mxCellState  edge,
mxCellState  terminal,
bool  source 
) [inline]

Returns a connection constraint that describes the given connection point. This result can then be passed to getConnectionPoint.

Parameters:
edge Cell state that represents the edge.
terminal Cell state that represents the terminal.
source Boolean indicating if the terminal is the source or target.
Returns:
mxPoint com::mxgraph::mxGraph::GetConnectionPoint ( mxCellState  vertex,
mxConnectionConstraint  constraint 
) [inline]

Returns the nearest point in the list of absolute points or the center of the opposite terminal.

Parameters:
vertex Cell state that represents the vertex.
constraint Connection constraint that represents the connection point constraint as returned by getConnectionConstraint.
Object [] com::mxgraph::mxGraph::GetConnections ( Object  cell,
Object  parent 
) [inline]

Returns all visible edges connected to the given cell without loops.

Parameters:
cell Cell whose connections should be returned.
parent Optional parent of the opposite end for a connection to be returned.
Returns:
Returns the connected edges for the given cell.
Object [] com::mxgraph::mxGraph::GetConnections ( Object  cell  )  [inline]

Returns all visible edges connected to the given cell without loops.

Parameters:
cell Cell whose connections should be returned.
Returns:
Returns the connected edges for the given cell.
Object com::mxgraph::mxGraph::GetDefaultParent (  )  [inline]

Returns the first child of the root in the model, that is, the first or default layer of the diagram.

Returns:
Returns the default parent for new cells.
Object [] com::mxgraph::mxGraph::GetEdges ( Object  cell,
Object  parent,
bool  incoming,
bool  outgoing,
bool  includeLoops,
bool  recurse 
) [inline]

Returns the incoming and/or outgoing edges for the given cell. If the optional parent argument is specified, then only edges are returned where the opposite is in the given parent cell. If at least one of incoming or outgoing is true, then loops are ignored, if both are false, then all edges connected to the given cell are returned including loops.

Parameters:
cell Cell whose edges should be returned.
parent Optional parent of the opposite end for an edge to be returned.
incoming Specifies if incoming edges should be included in the result.
outgoing Specifies if outgoing edges should be included in the result.
includeLoops Specifies if loops should be included in the result.
recurse Boolean the specifies if the parent specified only need be an ancestral parent, true, or the direct parent, false.
Returns:
Returns the edges connected to the given cell.
Object [] com::mxgraph::mxGraph::GetEdges ( Object  cell,
Object  parent,
bool  incoming,
bool  outgoing,
bool  includeLoops 
) [inline]

Returns the incoming and/or outgoing edges for the given cell. If the optional parent argument is specified, then only edges are returned where the opposite is in the given parent cell. If at least one of incoming or outgoing is true, then loops are ignored, if both are false, then all edges connected to the given cell are returned including loops.

Parameters:
cell Cell whose edges should be returned.
parent Optional parent of the opposite end for an edge to be returned.
incoming Specifies if incoming edges should be included in the result.
outgoing Specifies if outgoing edges should be included in the result.
includeLoops Specifies if loops should be included in the result.
Returns:
Returns the edges connected to the given cell.
Object [] com::mxgraph::mxGraph::GetEdges ( Object  cell,
Object  parent 
) [inline]

Returns all visible edges connected to the given cell including loops.

Parameters:
cell Cell whose edges should be returned.
parent Optional parent of the opposite end for an edge to be returned.
Returns:
Returns the edges of the given cell.
Object [] com::mxgraph::mxGraph::GetEdges ( Object  cell  )  [inline]

Returns all visible edges connected to the given cell including loops.

Parameters:
cell Cell whose edges should be returned.
Returns:
Returns the edges of the given cell.
Object [] com::mxgraph::mxGraph::GetEdgesBetween ( Object  source,
Object  target,
bool  directed 
) [inline]

Returns the edges between the given source and target. This takes into account collapsed and invisible cells and returns the connected edges as displayed on the screen.

Parameters:
source 
target 
directed 
Returns:
Object [] com::mxgraph::mxGraph::GetEdgesBetween ( Object  source,
Object  target 
) [inline]

Returns the edges between the given source and target. This takes into account collapsed and invisible cells and returns the connected edges as displayed on the screen.

Parameters:
source 
target 
Returns:
mxRectangle com::mxgraph::mxGraph::GetGraphBounds (  )  [inline]

Returns the bounds of the visible graph.

String com::mxgraph::mxGraph::GetImageFromBundles ( String  key  )  [inline]

Searches all bundles for the specified key and returns the value for the first match or null if the key is not found.

Parameters:
key 
Returns:
Object [] com::mxgraph::mxGraph::GetIncomingEdges ( Object  cell,
Object  parent 
) [inline]

Returns the visible incoming edges for the given cell. If the optional parent argument is specified, then only child edges of the given parent are returned.

Parameters:
cell Cell whose incoming edges should be returned.
parent Optional parent of the opposite end for a connection to be returned.
Returns:
Returns the incoming edges of the given cell.
Object [] com::mxgraph::mxGraph::GetIncomingEdges ( Object  cell  )  [inline]

Returns all incoming visible edges connected to the given cell without loops.

Parameters:
cell Cell whose incoming edges should be returned.
Returns:
Returns the incoming edges of the given cell.
string com::mxgraph::mxGraph::GetLabel ( Object  cell  )  [inline]

Returns a string or markup that represents the label for the given cell. This implementation uses ConvertValueToString if labelsVisible is true. Otherwise it returns an empty string.

Parameters:
cell 
Returns:
Object [] com::mxgraph::mxGraph::GetOpposites ( Object[]  edges,
Object  terminal,
bool  sources,
bool  targets 
) [inline]

Returns all distincts visible opposite cells for the specified terminal on the given edges.

Parameters:
edges Edges whose opposite terminals should be returned.
terminal Terminal that specifies the end whose opposite should be returned.
sources Specifies if source terminals should be included in the result.
targets Specifies if targer terminals should be included in the result.
Returns:
Object [] com::mxgraph::mxGraph::GetOpposites ( Object[]  edges,
Object  terminal 
) [inline]

Returns all distinct visible opposite cells of the terminal on the given edges.

Parameters:
edges 
terminal 
Returns:
Object [] com::mxgraph::mxGraph::GetOutgoingEdges ( Object  cell,
Object  parent 
) [inline]

Returns the visible outgoing edges for the given cell. If the optional parent argument is specified, then only child edges of the given parent are returned.

Parameters:
cell Cell whose outgoing edges should be returned.
parent Optional parent of the opposite end for a connection to be returned.
Returns:
Returns the outgoing edges of the given cell.
Object [] com::mxgraph::mxGraph::GetOutgoingEdges ( Object  cell  )  [inline]

Returns all outgoing visible edges connected to the given cell without loops.

Parameters:
cell Cell whose outgoing edges should be returned.
Returns:
Returns the outgoing edges of the given cell.
mxRectangle com::mxgraph::mxGraph::GetPaintBounds ( Object[]  cells  )  [inline]

Returns the bounding box of the given cells and their descendants.

void com::mxgraph::mxGraph::GraphModelChanged (  )  [inline]

Called when the graph model has changed to invalidate the view.

bool com::mxgraph::mxGraph::HitsSwimlaneContent ( Object  swimlane,
int  x,
int  y 
) [inline]

Returns true if the given point is inside the content area of the given swimlane. (The content area of swimlanes is transparent to events.) This implementation does not check if the given state is a swimlane, it is assumed that the caller has checked this before using this method.

Object com::mxgraph::mxGraph::InsertEdge ( Object  parent,
string  id,
Object  value,
Object  source,
Object  target,
string  style 
) [inline]

Adds a new edge into the given parent using value as the user object and the given source and target as the terminals of the new edge. The Id and style are used for the respective properties of the new cell, which is returned.

Parameters:
parent Cell that specifies the parent of the new edge.
id Optional string that defines the Id of the new edge.
value Object to be used as the user object.
source Cell that defines the source of the edge.
target Cell that defines the target of the edge.
style Optional string that defines the cell style.
Returns:
Returns the new edge that has been inserted.
Object com::mxgraph::mxGraph::InsertEdge ( Object  parent,
string  id,
Object  value,
Object  source,
Object  target 
) [inline]

Creates and adds a new edge with an empty style.

Object com::mxgraph::mxGraph::InsertVertex ( Object  parent,
string  id,
Object  value,
double  x,
double  y,
double  width,
double  height,
string  style,
bool  relative 
) [inline]

Adds a new vertex into the given parent using value as the user object and the given coordinates as the geometry of the new vertex. The id and style are used for the respective properties of the new cell, which is returned.

Parameters:
parent Cell that specifies the parent of the new vertex.
id Optional string that defines the Id of the new vertex.
value Object to be used as the user object.
x Integer that defines the x coordinate of the vertex.
y Integer that defines the y coordinate of the vertex.
width Integer that defines the width of the vertex.
height Integer that defines the height of the vertex.
style Optional string that defines the cell style.
Returns:
Returns the new vertex that has been inserted.
Object com::mxgraph::mxGraph::InsertVertex ( Object  parent,
string  id,
Object  value,
double  x,
double  y,
double  width,
double  height,
string  style 
) [inline]

Creates and adds a new vertex with an empty style, see AddVertex.

Object com::mxgraph::mxGraph::InsertVertex ( Object  parent,
string  id,
Object  value,
double  x,
double  y,
double  width,
double  height 
) [inline]

Creates and adds a new vertex with an empty style, see AddVertex.

bool com::mxgraph::mxGraph::Intersects ( mxCellState  state,
Rectangle  rect 
) [inline]

Returns the bottom-most cell that intersects the given point (x, y) in the cell hierarchy that starts at the given parent.

Parameters:
state 
rect 
Returns:
Returns true if the given cell state and rectangle intersect.
bool com::mxgraph::mxGraph::IsCellCollapsed ( Object  cell  )  [inline]

Returns true if the given cell is collapsed. This implementation returns true if the collapsed state of the cell in the model is true.

Parameters:
cell Cell whose collapsed state should be returned.
Returns:
Returns the collapsed state of the cell.
bool com::mxgraph::mxGraph::IsCellConnectable ( Object  cell  )  [inline]

Returns true if the given cell is connectable. This implementation returns true if the connectable state of the cell in the model is true.

Parameters:
cell Cell whose connectable state should be returned.
Returns:
Returns the connectable state of the cell.
bool com::mxgraph::mxGraph::IsCellMovable ( Object  cell  )  [inline]

Returns true if the given cell is movable. This implementation always returns true.

Parameters:
cell Cell whose movable state should be returned.
Returns:
Returns true if the cell is movable.
bool com::mxgraph::mxGraph::IsCellVisible ( Object  cell  )  [inline]

Returns true if the given cell is visible. This implementation returns true if the visible state of the cell in the model is true.

Parameters:
cell Cell whose visible state should be returned.
Returns:
Returns the visible state of the cell.
bool com::mxgraph::mxGraph::IsOrthogonal ( mxCellState  edge  )  [inline]

Returns true if perimeter points should be computed such that the resulting edge has only horizontal or vertical segments.

Parameters:
edge Cell state that represents the edge.
Returns:
True if the edge is orthogonal.
bool com::mxgraph::mxGraph::IsSwimlane ( Object  cell  )  [inline]

Returns true if the given cell is a swimlane.

Parameters:
cell Cell that should be checked.
Returns:
Returns true if the cell is a swimlane.
bool com::mxgraph::mxGraph::IsValidAncestor ( Object  cell,
Object  parent,
bool  recurse 
) [inline]

Returns whether or not the specified parent is a valid ancestor of the specified cell, either direct or indirectly based on whether ancestor recursion is enabled.

Parameters:
cell The possible child cell
parent The possible parent cell
recurse boolean whether or not to recurse the child ancestors
Dictionary<string, Object> com::mxgraph::mxGraph::PostProcessCellStyle ( Dictionary< string, Object >  style  )  [inline, protected]

Tries to resolve the value for the image style in the image bundles and turns short data URIs as defined in mxImageBundle to data URIs as defined in RFC 2397 of the IETF.

void com::mxgraph::mxGraph::RemoveImageBundle ( mxImageBundle  bundle  )  [inline]

Removes the specified bundle.

void com::mxgraph::mxGraph::SetCellStyles ( String  key,
String  value,
Object[]  cells 
) [inline]

Sets the key to value in the styles of the given cells. This will modify the existing cell styles in-place and override any existing assignment for the given key. If no cells are specified, then the selection cells are changed. If no value is specified, then the respective key is removed from the styles.

Parameters:
key String representing the key to be assigned.
value String representing the new value for the key.
cells Array of cells to change the style for.
double com::mxgraph::mxGraph::Snap ( double  value  )  [inline]

Snaps the given numeric value to the grid if gridEnabled is true.

Parameters:
value Numeric value to be snapped to the grid.
Returns:
Returns the value aligned to the grid.

Member Data Documentation

mxEdgeStyleFunction com::mxgraph::mxGraph::defaultLoopStyle = mxEdgeStyle.Loop [protected]

Specifies the default style for loops.

bool com::mxgraph::mxGraph::gridEnabled = true [protected]

Specifies if the grid is enabled. Default is true.

int com::mxgraph::mxGraph::gridSize = 10 [protected]

Specifies the grid size. Default is 10.

Holds the list of image bundles.

bool com::mxgraph::mxGraph::labelsVisible = true [protected]

Specifies if labels should be visible. This is used in GetLabel. Default is true.

Holds the model that contains the cells to be displayed.

Holds the stylesheet that defines the appearance of the cells.

int com::mxgraph::mxGraph::tolerance = 4 [protected]

Specifies the tolerance for mouse clicks. Default is 4.

const String com::mxgraph::mxGraph::VERSION = "1.10.4.0"

Holds the version number of this release. Current version is 1.10.4.0.

Holds the view that caches the cell states.


Property Documentation

mxEdgeStyleFunction com::mxgraph::mxGraph::DefaultLoopStyle [get, set]

Sets or returns the default edge style for loops.

bool com::mxgraph::mxGraph::GridEnabled [get, set]

Sets or returns the enabled state of the grid.

int com::mxgraph::mxGraph::GridSize [get, set]

Sets or returns the grid size.

List<mxImageBundle> com::mxgraph::mxGraph::ImageBundles [get, set]

Sets or returns the image bundles.

bool com::mxgraph::mxGraph::LabelsVisible [get, set]

Sets or returns if labels are visible.

mxIGraphModel com::mxgraph::mxGraph::Model [get, set]

Sets or returns the graph model that contains the graph data.

mxStylesheet com::mxgraph::mxGraph::Stylesheet [get, set]

Sets or returns the stylesheet that provides the style.

mxGraphView com::mxgraph::mxGraph::View [get, set]

Sets or returns the view that contains the cell states.


The documentation for this class was generated from the following file:
Generated on Mon Oct 29 20:11:50 2012 for mxGraph by  doxygen 1.6.3