code: @SuppressWarnings("unchecked")
  public void mousePressed(MouseEvent e) {
      if(checkModifiers(e)) {
          final VisualizationViewer<String,String> vv =
              (VisualizationViewer<String,String>)e.getSource();
          final Point2D p = e.getPoint();
          GraphElementAccessor<String,String> pickSupport = vv.getPickSupport();
          if(pickSupport != null) {
          	
              final String vertex = pickSupport.getVertex(vv.getModel().getGraphLayout(), p.getX(), p.getY());
              if(vertex != null) { // get ready to make an edge
                  startVertex = vertex;
                  down = e.getPoint();
                  transformEdgeShape(down, down);
                  vv.addPostRenderPaintable(edgePaintable);
                  transformArrowShape(down, e.getPoint());
                  vv.addPostRenderPaintable(arrowPaintable);
              }
          }
          vv.repaint();
      }
  }
docs: If the mouse is pressed in an empty area, create a new vertex there.
  If the mouse is pressed on an existing vertex, prepare to create
  an edge from that vertex to another