Changeset 6362 in josm for trunk/src/org/openstreetmap/josm/gui/util/TableHelper.java
- Timestamp:
- 2013-11-03T01:06:23+01:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/util/TableHelper.java
r5927 r6362 10 10 * The class that provide common JTable customization methods 11 11 */ 12 public class TableHelper { 12 public final class TableHelper { 13 14 private TableHelper() { 15 // Hide default constructor for utils classes 16 } 17 13 18 /** 14 * (originally from @class org.openstreetmap.josm.gui.preferences.SourceEditor)15 * adjust the preferred width of column col to the maximum preferred width of the cells16 * requires JTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);17 */19 * (originally from @class org.openstreetmap.josm.gui.preferences.SourceEditor) 20 * adjust the preferred width of column col to the maximum preferred width of the cells 21 * requires JTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF); 22 */ 18 23 public static void adjustColumnWidth(JTable tbl, int col, int maxColumnWidth) { 19 24 int maxwidth = 0; … … 26 31 tbl.getColumnModel().getColumn(col).setPreferredWidth(Math.min(maxwidth+10, maxColumnWidth)); 27 32 } 28 29 33 }
Note:
See TracChangeset
for help on using the changeset viewer.