public void removeNode(Cell node) {
        if (cells.contains(node)) {
            cells.remove(node);
            displayProject.getDefineNodes().remove(displayProject.getNodeResource(node.getId()));

            for (Cell cell : cells) {
                for (int i = cell.getToArrowList().size(); i > 0; i--) {
                    Arrow arrow = cell.getToArrowList().get(i - 1);
                    if (arrow.getStartNode().getId().equals(node.getId()) || arrow.getEndNode().getId().equals(node.getId())) {
                        removeArrow(arrow);
                    }
                }
            }

            displayCells();
            setChanged(true);
            repaint();
        }
    }