コード例 #1
0
  @Override
  public void init() {

    super.init();
    for (ITheme theme : ConsoleLoader.themeReg.getThemes()) {
      if (theme != null) {
        model.addElement(theme.getName());
      }
    }

    themeList.setModel(model);

    this.setVisible(true);
  }
コード例 #2
0
  private void btnReloadThemesActionPerformed(
      java.awt.event.ActionEvent evt) { // GEN-FIRST:event_btnReloadThemesActionPerformed
    model.clear();
    ConsoleLoader.themeReg.clearThemes();

    try {

      ThemeUtils.initThemes();
    } catch (IOException ex) {
      Logger.getLogger(WindowThemePreference.class.getName()).log(Level.SEVERE, null, ex);
    }

    for (ITheme theme : ConsoleLoader.themeReg.getThemes()) {
      if (theme != null) {
        model.addElement(theme.getName());
      }
    }
  } // GEN-LAST:event_btnReloadThemesActionPerformed