/** * Internal method for clearing the edge table, removing all edges. */ protected void clearEdges() { getEdgeTable().clear(); }
/** * Clears the contents of this table and then attempts to add the given * Tuple instance. * @param t the Tuple to make the sole tuple in thie table * @return the actual Tuple instance added to this table, or null if * no new Tuple has been added * @see prefuse.data.tuple.TupleSet#setTuple(prefuse.data.Tuple) */ public Tuple setTuple(Tuple t) { clear(); return addTuple(t); }
/** * Clear this graph, removing all nodes and edges. * @see prefuse.data.tuple.TupleSet#clear() */ public void clear() { m_nodeTuples.invalidateAll(); m_edgeTuples.invalidateAll(); super.clear(); m_links.clear(); }
/** * Removes all the rows. * */ public void removeAllRows() { try { if (this.canRemoveRow()) { this.table.clear(); this.fireTableEvent(0, getLastRowIndex(), TableListener.ALL_COLUMN, TableListener.DELETE); } } catch (Exception e) { throw new ObviousRuntimeException(e); } }
/** * Updates this graph to use a different edge structure for the same nodes. * All other settings will remain the same (e.g., directionality, keys) * @param edges the new edge table. */ public void setEdgeTable(Table edges) { Table oldEdges = getEdgeTable(); oldEdges.removeTableListener(m_listener); m_edgeTuples.invalidateAll(); m_links.clear(); init(getNodeTable(), edges, m_directed, m_nkey, m_skey, m_tkey); }