public void drop(DropTargetDropEvent dtde)
   {
      // Method Instances
      boolean doChangePosition;
      TreePath pathAfter;
      int idxNew, idxOld;
      BrowserItems.DefaultTreeItem itemParent;
      BrowserItems.DefaultTreeItem itemSource;
      BrowserItems.DefaultTreeItem itemAfter;
      QueryTokens._Expression token;
      
      doChangePosition = false;
      pathAfter = tree.getClosestPathForLocation(dtde.getLocation().x, dtde.getLocation().y);
      idxNew = 0;
      
      if (pathSource == null)
         return;
      
      itemSource = (BrowserItems.DefaultTreeItem) pathSource.getLastPathComponent();
      itemAfter = (BrowserItems.DefaultTreeItem) pathAfter.getLastPathComponent();

      if (itemAfter.isNodeSibling(itemSource))
      {
         itemParent = (BrowserItems.DefaultTreeItem) itemSource.getParent();

         idxOld = itemParent.getIndex(itemSource);
         idxNew = itemParent.getIndex(itemAfter);

         doChangePosition = idxOld != idxNew;
         if (idxOld > idxNew)
            idxNew++;
      }
      else
      {
         itemParent = itemAfter;
         doChangePosition = itemParent.isNodeChild(itemSource);
      }

      if (doChangePosition)
      {
         DefaultTreeModel model = (DefaultTreeModel) tree.getModel();
         model.insertNodeInto(itemSource, itemParent, idxNew);
      }
      else if (itemSource.getParent().toString().indexOf(SQLReservedWords.SELECT) != -1
               && itemAfter.toString().indexOf(SQLReservedWords.GROUP_BY) != -1)
               //&& itemSource instanceof BrowserItems.DefaultTreeItem)
      {
         token = (QueryTokens._Expression) itemSource.getUserObject();
         queryBuilderPane.sqlBrowserViewPanel.addGroupByClause(new QueryTokens.Group(token));
      }
      else if (itemSource.getParent().toString().indexOf(SQLReservedWords.SELECT) != -1
               && itemAfter.toString().indexOf(SQLReservedWords.ORDER_BY) != -1)
               //&& itemSource instanceof BrowserItems.DefaultTreeItem)
      {
         token = (QueryTokens._Expression) itemSource.getUserObject();
         queryBuilderPane.sqlBrowserViewPanel.addOrderByClause(new QueryTokens.Order(token));
      }
   }