/** * Returns a boolean indicating if the given <em>mxCell</em> should be ignored as a vertex. This returns true if the cell has no connections. * * @param vertex * Object that represents the vertex to be tested. * @return Returns true if the vertex should be ignored. */ public boolean isVertexIgnored(Object vertex) { return super.isVertexIgnored(vertex) || graph.isSwimlane(vertex) || graph.getModel().getGeometry(vertex).isRelative() || graph.getConnections(vertex).length == 0; }
/** * */ protected Polyline createLine(double dx, double dy, Polyline next) { return new Polyline(dx, dy, next); }
/** * */ protected void executeLayout(mxIGraphLayout layout, Object parent) { if (layout != null && parent != null) { layout.execute(parent); } }
/** * Moves the specified node and all of its children by the given amount. */ protected void localEdgeProcessing(TreeNode node) { processNodeOutgoing(node); TreeNode child = node.child; while (child != null) { localEdgeProcessing(child); child = child.next; } }
/** * */ protected void layoutLeaf(TreeNode node) { double dist = 2 * nodeDistance; node.contour.upperTail = createLine(node.height + dist, 0, null); node.contour.upperHead = node.contour.upperTail; node.contour.lowerTail = createLine(0, -node.width - dist, null); node.contour.lowerHead = createLine(node.height + dist, 0, node.contour.lowerTail); }
/** * Returns the constraint for the given key and cell. This implementation * always returns the value for the given key in the style of the given * cell. * * @param key Key of the constraint to be returned. * @param cell Cell whose constraint should be returned. */ public Object getConstraint(Object key, Object cell) { return getConstraint(key, cell, null, false); }
/** * Obtains the energy cost function for the specified node being moved. * This involves calling <code>getEdgeLength</code> for all * edges connected to the specified node * @param node * the node whose connected edges cost functions are to be * calculated * @return the total edge length energy of the connected edges */ protected double getEdgeLengthAffectedEdges(int node) { double energy = 0.0; for (int i = 0; i < v[node].connectedEdges.length; i++) { energy += getEdgeLength(v[node].connectedEdges[i]); } return energy; }
/** * Returns a boolean indicating if the given <mxCell> should be ignored as a * vertex. This returns true if the cell has no connections. * * @param vertex Object that represents the vertex to be tested. * @return Returns true if the vertex should be ignored. */ public boolean isVertexIgnored(Object vertex) { return super.isVertexIgnored(vertex) || graph.getConnections(vertex).length == 0; }
/** * */ protected void executeLayout(mxIGraphLayout layout, Object parent) { if (layout != null && parent != null) { layout.execute(parent); } }
/** * Moves the specified node and all of its children by the given amount. */ protected void localEdgeProcessing(TreeNode node) { processNodeOutgoing(node); TreeNode child = node.child; while (child != null) { localEdgeProcessing(child); child = child.next; } }
/** * */ protected void layoutLeaf(TreeNode node) { double dist = 2 * nodeDistance; node.contour.upperTail = createLine(node.height + dist, 0, null); node.contour.upperHead = node.contour.upperTail; node.contour.lowerTail = createLine(0, -node.width - dist, null); node.contour.lowerHead = createLine(node.height + dist, 0, node.contour.lowerTail); }
/** * */ protected Polyline createLine(double dx, double dy, Polyline next) { return new Polyline(dx, dy, next); }
/** * Returns the constraint for the given key and cell. This implementation * always returns the value for the given key in the style of the given * cell. * * @param key Key of the constraint to be returned. * @param cell Cell whose constraint should be returned. */ public Object getConstraint(Object key, Object cell) { return getConstraint(key, cell, null, false); }
/** * Returns a boolean indicating if the given <mxCell> should be ignored as a * vertex. This returns true if the cell has no connections. * * @param vertex Object that represents the vertex to be tested. * @return Returns true if the vertex should be ignored. */ public boolean isVertexIgnored(Object vertex) { return super.isVertexIgnored(vertex) || graph.getConnections(vertex).length == 0; }
/** * */ protected void attachParent(TreeNode node, double height) { double x = nodeDistance + levelDistance; double y2 = (height - node.width) / 2 - nodeDistance; double y1 = y2 + node.width + 2 * nodeDistance - height; node.child.offsetX = x + node.height; node.child.offsetY = y1; node.contour.upperHead = createLine(node.height, 0, createLine(x, y1, node.contour.upperHead)); node.contour.lowerHead = createLine(node.height, 0, createLine(x, y2, node.contour.lowerHead)); }
/** * */ protected void attachParent(TreeNode node, double height) { double x = nodeDistance + levelDistance; double y2 = (height - node.width) / 2 - nodeDistance; double y1 = y2 + node.width + 2 * nodeDistance - height; node.child.offsetX = x + node.height; node.child.offsetY = y1; node.contour.upperHead = createLine(node.height, 0, createLine(x, y1, node.contour.upperHead)); node.contour.lowerHead = createLine(node.height, 0, createLine(x, y2, node.contour.lowerHead)); }