In jgraph, is there a function similiar to the .getText(); for a vertex? I need to get the text attached to them in the label.
Thanks.
This example prints you the label of the vertex if you right click on it.
graphComponent.getGraphControl().addMouseListener(new MouseAdapter()
{
@Override
public void mousePressed(MouseEvent e)
{
if (SwingUtilities.isRightMouseButton(e))
{
mxCell cell =(mxCell) getGraphComponent().getCellAt(e.getX(), e.getY());
if(cell != null)
{
System.out.println(cell.getValue().toString());
}
}
}
});