@Override
    public void mouseReleased(MouseEvent me) {
        //System.out.println("Released");
        Object tool = PSTricksGraphEditor.gtb.getSelectedTool();
        if (selecterBandStart != null){
            Point2D mousePoint = me.getPoint();
            Edge prototype = (Edge) tool;
            Edge newEdge = (Edge) prototype.clone();
            if (PSTricksGraphEditor.graph.addEdge(newEdge,selecterBandStart, mousePoint)){
                //if(newEdge instanceof LineEdge){
                    selected = newEdge;
                //}else{
                //    selected = newEdge;
                    // when new edge is arc edge
                    // or circle edge, prevent user to add duplicated edges
                    // arc edge
                    PSTricksGraphEditor.gtb.selectItem.setSelected(true);
                //}
            }
        }
        
        revalidate();
        repaint();
            
        lastMousePoint = null;
        dragStartBounds = null;
        selecterBandStart = null;
    }