1 package prefuse.data.tuple; 2 3 import prefuse.data.Edge; 4 import prefuse.data.Graph; 5 import prefuse.data.Node; 6 import prefuse.data.Table; 7 8 13 public class TableEdge extends TableTuple implements Edge { 14 15 18 protected Graph m_graph; 19 20 30 protected void init(Table table, Graph graph, int row) { 31 m_table = table; 32 m_graph = graph; 33 m_row = m_table.isValidRow(row) ? row : -1; 34 } 35 36 39 public Graph getGraph() { 40 return m_graph; 41 } 42 43 46 public boolean isDirected() { 47 return m_graph.isDirected(); 48 } 49 50 53 public Node getSourceNode() { 54 return m_graph.getSourceNode(this); 55 } 56 57 60 public Node getTargetNode() { 61 return m_graph.getTargetNode(this); 62 } 63 64 67 public Node getAdjacentNode(Node n) { 68 return m_graph.getAdjacentNode(this, n); 69 } 70 71 } | Popular Tags |