actionMap.put(moveSelRightAction, new MoveSelectionAction(1));
actionMap.put(SelectAllAction.SELECT_ALL, new SelectAllAction());
final InputMap inputMap
= panel.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
final KeyStroke up = KeyStroke.getKeyStroke(KeyEvent.VK_UP, 0);
inputMap.put(up, moveSelUpAction);
final KeyStroke kpUp = KeyStroke.getKeyStroke(KeyEvent.VK_KP_UP, 0);
inputMap.put(kpUp, moveSelUpAction);
final KeyStroke down = KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, 0);
inputMap.put(down, moveSelDownAction);
final KeyStroke kpDown = KeyStroke.getKeyStroke(KeyEvent.VK_KP_DOWN, 0);
inputMap.put(kpDown, moveSelDownAction);
final KeyStroke left = KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, 0);
inputMap.put(left, moveSelLeftAction);
final KeyStroke kpLeft = KeyStroke.getKeyStroke(KeyEvent.VK_KP_LEFT, 0);
inputMap.put(kpLeft, moveSelLeftAction);
final KeyStroke right = KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, 0);
inputMap.put(right, moveSelRightAction);
final KeyStroke kpRight = KeyStroke.getKeyStroke(KeyEvent.VK_KP_RIGHT, 0);
inputMap.put(kpRight, moveSelRightAction);
final int mask = getToolkit().getMenuShortcutKeyMask();
final KeyStroke ctrlA = KeyStroke.getKeyStroke(KeyEvent.VK_A, mask);
inputMap.put(ctrlA, SelectAllAction.SELECT_ALL);
contextPopupMenu = new JPopupMenu();
ButtonGroup group = new ButtonGroup();