Object name = a.getValue(Action.NAME);
map.put(name, a);
}
final void installUIActionMap() {
UIDefaults uiDefaults = UIManager.getLookAndFeelDefaults();
String propertyName = getPropertyPrefix() + ".actionMap";
ActionMap actionMap1 = new ActionMapUIResource();
putActionToActionMap(focusAction, actionMap1);
Object actionMap2 = uiDefaults.get(propertyName);
if (actionMap2 == null) {
ActionMapUIResource map = new ActionMapUIResource();
Action[] actions = component.getActions();
for (int i = 0; i < actions.length; i++) {
putActionToActionMap(actions[i], map);
}
putActionToActionMap(TransferHandler.getPasteAction(), map);
putActionToActionMap(TransferHandler.getCutAction(), map);
putActionToActionMap(TransferHandler.getCopyAction(), map);
actionMap2 = map;
if (!(component instanceof JEditorPane)) {
uiDefaults.put(propertyName, map);
}
}
actionMap1.setParent((ActionMap)actionMap2);
SwingUtilities.replaceUIActionMap(component, actionMap1);
}