private static List< mxCell > getSelectionEdges( final mxGraph graph ) { // Build selection categories final Object[] selection = graph.getSelectionCells(); final ArrayList< mxCell > edges = new ArrayList< >(); for ( final Object obj : selection ) { final mxCell cell = ( mxCell ) obj; if ( cell.isEdge() ) edges.add( cell ); } return edges; } }
mxGraph graph = new mxGraph() { @Override public boolean isCellSelectable(Object cell) { if (cell != null) { if (cell instanceof mxCell) { mxCell myCell = (mxCell) cell; if (myCell.isEdge()) return false; } } return super.isCellSelectable(cell); } };
private static List< mxCell > getSelectionEdges( final mxGraph graph ) { // Build selection categories final Object[] selection = graph.getSelectionCells(); final ArrayList< mxCell > edges = new ArrayList< >(); for ( final Object obj : selection ) { final mxCell cell = ( mxCell ) obj; if ( cell.isEdge() ) edges.add( cell ); } return edges; } }
final boolean isEdgeLabel = cell.isEdge();
final boolean isEdgeLabel = cell.isEdge();
if ( lCell.isVertex() ) vertices.add( lCell ); else if ( lCell.isEdge() ) edges.add( lCell );
if ( lCell.isVertex() ) vertices.add( lCell ); else if ( lCell.isEdge() ) edges.add( lCell );
else if ( cell.isEdge() )
else if ( cell.isEdge() )
if ( cell.isEdge() )
if ( cell.isEdge() )
/** * Returns a clone of the cell. */ public Object clone() throws CloneNotSupportedException { mxCell clone = (mxCell) super.clone(); clone.setValue(cloneValue()); clone.setStyle(getStyle()); clone.setCollapsed(isCollapsed()); clone.setConnectable(isConnectable()); clone.setEdge(isEdge()); clone.setVertex(isVertex()); clone.setVisible(isVisible()); clone.setParent(null); clone.setSource(null); clone.setTarget(null); clone.children = null; clone.edges = null; mxGeometry geometry = getGeometry(); if (geometry != null) { clone.setGeometry((mxGeometry) geometry.clone()); } return clone; }
/** * Returns a clone of the cell. */ public Object clone() throws CloneNotSupportedException { mxCell clone = (mxCell) super.clone(); clone.setValue(cloneValue()); clone.setStyle(getStyle()); clone.setCollapsed(isCollapsed()); clone.setConnectable(isConnectable()); clone.setEdge(isEdge()); clone.setVertex(isVertex()); clone.setVisible(isVisible()); clone.setParent(null); clone.setSource(null); clone.setTarget(null); clone.children = null; clone.edges = null; mxGeometry geometry = getGeometry(); if (geometry != null) { clone.setGeometry((mxGeometry) geometry.clone()); } return clone; }