question: @ SuppressWarnings ( "unchecked" ) public void mouseReleased ( MouseEvent e ) { if ( checkModifiers ( e ) ) { final VisualizationViewer < V , E > vv = ( VisualizationViewer < V , E > ) e . getSource ( ) ; final Point2D p = e . getPoint ( ) ; Layout < V , E > layout = vv . getGraphLayout ( ) ; if ( createMode == Creating . EDGE ) { GraphElementAccessor < V , E > pickSupport = vv . getPickSupport ( ) ; V vertex = null ; if ( pickSupport != null ) { vertex = pickSupport . getVertex ( layout , p . getX ( ) , p . getY ( ) ) ; } edgeSupport . endEdgeCreate ( vv , vertex ) ; } else if ( createMode == Creating . VERTEX ) { vertexSupport . endVertexCreate ( vv , e . getPoint ( ) ) ; } } createMode = Creating . UNDETERMINED ; }
target:  If startVertex is non-null, and the mouse is released over an existing vertex, create an undirected edge from startVertex to the vertex under the mouse pointer. If shift was also pressed, create a directed edge instead.