Java Swing ActionMap removeAction(InputMap im, ActionMap am, String name)

Here you can find the source of removeAction(InputMap im, ActionMap am, String name)

Description

remove Action

License

Open Source License

Declaration

protected static void removeAction(InputMap im, ActionMap am, String name) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import javax.swing.Action;
import javax.swing.ActionMap;
import javax.swing.InputMap;

import javax.swing.KeyStroke;

public class Main {
    protected static void removeAction(InputMap im, ActionMap am, String name) {
        Action a = am.get(name);// w w  w  . j av a  2 s .  co m
        if (a != null) {
            KeyStroke ks = (KeyStroke) a.getValue(Action.ACCELERATOR_KEY);
            if (ks != null) {
                im.remove(ks);
            }
            am.remove(name);
        }
    }
}

Related

  1. printActionMap(ActionMap actionMap, String who)
  2. putAction(Action action)
  3. putAction(JComponent component, Action action)
  4. registerAction(JComponent component, int condition, Action action, String command)
  5. registerUndoRedoActions(JComponent jtc, Action undoAction, Action redoAction)
  6. sysoutActionMap(JComponent com)