- Timestamp:
- 2015-07-13T20:56:12+02:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/preferences/imagery/CacheContentsPanel.java
r8598 r8600 56 56 57 57 private static class ButtonColumn extends AbstractCellEditor implements TableCellRenderer, TableCellEditor, ActionListener { 58 private Action action;59 private JButton renderButton;60 61 p ublicButtonColumn(Action action) {58 private final Action action; 59 private final JButton renderButton; 60 61 private ButtonColumn(Action action) { 62 62 this.action = action; 63 63 renderButton = new JButton(); … … 109 109 } 110 110 111 private ExecutorService executor = Executors.newSingleThreadExecutor();111 private transient ExecutorService executor = Executors.newSingleThreadExecutor(); 112 112 113 113 /** … … 141 141 new JScrollPane(getTableForCache(cache)), 142 142 GBC.eol().fill(GBC.BOTH)); 143 144 executor.shutdown(); 143 145 } 144 146 … … 156 158 } 157 159 } 158 return new Long(-1);159 } 160 161 private Map<String, Integer> getCacheStats(CacheAccess<String, BufferedImageCacheEntry> cache) {160 return Long.valueOf(-1); 161 } 162 163 private static Map<String, Integer> getCacheStats(CacheAccess<String, BufferedImageCacheEntry> cache) { 162 164 Set<String> keySet = cache.getCacheControl().getKeySet(); 163 165 Map<String, int[]> temp = new ConcurrentHashMap<>(); // use int[] as a Object reference to int, gives better performance … … 213 215 } 214 216 215 private JTable getTableForCache( CacheAccess<String, BufferedImageCacheEntry> cache) {217 private JTable getTableForCache(final CacheAccess<String, BufferedImageCacheEntry> cache) { 216 218 final DefaultTableModel tableModel = new DefaultTableModel( 217 219 new String[][]{{tr("Loading data"), tr("Please wait"), ""}}, … … 233 235 int row = ret.convertRowIndexToModel(ret.getEditingRow()); 234 236 tableModel.setValueAt("0", row, 1); 237 cache.remove(ret.getValueAt(row, 0) + ":"); 235 238 } 236 239 });
Note:
See TracChangeset
for help on using the changeset viewer.