Changeset 6017 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2013-06-24T12:54:26+02:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/widgets/JosmComboBox.java
r5886 r6017 15 15 16 16 import javax.accessibility.Accessible; 17 import javax.swing.ComboBoxEditor; 17 18 import javax.swing.ComboBoxModel; 18 19 import javax.swing.DefaultComboBoxModel; … … 218 219 private void enableMenu() { 219 220 if (launcher == null) { 220 Component editorComponent = getEditor().getEditorComponent(); 221 if (editorComponent instanceof JTextComponent) { 222 component = (JTextComponent) editorComponent; 223 component.addMouseListener(this); 224 launcher = TextContextualPopupMenu.enableMenuFor(component); 221 ComboBoxEditor editor = getEditor(); 222 if (editor != null) { 223 Component editorComponent = editor.getEditorComponent(); 224 if (editorComponent instanceof JTextComponent) { 225 component = (JTextComponent) editorComponent; 226 component.addMouseListener(this); 227 launcher = TextContextualPopupMenu.enableMenuFor(component); 228 } 225 229 } 226 230 }
Note:
See TracChangeset
for help on using the changeset viewer.