예제 #1
0
  protected void refreshAvailableUserConfs(List<UserConf> users) {
    cbModel.clear();
    cbModel.add(I18NHelper.getFormattedLocalization("general.none"));
    for (UserConf conf : users) cbModel.add(conf.getId());

    refreshProfile();
  }
예제 #2
0
  protected int getConfNamePositionInModel(String name) {
    if (name == null || name.isEmpty()) return 0;

    int index = cbModel.indexOf(name);

    if (index < 0) return 0;
    else return index;
  }
예제 #3
0
  protected void loadProfiles() {
    if (GuiManager.mainWindow != null && GuiManager.mainWindow.getLblNewLabel() != null) {
      GuiManager.mainWindow.clearAction();
      GuiManager.mainWindow.pushAction(
          I18NHelper.getFormattedLocalization("gui.action.scanningProfiles"));
    }
    if (GuiManager.mainWindow != null && GuiManager.mainWindow.getProgressBar() != null)
      GuiManager.mainWindow.getProgressBar().setValue(0);
    scanner.scanForProfiles();
    if (GuiManager.mainWindow != null && GuiManager.mainWindow.getProgressBar() != null)
      GuiManager.mainWindow.getProgressBar().setValue(50);
    model.clear();
    for (Profile profile : scanner.getProfiles()) model.add(profile.getName());
    if (GuiManager.mainWindow != null && GuiManager.mainWindow.getLblNewLabel() != null)
      GuiManager.mainWindow.clearAction();
    if (GuiManager.mainWindow != null && GuiManager.mainWindow.getProgressBar() != null)
      GuiManager.mainWindow.getProgressBar().setValue(100);

    readProfilesConf();
  }