IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
80 | 80 | import org.openstreetmap.josm.data.osm.event.SelectionEventManager; |
81 | 81 | import org.openstreetmap.josm.data.osm.search.SearchCompiler; |
82 | 82 | import org.openstreetmap.josm.data.osm.search.SearchSetting; |
| 83 | import org.openstreetmap.josm.data.preferences.BooleanProperty; |
83 | 84 | import org.openstreetmap.josm.gui.ConditionalOptionPaneUtil; |
84 | 85 | import org.openstreetmap.josm.gui.ExtendedDialog; |
85 | 86 | import org.openstreetmap.josm.gui.MainApplication; |
… |
… |
|
242 | 243 | |
243 | 244 | private final transient TaggingPresetHandler presetHandler = new TaggingPresetCommandHandler(); |
244 | 245 | |
| 246 | private static final BooleanProperty PROP_AUTORESIZE_TAGS_TABLE = new BooleanProperty("propertiesdialog.autoresizeTagsTable", true); |
| 247 | |
245 | 248 | /** |
246 | 249 | * Create a new PropertiesDialog |
247 | 250 | */ |
… |
… |
|
310 | 313 | // setting up the tags table |
311 | 314 | tagData.setColumnIdentifiers(new String[]{tr("Key"), tr("Value")}); |
312 | 315 | tagTable.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); |
313 | | tagTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF); |
314 | 316 | tagTable.getTableHeader().setReorderingAllowed(false); |
315 | 317 | |
316 | 318 | tagTable.getColumnModel().getColumn(0).setCellRenderer(cellRenderer); |
… |
… |
|
672 | 674 | selectSth.setVisible(!hasSelection); |
673 | 675 | pluginHook.setVisible(hasSelection); |
674 | 676 | |
675 | | // resize tables to fit content |
676 | | TableHelper.computeColumnsWidth(tagTable); |
| 677 | autoresizeTagTable(); |
677 | 678 | |
678 | 679 | int selectedIndex; |
679 | 680 | if (selectedTag != null && (selectedIndex = findViewRow(tagTable, tagData, selectedTag)) != -1) { |
… |
… |
|
699 | 700 | } |
700 | 701 | } |
701 | 702 | |
| 703 | private void autoresizeTagTable() { |
| 704 | boolean autoresize = PROP_AUTORESIZE_TAGS_TABLE.get(); |
| 705 | if (autoresize) { |
| 706 | // resize table's columns to fit content |
| 707 | TableHelper.computeColumnsWidth(tagTable); |
| 708 | } |
| 709 | } |
| 710 | |
702 | 711 | /* ---------------------------------------------------------------------------------- */ |
703 | 712 | /* ActiveLayerChangeListener */ |
704 | 713 | /* ---------------------------------------------------------------------------------- */ |