@Override public boolean isReference(Object obj, String attr, Object value, boolean isWrite) { if (attr.equals("child") && obj instanceof mxChildChange && (((mxChildChange) obj).getPrevious() != null || !isWrite)) { return true; } return idrefs.contains(attr); }
@Override public boolean isReference(Object obj, String attr, Object value, boolean isWrite) { if (attr.equals("child") && obj instanceof mxChildChange && (((mxChildChange) obj).getPrevious() != null || !isWrite)) { return true; } return idrefs.contains(attr); }
if (cc.getPrevious() != null) result.add(cc.getPrevious());
if (cc.getParent() != cc.getPrevious()) if (model.isVertex(cc.getPrevious()) || model.isEdge(cc.getPrevious())) result.add(getBoundingBox(cc.getPrevious(), true, true)); result = getBoundingBox(cc.getPrevious(), true, true);
if (cc.getParent() != cc.getPrevious()) if (model.isVertex(cc.getPrevious()) || model.isEdge(cc.getPrevious())) result.add(getBoundingBox(cc.getPrevious(), true, true)); result = getBoundingBox(cc.getPrevious(), true, true);
if (cc.getPrevious() != null) result.add(cc.getPrevious());
@Override public Object afterDecode(mxCodec dec, Node node, Object obj) { if (obj instanceof mxChildChange) { mxChildChange change = (mxChildChange) obj; // Cells are encoded here after a complete transaction so the previous // parent must be restored on the cell for the case where the cell was // added. This is needed for the local model to identify the cell as a // new cell and register the ID. ((mxICell) change.getChild()).setParent((mxICell) change .getPrevious()); change.setPrevious(change.getParent()); change.setPreviousIndex(change.getIndex()); } return obj; }
@Override public Object afterDecode(mxCodec dec, Node node, Object obj) { if (obj instanceof mxChildChange) { mxChildChange change = (mxChildChange) obj; // Cells are encoded here after a complete transaction so the previous // parent must be restored on the cell for the case where the cell was // added. This is needed for the local model to identify the cell as a // new cell and register the ID. ((mxICell) change.getChild()).setParent((mxICell) change .getPrevious()); change.setPrevious(change.getParent()); change.setPreviousIndex(change.getIndex()); } return obj; }