Skip to content

Commit

Permalink
put overall stats in stats dialog (#166)
Browse files Browse the repository at this point in the history
  • Loading branch information
ix0rai authored Dec 16, 2023
1 parent e762351 commit b154074
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ public static void show(Gui gui, ProjectStatsResult result, String packageName)

Map<StatType, JCheckBox> checkboxes = new EnumMap<>(StatType.class);

final int[] i = {0};
String overallText = I18n.translate("menu.file.stats.overall") + " - " + String.format("%.2f%%", result.getPercentage(StatType.values()));
contentPane.add(new JLabel(overallText), GridBagConstraintsBuilder.create().width(20).anchor(GridBagConstraints.CENTER).build());

final int[] i = {1};
result.getOverall().getTypes().stream().sorted(Comparator.comparing(StatType::getName)).forEach(type -> {
JCheckBox checkBox = new JCheckBox(type.getName());
checkboxes.put(type, checkBox);
Expand Down
1 change: 1 addition & 0 deletions enigma/src/main/resources/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"menu.file.export.jar": "Export Jar...",
"menu.file.stats": "Mapping Stats...",
"menu.file.stats.title": "Mapping Stats",
"menu.file.stats.overall": "Overall",
"menu.file.stats.title_filtered": "Mapping Stats for %s",
"menu.file.stats.filter": "Filter",
"menu.file.stats.top_level_package": "Top-Level Package:",
Expand Down

0 comments on commit b154074

Please sign in to comment.