Ticket #7371: DelIns.patch

File DelIns.patch, 1.4 KB (added by akks, 14 years ago)
  • src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java

     
    805805        if(!top) {
    806806            bothTables.add(presets, GBC.eol().fill(GBC.HORIZONTAL).insets(5, 2, 5, 2));
    807807        }
    808 
     808       
     809        // Open edit dialog whe enter pressed in tables
     810        propertyTable.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT)
     811                .put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0),"onTableEnter");
     812        propertyTable.getActionMap().put("onTableEnter",editAction);
     813        membershipTable.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT)
     814                .put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0),"onTableEnter");
     815        membershipTable.getActionMap().put("onTableEnter",editAction);
     816       
     817        // Open add property dialog when INS is pressed in tables
     818        propertyTable.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT)
     819                .put(KeyStroke.getKeyStroke(KeyEvent.VK_INSERT, 0),"onTableInsert");
     820        propertyTable.getActionMap().put("onTableInsert",addAction);
     821               
    809822        // -- add action and shortcut
    810823        this.btnAdd = new SideButton(addAction);
    811824        btnAdd.setFocusable(true);