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

jvergara
20.04.2007 a1014a5c52d02fa5044300e49393b265db5e8dd9
Fix for 2318.

In UIFactory we try to update the UIManager but this may fail when we do not have the DISPLAY. Catch the exception and log a message in the logger when this occurs.
1 files modified
13 ■■■■■ changed files
opends/src/quicksetup/org/opends/quicksetup/ui/UIFactory.java 13 ●●●●● patch | view | raw | blame | history
opends/src/quicksetup/org/opends/quicksetup/ui/UIFactory.java
@@ -28,6 +28,7 @@
package org.opends.quicksetup.ui;
import org.opends.messages.Message;
import static org.opends.messages.QuickSetupMessages.*;
import java.awt.Color;
@@ -42,6 +43,8 @@
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.util.HashMap;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.*;
import javax.swing.text.JTextComponent;
@@ -68,6 +71,8 @@
  private static String parentPackagePath;
  private static final Logger LOG = Logger.getLogger(UIFactory.class.getName());
  /**
   * Specifies the horizontal insets between buttons.
   */
@@ -526,6 +531,8 @@
      new HashMap<IconType, ImageIcon>();
  static {
    try
    {
    UIManager.put("OptionPane.background",
            getColor(INFO_OPTIONPANE_BACKGROUND_COLOR.get()));
    UIManager.put("Panel.background",
@@ -533,6 +540,12 @@
    UIManager.put("ComboBox.background",
            getColor(INFO_COMBOBOX_BACKGROUND_COLOR.get()));
  }
    catch (Throwable t)
    {
      // This might occur when we do not get the display
      LOG.log(Level.WARNING, "Error updating UIManager: "+t, t);
    }
  }
  /**
   * The following enumeration contains the different icons that we can have.