diff options
Diffstat (limited to 'libjava/javax/swing/ActionMap.java')
-rw-r--r-- | libjava/javax/swing/ActionMap.java | 90 |
1 files changed, 45 insertions, 45 deletions
diff --git a/libjava/javax/swing/ActionMap.java b/libjava/javax/swing/ActionMap.java index 645252f5b26..26d1d6fa989 100644 --- a/libjava/javax/swing/ActionMap.java +++ b/libjava/javax/swing/ActionMap.java @@ -49,7 +49,7 @@ import java.util.Set; /** - * @author Andrew Selkirk + * @author Andrew Selkirk * @author Michael Koch */ public class ActionMap @@ -57,30 +57,30 @@ public class ActionMap { private static final long serialVersionUID = -6277518704513986346L; - /** - * actionMap - */ - private Map actionMap = new HashMap(); + /** + * actionMap + */ + private Map actionMap = new HashMap(); - /** - * parent - */ + /** + * parent + */ private ActionMap parent; - /** + /** * Creates a new <code>ActionMap</code> instance. - */ + */ public ActionMap() { } - /** + /** * Returns an action associated with an object. * * @param key the key of the enty * * @return the action associated with key, may be null - */ + */ public Action get(Object key) { Object result = actionMap.get(key); @@ -88,123 +88,123 @@ public class ActionMap if (result == null && parent != null) result = parent.get(key); - return (Action) result; + return (Action) result; } - /** + /** * Puts a new <code>Action</code> into the <code>ActionMap</code>. * If action is null an existing entry will be removed. * * @param key the key for the entry * @param action the action. - */ + */ public void put(Object key, Action action) { if (action == null) - actionMap.remove(key); + actionMap.remove(key); else - actionMap.put(key, action); + actionMap.put(key, action); } - /** + /** * Remove an entry from the <code>ActionMap</code>. * * @param key the key of the entry to remove - */ + */ public void remove(Object key) { - actionMap.remove(key); + actionMap.remove(key); } - /** + /** * Returns the parent of this <code>ActionMap</code>. * * @return the parent, may be null. - */ + */ public ActionMap getParent() { - return parent; + return parent; } - /** + /** * Sets a parent for this <code>ActionMap</code>. * * @param parentMap the new parent - */ + */ public void setParent(ActionMap parentMap) { - parent = parentMap; + parent = parentMap; } - /** + /** * Returns the number of entries in this <code>ActionMap</code>. * * @return the number of entries - */ + */ public int size() { - return actionMap.size(); + return actionMap.size(); } - /** + /** * Clears the <code>ActionMap</code>. - */ + */ public void clear() { - actionMap.clear(); + actionMap.clear(); } - /** + /** * Returns all keys of entries in this <code>ActionMap</code>. * * @return an array of keys - */ + */ public Object[] keys() { return actionMap.keySet().toArray(); } - /** + /** * Returns all keys of entries in this <code>ActionMap</code> * and all its parents. * * @return an array of keys - */ + */ public Object[] allKeys() { Set set = new HashSet(); if (parent != null) - set.addAll(Arrays.asList(parent.allKeys())); + set.addAll(Arrays.asList(parent.allKeys())); set.addAll(actionMap.keySet()); return set.toArray(); } - /** - * writeObject + /** + * writeObject * * @param stream the stream to write to * * @exception IOException If an error occurs - */ + */ private void writeObject(ObjectOutputStream stream) throws IOException { - // TODO + // TODO } - /** - * readObject + /** + * readObject * * @param stream the stream to read from * * @exception ClassNotFoundException If the serialized class cannot be found * @exception IOException If an error occurs - */ + */ private void readObject(ObjectInputStream stream) throws ClassNotFoundException, IOException { - // TODO + // TODO } } |