org.openbp.jaspira.action.keys
Class KeyMgr.MultiActionMap

java.lang.Object
  extended by javax.swing.ActionMap
      extended by org.openbp.jaspira.action.keys.KeyMgr.MultiActionMap
All Implemented Interfaces:
java.io.Serializable
Enclosing class:
KeyMgr

public class KeyMgr.MultiActionMap
extends javax.swing.ActionMap

Action Map that creates new Actions for pressed keys "on the fly". Adding and removal of entries is delegated to the true parent.

See Also:
Serialized Form

Constructor Summary
KeyMgr.MultiActionMap(javax.swing.JComponent component)
          Creates a new MultiActionMap for the given Component.
 
Method Summary
 java.lang.Object[] allKeys()
          Returns an array of the keys defined in this ActionMap and its parent.
 void clear()
           
 javax.swing.Action get(java.lang.Object key)
          Returns the binding for given key, messaging the parent ActionMap if the binding is not locally defined.
 javax.swing.ActionMap getParent()
           
 java.lang.Object[] keys()
           
 void put(java.lang.Object key, javax.swing.Action action)
           
 void remove(java.lang.Object key)
           
 void setParent(javax.swing.ActionMap map)
           
 int size()
           
 void uninstall(javax.swing.JComponent component)
          Uninstalls the multi inout map from the given component and restores the old input map.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeyMgr.MultiActionMap

public KeyMgr.MultiActionMap(javax.swing.JComponent component)
Creates a new MultiActionMap for the given Component.

Parameters:
component - Component the map should belong to
Method Detail

uninstall

public void uninstall(javax.swing.JComponent component)
Uninstalls the multi inout map from the given component and restores the old input map. Does nothing if the component has not been assigned a multi input map.


get

public javax.swing.Action get(java.lang.Object key)
Returns the binding for given key, messaging the parent ActionMap if the binding is not locally defined.

Overrides:
get in class javax.swing.ActionMap
Parameters:
key - Key to get the binding for
Returns:
The binding or null if no binding exists for this key

allKeys

public java.lang.Object[] allKeys()
Returns an array of the keys defined in this ActionMap and its parent. This method differs from keys() in that this method includes the keys defined in the parent.

Overrides:
allKeys in class javax.swing.ActionMap

clear

public void clear()
Overrides:
clear in class javax.swing.ActionMap
See Also:
ActionMap.clear()

getParent

public javax.swing.ActionMap getParent()
Overrides:
getParent in class javax.swing.ActionMap
See Also:
ActionMap.getParent()

keys

public java.lang.Object[] keys()
Overrides:
keys in class javax.swing.ActionMap
See Also:
ActionMap.keys()

put

public void put(java.lang.Object key,
                javax.swing.Action action)
Overrides:
put in class javax.swing.ActionMap
See Also:
ActionMap.put(java.lang.Object, javax.swing.Action)

remove

public void remove(java.lang.Object key)
Overrides:
remove in class javax.swing.ActionMap
See Also:
ActionMap.remove(java.lang.Object)

setParent

public void setParent(javax.swing.ActionMap map)
Overrides:
setParent in class javax.swing.ActionMap
See Also:
ActionMap.setParent(javax.swing.ActionMap)

size

public int size()
Overrides:
size in class javax.swing.ActionMap
See Also:
ActionMap.size()


Copyright © 2011. All Rights Reserved.