/** * Sets the source or target terminal field for the given edge * without inserting an incoming or outgoing edge in the * respective terminal. */ protected void setTerminal(Object edge, Object terminal, boolean source) { ((mxICell) edge).setTerminal((mxICell) terminal, source); }
/** * Sets the source or target terminal field for the given edge * without inserting an incoming or outgoing edge in the * respective terminal. */ protected void setTerminal(Object edge, Object terminal, boolean source) { ((mxICell) edge).setTerminal((mxICell) terminal, source); }
public mxICell removeEdge(mxICell edge, boolean isOutgoing) { if (edge != null) { if (edge.getTerminal(!isOutgoing) != this && edges != null) { edges.remove(edge); } edge.setTerminal(null, isOutgoing); } return edge; }
public mxICell removeEdge(mxICell edge, boolean isOutgoing) { if (edge != null) { if (edge.getTerminal(!isOutgoing) != this && edges != null) { edges.remove(edge); } edge.setTerminal(null, isOutgoing); } return edge; }
public mxICell insertEdge(mxICell edge, boolean isOutgoing) { if (edge != null) { edge.removeFromTerminal(isOutgoing); edge.setTerminal(this, isOutgoing); if (edges == null || edge.getTerminal(!isOutgoing) != this || !edges.contains(edge)) { if (edges == null) { edges = new ArrayList<Object>(); } edges.add(edge); } } return edge; }
public mxICell insertEdge(mxICell edge, boolean isOutgoing) { if (edge != null) { edge.removeFromTerminal(isOutgoing); edge.setTerminal(this, isOutgoing); if (edges == null || edge.getTerminal(!isOutgoing) != this || !edges.contains(edge)) { if (edges == null) { edges = new ArrayList<Object>(); } edges.add(edge); } } return edge; }
/** * Inserts the given cell into its parent and terminal cells. */ public void insertIntoGraph(mxICell cell) { mxICell parent = cell.getParent(); mxICell source = cell.getTerminal(true); mxICell target = cell.getTerminal(false); // Fixes possible inconsistencies during insert into graph cell.setTerminal(null, false); cell.setTerminal(null, true); cell.setParent(null); if (parent != null) { parent.insert(cell); } if (source != null) { source.insertEdge(cell, true); } if (target != null) { target.insertEdge(cell, false); } }
/** * Inserts the given cell into its parent and terminal cells. */ public void insertIntoGraph(mxICell cell) { mxICell parent = cell.getParent(); mxICell source = cell.getTerminal(true); mxICell target = cell.getTerminal(false); // Fixes possible inconsistencies during insert into graph cell.setTerminal(null, false); cell.setTerminal(null, true); cell.setParent(null); if (parent != null) { parent.insert(cell); } if (source != null) { source.insertEdge(cell, true); } if (target != null) { target.insertEdge(cell, false); } }