Package org.jfree.ui.action
Class DowngradeActionMap
- java.lang.Object
-
- org.jfree.ui.action.DowngradeActionMap
-
public class DowngradeActionMap extends java.lang.Object
An actionmap, which is JDK 1.2.2 compatible.This implementation does not implement the ActionMap interface of JDK 1.3 or higher to maintain the compatibility with JDK 1.2 which does not know this interface.
The usage is still the same.
- Author:
- Thomas Morger
-
-
Constructor Summary
Constructors Constructor Description DowngradeActionMap()Default Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object[]allKeys()Returns an array of the keys defined in thisActionMapand its parent.voidclear()Removes all the mappings from thisActionMap.javax.swing.Actionget(java.lang.Object key)Returns the binding forkey, messaging the parentActionMapif the binding is not locally defined.DowngradeActionMapgetParent()Returns thisActionMap's parent.java.lang.Object[]keys()Returns theActionnames that are bound in thisActionMap.voidput(java.lang.Object key, javax.swing.Action action)Adds a binding forkeytoaction.voidremove(java.lang.Object key)Removes the binding forkeyfrom thisActionMap.voidsetParent(DowngradeActionMap map)Sets thisActionMap's parent.intsize()Returns the number of bindings.
-
-
-
Constructor Detail
-
DowngradeActionMap
public DowngradeActionMap()
Default Constructor. Creates a new empty map.
-
-
Method Detail
-
setParent
public void setParent(DowngradeActionMap map)
Sets thisActionMap's parent.- Parameters:
map- theActionMapthat is the parent of this one
-
getParent
public DowngradeActionMap getParent()
Returns thisActionMap's parent.- Returns:
- the
ActionMapthat is the parent of this one, or null if thisActionMaphas no parent
-
put
public void put(java.lang.Object key, javax.swing.Action action)
Adds a binding forkeytoaction. Ifactionis null, this removes the current binding forkey.In most instances,
keywill beaction.getValue(NAME).- Parameters:
key- the key for the action.action- the action to be added.
-
get
public javax.swing.Action get(java.lang.Object key)
Returns the binding forkey, messaging the parentActionMapif the binding is not locally defined.- Parameters:
key- the key to be queried.- Returns:
- the action for this key, or null if there is no such action.
-
remove
public void remove(java.lang.Object key)
Removes the binding forkeyfrom thisActionMap.- Parameters:
key- the key to be removed.
-
clear
public void clear()
Removes all the mappings from thisActionMap.
-
keys
public java.lang.Object[] keys()
Returns theActionnames that are bound in thisActionMap.- Returns:
- the keys which are directly bound to this map.
-
size
public int size()
Returns the number of bindings.- Returns:
- the number of entries in this map.
-
allKeys
public java.lang.Object[] allKeys()
Returns an array of the keys defined in thisActionMapand its parent. This method differs fromkeys()in that this method includes the keys defined in the parent.- Returns:
- all keys of this map and all parents.
-
-