Changeset 5451 in josm for trunk/src/org/openstreetmap/josm/gui
- Timestamp:
- 2012-08-18T18:18:04+02:00 (12 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictDecisionRenderer.java
r5429 r5451 5 5 import java.awt.Font; 6 6 7 import javax.swing.DefaultComboBoxModel;8 7 import javax.swing.JLabel; 9 8 import javax.swing.JList; … … 34 33 35 34 public RelationMemberConflictDecisionRenderer() { 36 DefaultComboBoxModel model = new DefaultComboBoxModel(); 37 cbDecisionTypes = new JosmComboBox(model); 38 model.addElement(RelationMemberConflictDecisionType.KEEP); 39 model.addElement(RelationMemberConflictDecisionType.REMOVE); 40 model.addElement(RelationMemberConflictDecisionType.UNDECIDED); 35 cbDecisionTypes = new JosmComboBox(RelationMemberConflictDecisionType.values()); 41 36 cbDecisionTypes.setRenderer(this); 42 37 } -
trunk/src/org/openstreetmap/josm/gui/widgets/JosmComboBox.java
r5450 r5451 70 70 public JosmComboBox(ComboBoxModel aModel) { 71 71 super(aModel); 72 init(aModel != null && aModel.getSize() > 0 ? aModel.getElementAt(0) : DEFAULT_PROTOTYPE_DISPLAY_VALUE);72 init(aModel != null && aModel.getSize() > 0 ? aModel.getElementAt(0) : null); 73 73 } 74 74 … … 83 83 public JosmComboBox(Object[] items) { 84 84 super(items); 85 init(items != null && items.length > 0 ? items[0] : DEFAULT_PROTOTYPE_DISPLAY_VALUE);85 init(items != null && items.length > 0 ? items[0] : null); 86 86 } 87 87 … … 96 96 public JosmComboBox(Vector<?> items) { 97 97 super(items); 98 init(items != null && !items.isEmpty() ? items.get(0) : DEFAULT_PROTOTYPE_DISPLAY_VALUE);98 init(items != null && !items.isEmpty() ? items.get(0) : null); 99 99 } 100 100
Note:
See TracChangeset
for help on using the changeset viewer.