Changeset 10542 in josm
- Timestamp:
- 2016-07-16T23:57:24+02:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/widgets/ButtonColumn.java
r10536 r10542 29 29 private final JButton editButton; 30 30 private Object editorValue; 31 private String buttonName = null; 31 32 32 33 /** … … 36 37 this(null); 37 38 } 39 40 public ButtonColumn(Action action, String buttonName) { 41 this(action); 42 this.buttonName = buttonName; 43 } 44 38 45 39 46 /** … … 64 71 public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) { 65 72 this.editorValue = value; 66 if (value == null) { 73 if (buttonName != null) { 74 editButton.setText(buttonName); 75 editButton.setIcon(null); 76 } else if (value == null) { 67 77 editButton.setText(""); 68 78 editButton.setIcon(null); … … 91 101 renderButton.setFocusPainted(hasFocus); 92 102 93 if (value == null) { 103 if (buttonName != null) { 104 renderButton.setText(buttonName); 105 renderButton.setIcon(null); 106 } else if (value == null) { 94 107 renderButton.setText(""); 95 108 renderButton.setIcon(null);
Note:
See TracChangeset
for help on using the changeset viewer.