public boolean deleteWithMouse(MouseEvent mouse) {
        Tool tool = GUI.controls.getTool();
        Object o = getObject(mouseGetX(mouse), mouseGetY(mouse), tool);
        if (o == null)
            return false;
        if (o instanceof Vertex) {
            removeVertex((Vertex) o);
            return true;
        } else if (o instanceof Edge) {
            removeEdge((Edge) o);
            return true;
        }
        return false;
    }