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

jvergara
26.50.2008 b4d63bc81c6b04210a5ba01c222280b0a81fa3fc
Fix for issue 3263 (jdk 6 supported fonts has to be used in GUI module (quicksetup))

Rely on the look and feel and use the default JLabel font as a basis to derive the other fonts. By default the JRE should provide a font that handles properly the locale.
1 files modified
60 ■■■■■ changed files
opends/src/quicksetup/org/opends/quicksetup/ui/UIFactory.java 60 ●●●●● patch | view | raw | blame | history
opends/src/quicksetup/org/opends/quicksetup/ui/UIFactory.java
@@ -360,31 +360,44 @@
  public static final Border DIALOG_PANEL_BORDER =
    BorderFactory.createMatteBorder(0, 0, 2, 0, PANEL_BORDER_COLOR);
  private static Font defaultFont;
  static
  {
    try
    {
      defaultFont = UIManager.getFont("Label.font").deriveFont(Font.PLAIN).
      deriveFont(12f);
    }
    catch (Throwable t)
    {
      defaultFont = Font.decode("SansSerif-PLAIN-12");
    }
  }
  /**
   * Specifies the font for the step which is not the current one in the steps
   * panel.
   */
  public static final Font NOT_CURRENT_STEP_FONT =
    Font.decode("SansSerif-PLAIN-14");
  public static final Font NOT_CURRENT_STEP_FONT = defaultFont.deriveFont(14f);
  /**
   * Specifies the font for the step which is the current one in the steps
   * panel.
   */
  public static final Font CURRENT_STEP_FONT =
    Font.decode("SansSerif-BOLD-14");
    defaultFont.deriveFont(14f).deriveFont(Font.BOLD);
  /**
   * Specifies the font for the title of the current panel.
   */
  public static final Font TITLE_FONT =
    Font.decode("SansSerif-BOLD-14");
    defaultFont.deriveFont(14f).deriveFont(Font.BOLD);
  /**
   * Specifies the font for the instructions of the current panel.
   */
  public static final Font INSTRUCTIONS_FONT =
    Font.decode("SansSerif-PLAIN-12");
  public static final Font INSTRUCTIONS_FONT = defaultFont;
  /**
   * Specifies the font for the instructions of the current panel.
@@ -396,63 +409,61 @@
   * Specifies the font for the primary valid field.
   */
  public static final Font PRIMARY_FIELD_VALID_FONT =
    Font.decode("SansSerif-BOLD-12");
    defaultFont.deriveFont(Font.BOLD);
  /**
   * Specifies the font for the secondary valid field.
   */
  public static final Font SECONDARY_FIELD_VALID_FONT =
    Font.decode("SansSerif-PLAIN-12");
  public static final Font SECONDARY_FIELD_VALID_FONT = defaultFont;
  /**
   * Specifies the font for the primary invalid field.
   */
  public static final Font PRIMARY_FIELD_INVALID_FONT =
    Font.decode("SansSerif-BOLDITALIC-12");
    defaultFont.deriveFont(Font.BOLD | Font.ITALIC);
  /**
   * Specifies the font for the secondary invalid field.
   */
  public static final Font SECONDARY_FIELD_INVALID_FONT =
    Font.decode("SansSerif-ITALIC-12");
    defaultFont.deriveFont(Font.ITALIC);
  /**
   * Specifies the font for the secondary invalid field.
   * Specifies the font for the secondary status field.
   */
  public static final Font SECONDARY_STATUS_FONT =
    Font.decode("SansSerif-ITALIC-12");
    defaultFont.deriveFont(Font.ITALIC);
  /**
   * Specifies the font for read only text.
   */
  public static final Font READ_ONLY_FONT = Font.decode("SansSerif-PLAIN-12");
  public static final Font READ_ONLY_FONT = defaultFont;
  /**
   * Specifies the font for the check box text.
   */
  public static final Font CHECKBOX_FONT = Font.decode("SansSerif-PLAIN-12");
  public static final Font CHECKBOX_FONT = defaultFont;
  /**
   * Specifies the font for the progress text.
   */
  public static final Font PROGRESS_FONT = Font.decode("SansSerif-PLAIN-12");
  public static final Font PROGRESS_FONT = defaultFont;
  /**
   * Specifies the font for the text field text.
   */
  public static final Font TEXTFIELD_FONT = Font.decode("SansSerif-PLAIN-12");
  public static final Font TEXTFIELD_FONT = defaultFont;
  /**
   * Specifies the font for the password field text.
   */
  public static final Font PASSWORD_FIELD_FONT =
    Font.decode("SansSerif-PLAIN-12");
  public static final Font PASSWORD_FIELD_FONT = defaultFont;
  /**
   * Specifies the font for the points '....' in the progress panel.
   */
  public static final Font PROGRESS_POINTS_FONT =
    Font.decode("SansSerif-BOLD-12");
    defaultFont.deriveFont(Font.BOLD);
  /**
   * Specifies the font for the done text 'Done' in the progress panel.
@@ -475,24 +486,23 @@
   * Specifies the font for the error messages in the progress panel.
   */
  public static final Font PROGRESS_ERROR_FONT =
    Font.decode("SansSerif-BOLD-12");
    defaultFont.deriveFont(Font.BOLD);
  /**
   * Specifies the font for the warning messages in the progress panel.
   */
  public static final Font PROGRESS_WARNING_FONT =
    Font.decode("SansSerif-BOLD-12");
    defaultFont.deriveFont(Font.BOLD);
  /**
   * Specifies the font for the stack trace in the progress panel.
   */
  public static final Font STACK_FONT = Font.decode("SansSerif-PLAIN-12");
  public static final Font STACK_FONT = defaultFont;
  /**
   * Specifies the font for the text in the WebBrowserErrorDialog.
   */
  public static final Font ERROR_DIALOG_FONT =
      Font.decode("SansSerif-PLAIN-12");
  public static final Font ERROR_DIALOG_FONT = defaultFont;
  private static final String SPAN_CLOSE = "</span>";