Changeset 5020 in josm for trunk/src/org/openstreetmap


Ignore:
Timestamp:
2012-02-23T18:49:33+01:00 (13 years ago)
Author:
akks
Message:

fix #7371: Use Enter/Insert for editing/adding tags in properties table

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java

    r4982 r5020  
    827827            bothTables.add(presets, GBC.eol().fill(GBC.HORIZONTAL).insets(5, 2, 5, 2));
    828828        }
    829 
     829       
     830        // Open edit dialog whe enter pressed in tables
     831        propertyTable.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT)
     832                .put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0),"onTableEnter");
     833        propertyTable.getActionMap().put("onTableEnter",editAction);
     834        membershipTable.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT)
     835                .put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0),"onTableEnter");
     836        membershipTable.getActionMap().put("onTableEnter",editAction);
     837       
     838        // Open add property dialog when INS is pressed in tables
     839        propertyTable.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT)
     840                .put(KeyStroke.getKeyStroke(KeyEvent.VK_INSERT, 0),"onTableInsert");
     841        propertyTable.getActionMap().put("onTableInsert",addAction);
     842               
    830843        // -- add action and shortcut
    831844        this.btnAdd = new SideButton(addAction);
Note: See TracChangeset for help on using the changeset viewer.