/** * Returns the next view at the specified location wrt. <code>current</code>. * This is used to iterate overlapping cells, and cells that are grouped. * The current selection affects this method. <br> * Note: This returns the next <i>selectable </i> view. <br> * Note: Arguments are not expected to be scaled (they are scaled in here). */ public CellView getNextViewAt(CellView current, double x, double y, boolean leafsOnly) { CellView[] cells = AbstractCellView .getDescendantViews(getGraphLayoutCache().getRoots()); return getNextViewAt(cells, current, x, y, leafsOnly); }
/** Process mouse pressed event. */ public void mousePressed(MouseEvent event) { if (!graph.isSizeable()) return; for (int i = 0; i < r.length; i++) { if (r[i].contains(event.getPoint()) && cursors[i] != 0) { Set set = new HashSet(); set.add(vertex.getCell()); contextViews = context.createTemporaryContextViews(set); Object[] all = AbstractCellView .getDescendantViews(new CellView[] { vertex }); if (all.length >= org.jgraph.plaf.basic.BasicGraphUI.MAXHANDLES) cachedBounds = (Rectangle2D) initialBounds.clone(); event.consume(); index = i; return; } } }
public void mouseReleased(MouseEvent e) { if (index != -1) { cachedBounds = computeBounds(e); vertex.setBounds(cachedBounds); CellView[] views = AbstractCellView .getDescendantViews(new CellView[] { vertex }); Map attributes = GraphConstants.createAttributes(views, null); graph.getGraphLayoutCache().edit(attributes, null, null, null); } e.consume(); cachedBounds = null; initialBounds = null; firstDrag = true; }
.getDescendantViews(new CellView[] { view }); for (int j = 0; j < children.length; j++) { if (removedRoots == null) {
.getDescendantViews(new CellView[] { vertex }); for (int i = 0; i < all.length; i++) { CellView orig = graph.getGraphLayoutCache().getMapping(