I am using a Graph Editor made with JGraphX. When there are two vertices connected with an edge, and the user clicks on the first vertex, I want to get the value of the second vertex.
I am getting the current vertex by:
Object cell = mycomponent.getCellAt(e.getX(), e.getY());
Then I am getting the outgoing edge with:
Object outgoing = mygraph.getOutgoingEdges(cell);
Finally, on the debugger, I am able to see that the outgoing object[] has the edge on the object[0]. But I am not able to get the value of the target vertex.
This is the structure
outgoing (type object[])
1.1 [0] (type mxCell)
1.1.1 target (type mxCell)
1.1.1.1 value (type string)
Is there any easier way to do this, or how should I be able to get the value of the second vertex?