public Border createBorder(@Nls(capitalization = Nls.Capitalization.Title) final String title,
                             final int titleJustification,
                             final int titlePosition,
                             final Font titleFont,
                             final Color titleColor,
                             final Insets borderSize, 
                             final Color borderColor) {
    Border baseBorder = myBorder;
    if (equals(EMPTY) && borderSize != null) {
      baseBorder = BorderFactory.createEmptyBorder(borderSize.top, borderSize.left, borderSize.bottom, borderSize.right);
    }
    else if (equals(LINE) && borderColor != null) {
      baseBorder = BorderFactory.createLineBorder(borderColor);
    }

    if (title != null) {
      return BorderFactory.createTitledBorder(baseBorder, title, titleJustification, titlePosition, titleFont, titleColor);
    }
    else {
      return baseBorder;
    }
  }
public Border createBorder(@Nls(capitalization = Nls.Capitalization.Title) final String title,
                             final int titleJustification,
                             final int titlePosition,
                             final Font titleFont,
                             final Color titleColor,
                             final Insets borderSize, 
                             final Color borderColor)