mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

jvergara
03.53.2009 13b15363f6726829495b6602aadbab2156624617
Fix for issue 4062 (control-panel craps out when pointed (in error) to DS 6.3 (I assume any LDAP server))

The problem is that in some cases the property returned by UIManager through: UIManager.getBorder("List.focusCellHighlightBorder") can be null.

This issue has nothing to do with the fact that the server is local or remote, but with the look and feel of the system.

The fix consists of checking whether this border is defined or not; if it is not defined, use a predefined border.
1 files modified
12 ■■■■ changed files
opends/src/guitools/org/opends/guitools/controlpanel/ui/components/ActionButton.java 12 ●●●● patch | view | raw | blame | history
opends/src/guitools/org/opends/guitools/controlpanel/ui/components/ActionButton.java
@@ -22,7 +22,7 @@
 * CDDL HEADER END
 *
 *
 *      Copyright 2008 Sun Microsystems, Inc.
 *      Copyright 2008-2009 Sun Microsystems, Inc.
 */
@@ -73,8 +73,16 @@
    int n = b.getIconTextGap() + b.getIcon().getIconWidth() +
    b.getBorder().getBorderInsets(b).left;
    buttonBorder = new EmptyBorder(5, n, 5, 25);
    Border highlightBorder =
      UIManager.getBorder("List.focusCellHighlightBorder");
    if (highlightBorder == null)
    {
      highlightBorder =
        new javax.swing.plaf.BorderUIResource.LineBorderUIResource(
            ColorAndFontConstants.pressedForeground, 1);
    }
    focusBorder = BorderFactory.createCompoundBorder(
        UIManager.getBorder("List.focusCellHighlightBorder"), buttonBorder);
        highlightBorder, buttonBorder);
  };
  private static final Color defaultBackground =