/**
* Return the mapping between JTree's input map and JGraph's actions.
*/
ActionMap createActionMap() {
// 1: Up, 2: Right, 3: Down, 4: Left
ActionMap map = new ActionMapUIResource();
map
.put("selectPrevious", new GraphIncrementAction(1,
"selectPrevious"));
map.put("selectPreviousChangeLead", new GraphIncrementAction(1,
"selectPreviousLead"));
map.put("selectPreviousExtendSelection", new GraphIncrementAction(1,
"selectPreviousExtendSelection"));
map.put("selectParent", new GraphIncrementAction(4, "selectParent"));
map.put("selectParentChangeLead", new GraphIncrementAction(4,
"selectParentChangeLead"));
map.put("selectNext", new GraphIncrementAction(3, "selectNext"));
map.put("selectNextChangeLead", new GraphIncrementAction(3,
"selectNextLead"));
map.put("selectNextExtendSelection", new GraphIncrementAction(3,
"selectNextExtendSelection"));
map.put("selectChild", new GraphIncrementAction(2, "selectChild"));
map.put("selectChildChangeLead", new GraphIncrementAction(2,
"selectChildChangeLead"));
map.put("cancel", new GraphCancelEditingAction("cancel"));
map.put("startEditing", new GraphEditAction("startEditing"));
map.put("selectAll", new GraphSelectAllAction("selectAll", true));
map.put("clearSelection", new GraphSelectAllAction("clearSelection",
false));
return map;
}