/**
   * Reads from a properties file of version 0.1.2
   *
   * @param themeProps the properties
   */
  private void read_0_1_2(Properties themeProps) {
    read_0_1_1(themeProps);

    String scrollbar_smoothscrolling = themeProps.getProperty("scrollbar.smoothscrolling", "true");

    this.scrollbar_smoothscrolling = Boolean.parseBoolean(scrollbar_smoothscrolling);

    String radiobutton_space_size = themeProps.getProperty("radiobutton.space.size", "5");

    this.radiobutton_space_size = Integer.parseInt(radiobutton_space_size);

    String checkbox_space_size = themeProps.getProperty("checkbox.space.size", "5");

    this.checkbox_space_size = Integer.parseInt(checkbox_space_size);

    String frame_title_height = themeProps.getProperty("frame.title.height", "22");
    String frame_title_closebutton_width =
        themeProps.getProperty("frame.title.closebutton.width", "20");
    String frame_title_closebutton_height =
        themeProps.getProperty("frame.title.closebutton.height", "20");

    this.frame_title_height = Integer.parseInt(frame_title_height);
    this.frame_title_closebutton_width = Integer.parseInt(frame_title_closebutton_width);
    this.frame_title_closebutton_height = Integer.parseInt(frame_title_closebutton_height);

    String frame_title_font_name = themeProps.getProperty("frame.title.font.name", "Verdana");
    String frame_title_font_style = themeProps.getProperty("frame.title.font.style", "BOLD");
    String frame_title_font_size = themeProps.getProperty("frame.title.font.size", "12");
    String frame_title_font_color = themeProps.getProperty("frame.title.font.color", "#FFFFFF");

    this.frame_title_font =
        HUDFont.getFont(
            frame_title_font_name,
            string2FontStyle(frame_title_font_style),
            Integer.parseInt(frame_title_font_size));
    this.frame_title_font_color = Colorf.parseColor(frame_title_font_color);

    String frame_contentpane_background_color =
        themeProps.getProperty("frame.contentpane.background.color", null);
    this.frame_contentpane_background_texture =
        themeProps.getProperty("frame.contentpane.background.texture", null);

    if ((frame_contentpane_background_color == null)
        && (frame_contentpane_background_texture == null)) {
      this.frame_contentpane_background_color = Colorf.parseColor("#EFEFEF");
    } else if (frame_contentpane_background_color != null) {
      this.frame_contentpane_background_color =
          Colorf.parseColor(frame_contentpane_background_color);
    }
  }
  /**
   * Reads from a properties file of version 0.1.3
   *
   * @param themeProps the properties
   */
  private void read_0_1_3(Properties themeProps) {
    read_0_1_2(themeProps);

    this.progressbar_border_name =
        themeProps.getProperty("progressbar.border.name", "bevel/lowered");

    String progressbar_label_font_name =
        themeProps.getProperty("progressbar.label.font.name", "Monospace");
    String progressbar_label_font_style =
        themeProps.getProperty("progressbar.label.font.style", "");
    String progressbar_label_font_size =
        themeProps.getProperty("progressbar.label.font.size", "12");
    String progressbar_label_font_color =
        themeProps.getProperty("progressbar.label.font.color", "#000000");

    this.progressbar_label_font =
        HUDFont.getFont(
            progressbar_label_font_name,
            string2FontStyle(progressbar_label_font_style),
            Integer.parseInt(progressbar_label_font_size));
    this.font_color = Colorf.parseColor(progressbar_label_font_color);

    this.progressbar_bar_bottom_height =
        Integer.parseInt(themeProps.getProperty("progressbar.bar.bottom.height", "0"));
    this.progressbar_bar_right_width =
        Integer.parseInt(themeProps.getProperty("progressbar.bar.right.width", "0"));
    this.progressbar_bar_top_height =
        Integer.parseInt(themeProps.getProperty("progressbar.bar.top.height", "0"));
    this.progressbar_bar_left_width =
        Integer.parseInt(themeProps.getProperty("progressbar.bar.left.width", "0"));
  }
  /**
   * Reads from a properties file of version 0.1.8
   *
   * @param themeProps the properties
   */
  private void read_0_1_8(Properties themeProps) {
    read_0_1_7(themeProps);

    String fontName = themeProps.getProperty("font.disabled.name", DEFAULT_FONT_DISABLED_NAME);
    String fontStyle = themeProps.getProperty("font.disabled.style", DEFAULT_FONT_DISABLED_STYLE);
    String fontSize = themeProps.getProperty("font.disabled.size", DEFAULT_FONT_DISABLED_SIZE);
    String font_color = themeProps.getProperty("font.disabled.color", DEFAULT_FONT_DISABLED_COLOR);

    this.font_disabled =
        HUDFont.getFont(fontName, string2FontStyle(fontStyle), Integer.parseInt(fontSize));
    this.font_disabled_color = Colorf.parseColor(font_color);

    String fontName2 =
        themeProps.getProperty("label.font.disabled.name", this.font_disabled.getName());
    String fontStyle2 =
        themeProps.getProperty(
            "label.font.disabled.style", String.valueOf(this.font_disabled.getStyle()));
    String fontSize2 =
        themeProps.getProperty(
            "label.font.disabled.size", String.valueOf(this.font_disabled.getSize()));

    this.label_font_disabled =
        HUDFont.getFont(fontName2, string2FontStyle(fontStyle2), Integer.parseInt(fontSize2));

    String font_color2 = themeProps.getProperty("label.font.disabled.color", null);

    if (font_color2 == null) this.label_font_disabled_color = this.font_disabled_color;
    else this.label_font_disabled_color = Colorf.parseColor(font_color2);

    fontName2 = themeProps.getProperty("button.font.disabled.name", this.font_disabled.getName());
    fontStyle2 =
        themeProps.getProperty(
            "button.font.disabled.style", String.valueOf(this.font_disabled.getStyle()));
    fontSize2 =
        themeProps.getProperty(
            "button.font.disabled.size", String.valueOf(this.font_disabled.getSize()));

    this.button_font_disabled =
        HUDFont.getFont(fontName2, string2FontStyle(fontStyle2), Integer.parseInt(fontSize2));

    font_color2 = themeProps.getProperty("button.font.disabled.color", null);

    if (font_color2 == null) this.button_font_disabled_color = this.font_disabled_color;
    else this.button_font_disabled_color = Colorf.parseColor(font_color2);
  }
  /**
   * Reads from a properties file of version 0.1.6
   *
   * @param themeProps the properties
   */
  private void read_0_1_6(Properties themeProps) {
    read_0_1_5(themeProps);

    String fontName = themeProps.getProperty("button.font.name", this.font.getName());
    String fontStyle =
        themeProps.getProperty("button.font.style", String.valueOf(this.font.getStyle()));
    String fontSize =
        themeProps.getProperty("button.font.size", String.valueOf(this.font.getSize()));
    String font_color = themeProps.getProperty("button.font.color", null);

    this.button_font =
        HUDFont.getFont(fontName, string2FontStyle(fontStyle), Integer.parseInt(fontSize));

    if (font_color == null) this.button_font_color = this.font_color;
    else this.button_font_color = Colorf.parseColor(font_color);
  }
  /**
   * Reads from a properties file of version 0.1.1
   *
   * @param themeProps the properties
   */
  private void read_0_1_1(Properties themeProps) {
    this.name = themeProps.getProperty("theme.name", "UNNAMED");

    String fontName = themeProps.getProperty("font.name", DEFAULT_FONT_NAME);
    String fontStyle = themeProps.getProperty("font.style", DEFAULT_FONT_STYLE);
    String fontSize = themeProps.getProperty("font.size", DEFAULT_FONT_SIZE);
    String font_color = themeProps.getProperty("font.color", DEFAULT_FONT_COLOR);

    this.font = HUDFont.getFont(fontName, string2FontStyle(fontStyle), Integer.parseInt(fontSize));
    this.font_color = Colorf.parseColor(font_color);

    this.button_size_bottom = Integer.parseInt(themeProps.getProperty("button.size.bottom", "10"));
    this.button_size_right = Integer.parseInt(themeProps.getProperty("button.size.right", "10"));
    this.button_size_top = Integer.parseInt(themeProps.getProperty("button.size.top", "10"));
    this.button_size_left = Integer.parseInt(themeProps.getProperty("button.size.left", "10"));
  }
  /**
   * Reads from a properties file of version 0.1.4
   *
   * @param themeProps the properties
   */
  private void read_0_1_4(Properties themeProps) {
    read_0_1_3(themeProps);

    this.border_rounded_corners_size_bottom =
        Integer.parseInt(themeProps.getProperty("border.rounded_corners.size.bottom", "4"));
    this.border_rounded_corners_size_right =
        Integer.parseInt(themeProps.getProperty("border.rounded_corners.size.right", "4"));
    this.border_rounded_corners_size_top =
        Integer.parseInt(themeProps.getProperty("border.rounded_corners.size.top", "4"));
    this.border_rounded_corners_size_left =
        Integer.parseInt(themeProps.getProperty("border.rounded_corners.size.left", "4"));
    this.border_rounded_corners_size_ll_upper =
        Integer.parseInt(themeProps.getProperty("border.rounded_corners.size.ll.upper", "4"));
    this.border_rounded_corners_size_ll_right =
        Integer.parseInt(themeProps.getProperty("border.rounded_corners.size.ll.right", "4"));
    this.border_rounded_corners_size_lr_left =
        Integer.parseInt(themeProps.getProperty("border.rounded_corners.size.lr.left", "4"));
    this.border_rounded_corners_size_lr_upper =
        Integer.parseInt(themeProps.getProperty("border.rounded_corners.size.lr.upper", "4"));
    this.border_rounded_corners_size_ur_lower =
        Integer.parseInt(themeProps.getProperty("border.rounded_corners.size.ur.lower", "4"));
    this.border_rounded_corners_size_ur_left =
        Integer.parseInt(themeProps.getProperty("border.rounded_corners.size.ur.left", "4"));
    this.border_rounded_corners_size_ul_right =
        Integer.parseInt(themeProps.getProperty("border.rounded_corners.size.ul.right", "4"));
    this.border_rounded_corners_size_ul_lower =
        Integer.parseInt(themeProps.getProperty("border.rounded_corners.size.ul.lower", "4"));

    this.border_bevel_lowered_size_bottom =
        Integer.parseInt(themeProps.getProperty("border.bevel.lowered.size.bottom", "2"));
    this.border_bevel_lowered_size_right =
        Integer.parseInt(themeProps.getProperty("border.bevel.lowered.size.right", "2"));
    this.border_bevel_lowered_size_top =
        Integer.parseInt(themeProps.getProperty("border.bevel.lowered.size.top", "2"));
    this.border_bevel_lowered_size_left =
        Integer.parseInt(themeProps.getProperty("border.bevel.lowered.size.left", "2"));
    this.border_bevel_lowered_size_ll_upper =
        Integer.parseInt(themeProps.getProperty("border.bevel.lowered.size.ll.upper", "0"));
    this.border_bevel_lowered_size_ll_right =
        Integer.parseInt(themeProps.getProperty("border.bevel.lowered.size.ll.right", "0"));
    this.border_bevel_lowered_size_lr_left =
        Integer.parseInt(themeProps.getProperty("border.bevel.lowered.size.lr.left", "0"));
    this.border_bevel_lowered_size_lr_upper =
        Integer.parseInt(themeProps.getProperty("border.bevel.lowered.size.lr.upper", "0"));
    this.border_bevel_lowered_size_ur_lower =
        Integer.parseInt(themeProps.getProperty("border.bevel.lowered.size.ur.lower", "0"));
    this.border_bevel_lowered_size_ur_left =
        Integer.parseInt(themeProps.getProperty("border.bevel.lowered.size.ur.left", "0"));
    this.border_bevel_lowered_size_ul_right =
        Integer.parseInt(themeProps.getProperty("border.bevel.lowered.size.ul.right", "0"));
    this.border_bevel_lowered_size_ul_lower =
        Integer.parseInt(themeProps.getProperty("border.bevel.lowered.size.ul.lower", "0"));

    this.border_bevel_raised_size_bottom =
        Integer.parseInt(themeProps.getProperty("border.bevel.raised.size.bottom", "2"));
    this.border_bevel_raised_size_right =
        Integer.parseInt(themeProps.getProperty("border.bevel.raised.size.right", "2"));
    this.border_bevel_raised_size_top =
        Integer.parseInt(themeProps.getProperty("border.bevel.raised.size.top", "2"));
    this.border_bevel_raised_size_left =
        Integer.parseInt(themeProps.getProperty("border.bevel.raised.size.left", "2"));
    this.border_bevel_raised_size_ll_upper =
        Integer.parseInt(themeProps.getProperty("border.bevel.raised.size.ll.upper", "0"));
    this.border_bevel_raised_size_ll_right =
        Integer.parseInt(themeProps.getProperty("border.bevel.raised.size.ll.right", "00"));
    this.border_bevel_raised_size_lr_left =
        Integer.parseInt(themeProps.getProperty("border.bevel.raised.size.lr.left", "0"));
    this.border_bevel_raised_size_lr_upper =
        Integer.parseInt(themeProps.getProperty("border.bevel.raised.size.lr.upper", "0"));
    this.border_bevel_raised_size_ur_lower =
        Integer.parseInt(themeProps.getProperty("border.bevel.raised.size.ur.lower", "0"));
    this.border_bevel_raised_size_ur_left =
        Integer.parseInt(themeProps.getProperty("border.bevel.raised.size.ur.left", "0"));
    this.border_bevel_raised_size_ul_right =
        Integer.parseInt(themeProps.getProperty("border.bevel.raised.size.ul.right", "0"));
    this.border_bevel_raised_size_ul_lower =
        Integer.parseInt(themeProps.getProperty("border.bevel.raised.size.ul.lower", "0"));

    this.border_frame_size_bottom =
        Integer.parseInt(themeProps.getProperty("border.frame.size.bottom", "3"));
    this.border_frame_size_right =
        Integer.parseInt(themeProps.getProperty("border.frame.size.right", "3"));
    this.border_frame_size_top =
        Integer.parseInt(themeProps.getProperty("border.frame.size.top", "0"));
    this.border_frame_size_left =
        Integer.parseInt(themeProps.getProperty("border.frame.size.left", "3"));
    this.border_frame_size_ll_upper =
        Integer.parseInt(themeProps.getProperty("border.frame.size.ll.upper", "0"));
    this.border_frame_size_ll_right =
        Integer.parseInt(themeProps.getProperty("border.frame.size.ll.right", "0"));
    this.border_frame_size_lr_left =
        Integer.parseInt(themeProps.getProperty("border.frame.size.lr.left", "0"));
    this.border_frame_size_lr_upper =
        Integer.parseInt(themeProps.getProperty("border.frame.size.lr.upper", "0"));
    this.border_frame_size_ur_lower =
        Integer.parseInt(themeProps.getProperty("border.frame.size.ur.lower", "0"));
    this.border_frame_size_ur_left =
        Integer.parseInt(themeProps.getProperty("border.frame.size.ur.left", "0"));
    this.border_frame_size_ul_right =
        Integer.parseInt(themeProps.getProperty("border.frame.size.ul.right", "0"));
    this.border_frame_size_ul_lower =
        Integer.parseInt(themeProps.getProperty("border.frame.size.ul.lower", "0"));

    this.list_border_name = themeProps.getProperty("list.border.name", "bevel/lowered");
    String list_background = themeProps.getProperty("list.background", null);
    if (list_background == null) {
      this.list_background_color = null;
      this.use_texture_for_list_background = false;
    } else if (list_background.equalsIgnoreCase("texture")) {
      this.list_background_color = null;
      this.use_texture_for_list_background = true;
    } else {
      this.list_background_color = Colorf.parseColor(list_background);
      this.use_texture_for_list_background = false;
    }
    this.list_padding_bottom = Integer.parseInt(themeProps.getProperty("list.padding.bottom", "0"));
    this.list_padding_right = Integer.parseInt(themeProps.getProperty("list.padding.right", "0"));
    this.list_padding_top = Integer.parseInt(themeProps.getProperty("list.padding.top", "0"));
    this.list_padding_left = Integer.parseInt(themeProps.getProperty("list.padding.left", "3"));
    String list_selection_background = themeProps.getProperty("list.selection.background", null);
    String list_selection_foreground = themeProps.getProperty("list.selection.foreground", null);
    this.list_selection_background =
        (list_selection_background != null) ? Colorf.parseColor(list_selection_background) : null;
    this.list_selection_foreground =
        (list_selection_foreground != null) ? Colorf.parseColor(list_selection_foreground) : null;

    this.combobox_list_border_name =
        themeProps.getProperty("combobox.list.border.name", "bevel/raised");
    String combobox_list_hover_background =
        themeProps.getProperty("combobox.list.hover.background", null);
    String combobox_list_hover_foreground =
        themeProps.getProperty("combobox.list.hover.foreground", null);
    this.combobox_list_hover_background =
        (combobox_list_hover_background != null)
            ? Colorf.parseColor(combobox_list_hover_background)
            : null;
    this.combobox_list_hover_foreground =
        (combobox_list_hover_foreground != null)
            ? Colorf.parseColor(combobox_list_hover_foreground)
            : null;

    String textfield_background_color = themeProps.getProperty("textfield.background", null);
    this.textfield_background_color =
        (textfield_background_color != null) ? Colorf.parseColor(textfield_background_color) : null;
    this.textfield_border_size_bottom =
        Integer.parseInt(themeProps.getProperty("textfield.border.size.bottom", "2"));
    this.textfield_border_size_right =
        Integer.parseInt(themeProps.getProperty("textfield.border.size.right", "2"));
    this.textfield_border_size_top =
        Integer.parseInt(themeProps.getProperty("textfield.border.size.top", "2"));
    this.textfield_border_size_left =
        Integer.parseInt(themeProps.getProperty("textfield.border.size.left", "2"));

    this.textfield_caret_texture = themeProps.getProperty("textfield.caret.texture", "black");

    String slider_size_height = themeProps.getProperty("slider.size.height", "23");
    String slider_handle_yoffset = themeProps.getProperty("slider.handle.yoffset", "0");
    String slider_smoothsliding = themeProps.getProperty("slider.smoothsliding", "true");

    this.slider_size_height = Integer.parseInt(slider_size_height);
    this.slider_handle_yoffset = Integer.parseInt(slider_handle_yoffset);
    this.slider_smoothsliding = Boolean.parseBoolean(slider_smoothsliding);
  }