public void saveMoveToUndo(ArrayList<DrawableItem> selected) {
        ArrayList<UndoableItem> toAdd = new ArrayList<>();
        for (DrawableItem selection : selected) {
            UndoableItem ud = new UndoableItem(selection, 2);
            Panel temp = (Panel) selection;
            int dx = ((Panel) selection).getInitialPoint().x - ((Rectangle) temp.getShape()).x;
            int dy = ((Panel) selection).getInitialPoint().y - ((Rectangle) temp.getShape()).y;
            ud.setX(dx);
            ud.setY(dy);
            ((Panel) selection).setInitialPoint(new Point(((Rectangle) temp.getShape()).x, ((Rectangle) temp.getShape()).y));
            toAdd.add(ud);
        }
        this.addItemtoUndo(toAdd);

    }