/** * Translates the maps in <code>c</code> using * <code>translate(Map, int, int)</code>. */ public static void translate(Collection c, double dx, double dy) { Iterator it = c.iterator(); while (it.hasNext()) { Object map = it.next(); if (map instanceof AttributeMap) ((AttributeMap) map).translate(dx, dy); } }
+ Math.round((p.getY() - origin.getY()) * sy)); if (!p.equals(loc)) // Scale Location translate(p.getX() - loc.getX(), p.getY() - loc.getY()); int sizeableAxis = GraphConstants.getSizeableAxis(this); if (sizeableAxis == GraphConstants.X_AXIS)
if (nested != null) { nested = GraphConstants.replaceKeys(clones, nested); AttributeMap.translate(nested.values(), dx, dy);
/** * Translates <code>view</code> (group) by <code>dx, dy</code>. * * @param dx * the x-coordinate amount to translate by * @param dy * the y-coordinate amount to translate by */ public void translate(double dx, double dy) { if (isLeaf()) getAllAttributes().translate(dx, dy); else { int moveableAxis = GraphConstants .getMoveableAxis(getAllAttributes()); if (moveableAxis == GraphConstants.X_AXIS) dy = 0; else if (moveableAxis == GraphConstants.Y_AXIS) dx = 0; Iterator it = childViews.iterator(); while (it.hasNext()) { Object view = it.next(); if (view instanceof AbstractCellView) { AbstractCellView child = (AbstractCellView) view; child.translate(dx, dy); } } } }
public void translate(int dx, int dy) { // System.err.println(view.getCell() + ": Translate by " + dx + ", " + dy); if (view.isLeaf()) { model.getAttributes(node).translate(dx, dy); } else { CellView[] cells = view.getChildViews(); for (int index = 0; index < cells.length; index++) { CellView child = cells[index]; model.getAttributes(child.getCell()).translate(dx, dy); child.refresh(model, mapper, false); } } view.refresh(model, mapper, false); } };
if (!attrs.contains(GraphConstants.BOUNDS)) attrs = model.getAttributes(view.getCell()); attrs.translate(dx, dy);
double dx = insert.getX() - bounds.getX(); double dy = insert.getY() - bounds.getY(); AttributeMap.translate(nested.values(), dx, dy); } else if (bounds == null) {