Changeset 14631 in josm for trunk


Ignore:
Timestamp:
2019-01-03T20:46:10+01:00 (6 years ago)
Author:
simon04
Message:

see #15817 - Imagery Preferences: harmonize cache size units

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/preferences/imagery/CacheContentsPanel.java

    r13758 r14631  
    99import java.util.Comparator;
    1010import java.util.List;
     11import java.util.Locale;
    1112import java.util.Map;
    1213import java.util.Map.Entry;
     
    3738import org.openstreetmap.josm.tools.Logging;
    3839import org.openstreetmap.josm.tools.Pair;
     40import org.openstreetmap.josm.tools.Utils;
    3941
    4042/**
     
    6062    private void addToPanel(final CacheAccess<String, BufferedImageCacheEntry> cache, final String name) {
    6163        final Long cacheSize = getCacheSize(cache);
     64        final String sizeString = Utils.getSizeString(cacheSize, Locale.getDefault());
    6265        final TableModel tableModel = getTableModel(cache);
    6366
    6467        GuiHelper.runInEDT(() -> {
    65             add(new JLabel(tr("{0} cache, total cache size: {1} bytes", name, cacheSize)),
     68            add(new JLabel(tr("{0} cache, total cache size: {1}", name, sizeString)),
    6669                GBC.eol().insets(5, 5, 0, 0));
    6770            add(new JScrollPane(getTableForCache(cache, tableModel)),
Note: See TracChangeset for help on using the changeset viewer.