private static Color getBorderColor(AbstractButton b) {
    ButtonModel bm = b.getModel();

    Color focusedBorderColor = (Color)b.getClientProperty("JButton.focusedBorderColor");
    if (bm.isPressed()) {
      return focusedBorderColor != null ?
             focusedBorderColor : UIManager.getColor("Button.intellij.native.pressedBorderColor");
    }
    else if (b.hasFocus() || bm.isRollover() || DarculaButtonUI.isDefaultButton(b)) {
      return focusedBorderColor != null ?
             focusedBorderColor : UIManager.getColor("Button.intellij.native.focusedBorderColor");
    }
    else {
      Color borderColor = (Color)b.getClientProperty("JButton.borderColor");
      return borderColor != null ? borderColor : UIManager.getColor("Button.intellij.native.borderColor");
    }
  }
private static Color getBorderColor(AbstractButton b)