public void setAnchorForSelected(DrawableItem di, ArrayList<DrawableItem> allSelected, int[] indexOfAnchor) {

        for (DrawableItem i : allSelected) {
            if (i instanceof Panel && !di.equals(i)) {

                Point anchor = ((Panel) i).getKnobFromIndex(indexOfAnchor[0]);

                ((Panel) i).setAnchor(anchor);

            }
        }
    }