public void setAlignment(MouseEvent event) {
        EventTarget target = event.getTarget();
        VerticalAlignment vAlignment = null;
        HorizontalAlignment hAlignment = null;

        if (target.equals(topLeft)) {
            vAlignment = VerticalAlignment.TOP;
            hAlignment = HorizontalAlignment.LEFT;
        }
        if (target.equals(topCenter)) {
            vAlignment = VerticalAlignment.TOP;
            hAlignment = HorizontalAlignment.CENTER;
        }
        if (target.equals(topRight)) {
            vAlignment = VerticalAlignment.TOP;
            hAlignment = HorizontalAlignment.RIGHT;
        }
        if (target.equals(centerLeft)) {
            vAlignment = VerticalAlignment.CENTER;
            hAlignment = HorizontalAlignment.LEFT;
        }
        if (target.equals(centerCenter)) {
            vAlignment = VerticalAlignment.CENTER;
            hAlignment = HorizontalAlignment.CENTER;
        }
        if (target.equals(centerRight)) {
            vAlignment = VerticalAlignment.CENTER;
            hAlignment = HorizontalAlignment.RIGHT;
        }
        if (target.equals(bottomLeft)) {
            vAlignment = VerticalAlignment.BOTTOM;
            hAlignment = HorizontalAlignment.LEFT;
        }
        if (target.equals(bottomCenter)) {
            vAlignment = VerticalAlignment.BOTTOM;
            hAlignment = HorizontalAlignment.CENTER;
        }
        if (target.equals(bottomRight)) {
            vAlignment = VerticalAlignment.BOTTOM;
            hAlignment = HorizontalAlignment.RIGHT;
        }

        core.setVerticalAlignment(vAlignment);
        core.setHorizontalAlignment(hAlignment);

        resetButtons();

        ((Rectangle) target).setFill(ACTIVE_PAINT);
    }