/* * (non-Javadoc) * * @see org.jgraph.graph.GraphModel#remove(java.lang.Object[]) */ public void remove(Object[] cells) { if (cells != null) { try { processRemove(cells, true); super.remove(cells); } catch (Exception e) { e.printStackTrace(); } } else { super.remove(cells); } }
/* * (non-Javadoc) * * @see org.jgraph.graph.GraphModel#insert(java.lang.Object[], * java.util.Map, org.jgraph.graph.ConnectionSet, * org.jgraph.graph.ParentMap, javax.swing.undo.UndoableEdit[]) */ public void insert( Object[] cells, Map attributes, ConnectionSet cs, ParentMap pm, UndoableEdit[] edits) { if (cells != null || attributes != null || cs != null) { try { processInsert(cells, attributes, cs, pm, true); super.insert(cells, attributes, cs, pm, edits); } catch (Exception e) { e.printStackTrace(); } } else { super.insert(cells, attributes, cs, pm, edits); } }
/* * (non-Javadoc) * * @see org.jgraph.graph.GraphModel#edit(java.util.Map, * org.jgraph.graph.ConnectionSet, org.jgraph.graph.ParentMap, * javax.swing.undo.UndoableEdit[]) */ public void edit(Map attributes, ConnectionSet cs, ParentMap pm, UndoableEdit[] edits) { if ((attributes != null && !attributes.isEmpty()) || (cs != null && !cs.isEmpty())) { try { // Call source / targetChanged processConnectionSet(cs, true); processParentMap(pm, true); processNestedAttributes(attributes, true); super.edit(attributes, cs, pm, edits); } catch (Exception e) { e.printStackTrace(); } } else { super.edit(attributes, cs, pm, edits); } }
/** * @param edge * @return the user object associated with the vertex connected to the target end of this edge */ public Object getTargetVertexUserObject(Object edge) { Object cell = DefaultGraphModel.getTargetVertex(this, edge); return getValue(cell); }