Changeset 6424 in josm


Ignore:
Timestamp:
2013-11-29T19:25:23+01:00 (11 years ago)
Author:
simon04
Message:

see #6381 - fix #9373 - upload dialog: make source input behave similar as comment input (concerning enter/focus)

Location:
trunk/src/org/openstreetmap/josm/gui/io
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/io/BasicUploadSettingsPanel.java

    r6408 r6424  
    9999    }
    100100
    101     public void setUploadCommentDownFocusTraversalHandler(final Action handler) {
    102         hcbUploadComment.getEditor().addActionListener(handler);
    103         hcbUploadComment.getEditor().getEditorComponent().addKeyListener(
     101    public void setUploadTagDownFocusTraversalHandlers(final Action handler) {
     102        setHistoryComboBoxDownFocusTraversalHandler(handler, hcbUploadComment);
     103        setHistoryComboBoxDownFocusTraversalHandler(handler, hcbUploadSource);
     104    }
     105
     106    public void setHistoryComboBoxDownFocusTraversalHandler(final Action handler, final HistoryComboBox hcb) {
     107        hcb.getEditor().addActionListener(handler);
     108        hcb.getEditor().getEditorComponent().addKeyListener(
    104109                new KeyListener() {
    105110                    @Override
    106111                    public void keyTyped(KeyEvent e) {
    107112                        if (e.getKeyCode() == KeyEvent.VK_TAB) {
    108                             handler.actionPerformed(new ActionEvent(hcbUploadComment,0, "focusDown"));
     113                            handler.actionPerformed(new ActionEvent(hcb, 0, "focusDown"));
    109114                        }
    110115                    }
  • trunk/src/org/openstreetmap/josm/gui/io/UploadDialog.java

    r6419 r6424  
    227227        );
    228228
    229         pnlBasicUploadSettings.setUploadCommentDownFocusTraversalHandler(
     229        pnlBasicUploadSettings.setUploadTagDownFocusTraversalHandlers(
    230230                new AbstractAction() {
    231231                    @Override
Note: See TracChangeset for help on using the changeset viewer.