Static
BOTTOMStatic
BOTTOM_Static
CENTER_Static
dirStatic
ElbowUses either SideToSide or TopToBottom depending on the horizontal flag in the cell style.
SideToSide is used if horizontal is true
or unspecified.
Static
EntityImplements an entity relation style for edges (as used in database schema diagrams). At the time the function is called, the result array contains a placeholder (null) for the first absolute point, that is, the point where the edge and source terminal are connected. The implementation of the style then adds all intermediate waypoints except for the last point, that is, the connection point between the edge and the target terminal. The first ant the last point in the result array are then replaced with Point that take into account the terminal's perimeter and next point on the edge.
CellState that represents the edge to be updated.
CellState that represents the source terminal.
CellState that represents the target terminal.
List of relative control points.
Array of Point that represent the actual points of the edge.
Static
inlineStatic
LEFTStatic
LEFT_Static
limitsStatic
LoopImplements a self-reference, aka. loop.
Static
MANHATTAN_Static
MANHATTAN_Static
MANHATTAN_Static
MANHATTAN_Static
MANHATTAN_Static
MANHATTAN_Static
ManhattanManhattanConnector code is based on code from https://github.com/mwangm/mxgraph-manhattan-connector
Implements router to find the shortest route that avoids cells using manhattan distance as metric.
Static
orthStatic
OrthImplements a local orthogonal router between the given cells.
CellState that represents the edge to be updated.
CellState that represents the source terminal.
CellState that represents the target terminal.
List of relative control Points.
Array of Points that represent the actual points of the edge.
Static
orthStatic
RIGHTStatic
RIGHT_Static
routeStatic
SegmentImplements an orthogonal edge style. Use EdgeSegmentHandler as an interactive handler for this style.
CellState that represents the edge to be updated.
CellState that represents the source terminal.
CellState that represents the target terminal.
List of relative control points.
Array of Point that represent the actual points of the edge.
Static
SIDE_Static
SideImplements a vertical elbow edge.
Static
SOURCE_Static
TARGET_Static
TOPStatic
TOP_Static
TopImplements a horizontal elbow edge.
Static
VERTEX_Static
vertexStatic
wayStatic
getStatic
get
Provides various edge styles to be used as the values for
edgeStyle
in a cell style.The following example sets the default edge style to
ElbowConnector
:To write a custom edge style, a function can be added to the
EdgeStyle
object as follows. In the example below, a right angle is created using a point on the horizontal center of the target vertex and the vertical center of the source vertex. The code checks if that point intersects the source vertex and makes the edge straight if it does. The point is then added into the result array, which acts as the return value of the function.The new edge style can then be registered in the StyleRegistry as follows:
The custom edge style above can now be used in a specific edge as follows:
The key of the StyleRegistry entry for the function should be used in the CellState.edgeStyle values, unless GraphView#allowEval is
true. In this case, you can also use the
'EdgeStyle.MyStyle'` string for the value in the cell style above.The custom EdgeStyle can be used for all edges in the graph as follows:
It can also be used directly when setting the value of the
edgeStyle
key in a style of a specific edge as follows: