public void mousePressed(MouseEvent e) {
        e.translatePoint(tx, ty);
        if (checkButton(e, MouseEvent.BUTTON1)) {
            Component c = findClickedComponent(e);
            if (c != null && c != parent) {
                if (checkExMask(e, MouseEvent.SHIFT_DOWN_MASK)) {
                    toggleSelect(c);
                } else {
                    select(c);
                }
            }
            guidelines.repaint();
        }
        if (e.getModifiersEx() == MouseEvent.BUTTON1_DOWN_MASK) {
            resizer = guidelines.findResizer(e.getX(), e.getY());
            if (resizer == null) {
                chosen = findClickedComponent(e);
                if (chosen != null) {
                    nc = lm.getConstraint(chosen);
                    if (chosen != parent) {
                        chosenToFront(parent);
                        setOrigin(e.getX(), e.getY());
                        updateBackground();
                        setupGuides(chosen.getBounds());
                    } else {
                        clearSelection();
                        chosen = null;
                    }
                }
            } else {
                chosen = resizer.getC();
                setupGuides(chosen.getBounds());
                chosen = null;
            }
        }
    }