ActionMap provides mappings from
Objects
(called keys or Action names)
to Actions.
An ActionMap is usually used with an InputMap
to locate a particular action
when a key is pressed. As with InputMap,
an ActionMap can have a parent
that is searched for keys not defined in the ActionMap.
As with InputMap if you create a cycle, eg:
ActionMap am = new ActionMap();
ActionMap bm = new ActionMap():
am.setParent(bm);
bm.setParent(am);
some of the methods will cause a StackOverflowError to be thrown.
ActionMapprovides mappings fromObjects (called keys orActionnames) toActions. AnActionMapis usually used with anInputMapto locate a particular action when a key is pressed. As withInputMap, anActionMapcan have a parent that is searched for keys not defined in theActionMap.As with
some of the methods will cause a StackOverflowError to be thrown.InputMapif you create a cycle, eg: