mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
show some decimal parts
This commit is contained in:
+4
-2
@@ -40,6 +40,7 @@ import javax.swing.event.ListSelectionListener;
|
||||
import java.awt.*;
|
||||
import java.io.IOException;
|
||||
import java.io.StringReader;
|
||||
import java.text.DecimalFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Comparator;
|
||||
@@ -198,8 +199,9 @@ public class ShowFeatureUsageStatisticsDialog extends DialogWrapper {
|
||||
}
|
||||
|
||||
private static String formatCharacterCount(int count, boolean full) {
|
||||
String result = count > 1024 * 1024 ? (count / 1024 / 1024) + "M" :
|
||||
count > 1024 ? (count / 1024) + "K" :
|
||||
DecimalFormat oneDigit = new DecimalFormat("0.0");
|
||||
String result = count > 1024 * 1024 ? oneDigit.format((double)count / 1024 / 1024) + "M" :
|
||||
count > 1024 ? oneDigit.format((double)count / 1024) + "K" :
|
||||
String.valueOf(count);
|
||||
if (full) {
|
||||
return result + " characters";
|
||||
|
||||
Reference in New Issue
Block a user