Search in sources :

Example 1 with KeyShortCutEditPanel

use of com.igormaznitsa.sciareto.ui.editors.mmeditors.KeyShortCutEditPanel in project netbeans-mmd-plugin by raydac.

the class PreferencesPanel method buttonOpenShortcutEditorActionPerformed.

// GEN-LAST:event_spinnerJumpLinkWidthStateChanged
private void buttonOpenShortcutEditorActionPerformed(java.awt.event.ActionEvent evt) {
    // GEN-FIRST:event_buttonOpenShortcutEditorActionPerformed
    final List<KeyShortcut> list = new ArrayList<>();
    for (final Map.Entry<String, KeyShortcut> e : this.mapKeyShortCuts.entrySet()) {
        list.add(e.getValue());
    }
    final KeyShortCutEditPanel panel = new KeyShortCutEditPanel(list);
    if (DialogProviderManager.getInstance().getDialogProvider().msgOkCancel(this, "Edit shortcuts", panel)) {
        for (final KeyShortcut s : panel.getResult()) {
            this.mapKeyShortCuts.put(s.getID(), s);
        }
        if (this.changeNotificationAllowed) {
            this.changed = true;
        }
    }
}
Also used : KeyShortcut(com.igormaznitsa.mindmap.swing.panel.utils.KeyShortcut) ArrayList(java.util.ArrayList) KeyShortCutEditPanel(com.igormaznitsa.sciareto.ui.editors.mmeditors.KeyShortCutEditPanel) Map(java.util.Map) TreeMap(java.util.TreeMap)

Aggregations

KeyShortcut (com.igormaznitsa.mindmap.swing.panel.utils.KeyShortcut)1 KeyShortCutEditPanel (com.igormaznitsa.sciareto.ui.editors.mmeditors.KeyShortCutEditPanel)1 ArrayList (java.util.ArrayList)1 Map (java.util.Map)1 TreeMap (java.util.TreeMap)1