AbstractAction.java: Reformated.
authorMichael Koch <konqueror@gmx.de>
Fri, 23 Jan 2004 15:19:28 +0000 (15:19 +0000)
committerMichael Koch <mkoch@gcc.gnu.org>
Fri, 23 Jan 2004 15:19:28 +0000 (15:19 +0000)
2004-01-23  Michael Koch  <konqueror@gmx.de>

* javax/swing/AbstractAction.java: Reformated.

From-SVN: r76424

libjava/ChangeLog
libjava/javax/swing/AbstractAction.java

index ffec8ce8e05061b747ac7d0444868d6d6bedd9f2..613e34a7eb90a9f8c950f729405889b19212cf6d 100644 (file)
@@ -1,3 +1,7 @@
+2004-01-23  Michael Koch  <konqueror@gmx.de>
+
+       * javax/swing/AbstractAction.java: Reformated.
+
 2004-01-23  Michael Koch  <konqueror@gmx.de>
 
        * java/text/CollationElementIterator.java:
index e616badc0ba26ee7967e282997367a2a282c6fb4..889044938e90d45bc287228295d57e5aecb2413f 100644 (file)
@@ -56,118 +56,143 @@ public abstract class AbstractAction
 {
   static final long serialVersionUID = -6803159439231523484L;
 
-       /**
-        * enabled
-        */
-       protected boolean enabled = true;
-
-       /**
-        * changeSupport
-        */
-       protected SwingPropertyChangeSupport changeSupport =
-                               new SwingPropertyChangeSupport(this);
-
-       /**
-        * store
-        */
-       private transient HashMap store = new HashMap();
-
-       /**
-        * Constructor AbstractAction
-        */
-       public AbstractAction() {
-               this(""); // TODO: default name
-       } // AbstractAction()
-
-       /**
-        * Constructor AbstractAction
-        * @param name TODO
-        */
-       public AbstractAction(String name) {
-               this(name, null); // TODO: default icon??
-       } // AbstractAction()
-
-       /**
-        * Constructor AbstractAction
-        * @param name TODO
-        * @param icon TODO
-        */
-       public AbstractAction(String name, Icon icon) {
-               putValue(NAME, name);
-               putValue(SMALL_ICON, icon);
-       } // AbstractAction()
-
-       /**
-        * readObject
-        * @param stream TODO
-        * @exception ClassNotFoundException TODO
-        * @exception IOException TODO
-        */
-       private void readObject(ObjectInputStream stream) 
-                       throws ClassNotFoundException, IOException {
-               // TODO
-       } // readObject()
-
-       /**
-        * writeObject
-        * @param stream TODO
-        * @exception IOException TODO
-        */
-       private void writeObject(ObjectOutputStream stream) throws IOException {
-               // TODO
-       } // writeObject()
-
-       /**
-        * clone
-        * @exception CloneNotSupportedException TODO
-        * @returns Object
-        */
-       protected Object clone() throws CloneNotSupportedException {
-               // What to do??
-               return null;
-       } // clone()
-
-       /**
-        * getValue
-        * @param key TODO
-        * @returns Object
-        */
-       public Object getValue(String key) {
-               return store.get(key);
-       } // getValue()
-
-       /**
-        * putValue
-        * @param key TODO
-        * @param value TODO
-        */
-       public void putValue(String key, Object value) {
-               store.put(key, value);
-       } // putValue()
-
-       /**
-        * isEnabled
-        * @returns boolean
-        */
-       public boolean isEnabled() {
-               return enabled;
-       } // isEnabled()
-
-       /**
-        * setEnabled
-        * @param enabled TODO
-        */
-       public void setEnabled(boolean enabled) {
-               this.enabled = enabled;
-       } // setEnabled()
-
-       /**
-        * getKeys
-        * @returns Object[]
-        */
-       public Object[] getKeys() {
-               return store.keySet().toArray();
-       } // getKeys()
+  /**
+   * enabled
+   */
+  protected boolean enabled = true;
+
+  /**
+   * changeSupport
+   */
+  protected SwingPropertyChangeSupport changeSupport =
+    new SwingPropertyChangeSupport(this);
+
+  /**
+   * store
+   */
+  private transient HashMap store = new HashMap();
+
+  /**
+   * Constructor AbstractAction
+   */
+  public AbstractAction()
+  {
+    this(""); // TODO: default name
+  }
+
+  /**
+   * Constructor AbstractAction
+   *
+   * @param name TODO
+   */
+  public AbstractAction(String name)
+  {
+    this(name, null); // TODO: default icon??
+  }
+
+  /**
+   * Constructor AbstractAction
+   *
+   * @param name TODO
+   * @param icon TODO
+   */
+  public AbstractAction(String name, Icon icon)
+  {
+    putValue(NAME, name);
+    putValue(SMALL_ICON, icon);
+  }
+
+  /**
+   * readObject
+   *
+   * @param stream the stream to read from
+   *
+   * @exception ClassNotFoundException TODO
+   * @exception IOException if an error occurs
+   */
+  private void readObject(ObjectInputStream stream)
+    throws ClassNotFoundException, IOException
+  {
+    // TODO
+  }
+
+  /**
+   * writeObject
+   *
+   * @param stream the stream to write to
+   *
+   * @exception IOException if an error occurs
+   */
+  private void writeObject(ObjectOutputStream stream) throws IOException
+  {
+    // TODO
+  }
+
+  /**
+   * clone
+   *
+   * @return Object
+   *
+   * @exception CloneNotSupportedException TODO
+   */
+  protected Object clone() throws CloneNotSupportedException
+  {
+    AbstractAction copy = (AbstractAction) super.clone();
+    copy.store = (HashMap) store.clone();
+    return copy;
+  }
+
+  /**
+   * Returns a value for a given key from the built-in store.
+   *
+   * @param key the key to get the value for
+   *
+   * @return Object
+   */
+  public Object getValue(String key)
+  {
+    return store.get(key);
+  }
+
+  /**
+   * Puts a key/value pair into the built-in store.
+   *
+   * @param key the key
+   * @param value the value
+   */
+  public void putValue(String key, Object value)
+  {
+    store.put(key, value);
+  }
+
+  /**
+   * isEnabled
+   *
+   * @return boolean
+   */
+  public boolean isEnabled()
+  {
+    return enabled;
+  }
+
+  /**
+   * setEnabled
+   *
+   * @param enabled TODO
+   */
+  public void setEnabled(boolean enabled)
+  {
+    this.enabled = enabled;
+  }
+
+  /**
+   * getKeys
+   * @returns Object[]
+   */
+  public Object[] getKeys()
+  {
+    return store.keySet().toArray();
+  }
 
   /**
    * firePropertyChange