@Override
  public void mouseDragged(MouseEvent e) {

    currentX = getGraphCoordinateX(e.getX());
    currentY = getGraphCoordinateY(e.getY());

    if (leftPressed && !rightPressed) // Left click is for arrows
    {

      /* If left click and drag:
       * 		1. If clicked on nothing, don't draw anything
       * 		2. If clicked on bond, draw line from bond (bond checked first because its
       * 				points aren't on the grid system)
       * 		2. If clicked on element, draw line from element
       */

      drawBondLine = false;

      if (drawArrowLine == true) {
        repaint();
        return;
      }

      MoleculeComponent component = elist.getClickedComponent(e.getX(), e.getY());

      if (component != null) {
        elist.setSelected(component);
        drawArrowLine = true;
      }

      //			Bond bArrowStart = null; //Attempt to find a bond at this point to drag from
      //			for(Bond b : elist.getBonds())
      //			{
      //				if (b.contains(e.getX(), e.getY()))
      //				{
      //					System.out.println("YES!");
      //					bArrowStart = b;
      //					break;
      //				}
      //				else
      //				{
      //					System.out.println("NO :(");
      //				}
      //			}
      //
      //			Element eArrowStart = elist.getElementAt(roundX, roundY);//Attempt to see if there is an
      // element.
      //			if(eArrowStart == null) //If there is no element at this point...
      //			{
      //				if(bArrowStart != null)//Check to see if the bond is null.
      //				{
      //					System.out.println("Did it reach here?");
      //					elist.setSelected(bArrowStart);
      //					drawArrowLine = true;
      //				}
      //			}
      //			else
      //			{
      //				elist.setSelected(elist.getElementAt(eArrowStart.getKey()));//Start the arrow here
      //				drawArrowLine = true;
      //			}

    }

    if (rightPressed && !leftPressed) // Right click is for bonding
    {
      drawArrowLine = false;
      /* Cases to consider:
       * 1. If user is already dragging (this should come first!)
       * 1. Clicked on element
       * 2. Clicked no empty grid space
       */

      if (drawBondLine == true) // if the element is already in the process of being bonded
      {
        repaint();
        return; // No need for further steps.
      }

      currentX = getGraphCoordinateX(e.getX());
      currentY = getGraphCoordinateY(e.getY());

      Element bondStart = elist.getElementAt(currentX, currentY);

      // If this is the initial movement for bonding:
      if (bondStart != null) // if bonding began at element
      {
        elist.setSelected(
            elist.getElementAt(bondStart.getKey())); // keep track of the bonding element
        drawBondLine = true; // indicate that an arrow should start to be drawn
      } else // if nothing is being dragged
      {

      }
    } // */
  }