protected void restoreButtonBorder(AbstractButton b) {
        Object cp = b.getClientProperty("paintToolBarBorder");
        if ((cp != null) && (cp instanceof Boolean)) {
            Boolean changeBorder = (Boolean)cp;
            if (!changeBorder.booleanValue()) {
                return;
            }
        }
        Border border = (Border) orgBorders.get(b);
        if (border != null) {
            if (border instanceof NullBorder) {
                b.setBorder(null);
            } else {
                b.setBorder(border);
            }
        }
        b.setMargin((Insets) orgMargins.get(b));
    }