コード例 #1
0
 private void setLoggingInfo(LoggingInfo loggingInfo) {
   logCategoryCombo.select(loggingInfo.getCategorySelection());
   logLevelScale.setMaximum(LoggingInfo.getLoggingLevelRange(loggingInfo.getCategoryExt()) - 1);
   logLevelScale.setSelection(loggingInfo.getLevelScaleSelection());
   logLevelDesc.setText(PLUS_PREFIX + loggingInfo.getLevelLabelText());
   layout(true, true);
 }
コード例 #2
0
  private void populateLogCategory() {
    LogCategoryExt[] categories = LoggingInfo.getLogCategories();
    Arrays.sort(
        categories,
        new Comparator<LogCategoryExt>() {
          @Override
          public int compare(LogCategoryExt o1, LogCategoryExt o2) {
            return o1.getExternalValue().compareTo(o2.getExternalValue());
          }
        });

    for (int i = 0; i < categories.length; i++) {
      logCategoryCombo.add(categories[i].getExternalValue());
    }
    logCategoryCombo.setVisibleItemCount(LoggingInfo.getLogCategories().length);
  }