This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

FYI: Patch: javax.swing.AbstractAction


Hi list,


I commited the attached patch to trunk which reformats 
javax.swing.AbstractAction.


Michael


2004-01-23  Michael Koch  <konqueror@gmx.de>

	* javax/swing/AbstractAction.java: Reformated.

Index: javax/swing/AbstractAction.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/AbstractAction.java,v
retrieving revision 1.5
diff -u -b -B -r1.5 AbstractAction.java
--- javax/swing/AbstractAction.java	23 Jan 2004 12:42:10 -0000	1.5
+++ javax/swing/AbstractAction.java	23 Jan 2004 15:19:17 -0000
@@ -75,99 +75,124 @@
 	/**
 	 * Constructor AbstractAction
 	 */
-	public AbstractAction() {
+  public AbstractAction()
+  {
 		this(""); // TODO: default name
-	} // AbstractAction()
+  }
 
 	/**
 	 * Constructor AbstractAction
+   *
 	 * @param name TODO
 	 */
-	public AbstractAction(String name) {
+  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) {
+  public AbstractAction(String name, Icon icon)
+  {
 		putValue(NAME, name);
 		putValue(SMALL_ICON, icon);
-	} // AbstractAction()
+  }
 
 	/**
 	 * readObject
-	 * @param stream TODO
+   *
+   * @param stream the stream to read from
+   *
 	 * @exception ClassNotFoundException TODO
-	 * @exception IOException TODO
+   * @exception IOException if an error occurs
 	 */
 	private void readObject(ObjectInputStream stream) 
-			throws ClassNotFoundException, IOException {
+    throws ClassNotFoundException, IOException
+  {
 		// TODO
-	} // readObject()
+  }
 
 	/**
 	 * writeObject
-	 * @param stream TODO
-	 * @exception IOException TODO
+   *
+   * @param stream the stream to write to
+   *
+   * @exception IOException if an error occurs
 	 */
-	private void writeObject(ObjectOutputStream stream) throws IOException {
+  private void writeObject(ObjectOutputStream stream) throws IOException
+  {
 		// TODO
-	} // writeObject()
+  }
 
 	/**
 	 * clone
+   *
+   * @return Object
+   *
 	 * @exception CloneNotSupportedException TODO
-	 * @returns Object
 	 */
-	protected Object clone() throws CloneNotSupportedException {
-		// What to do??
-		return null;
-	} // clone()
-
-	/**
-	 * getValue
-	 * @param key TODO
-	 * @returns Object
+  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) {
+  public Object getValue(String key)
+  {
 		return store.get(key);
-	} // getValue()
+  }
 
 	/**
-	 * putValue
-	 * @param key TODO
-	 * @param value TODO
+   * 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) {
+  public void putValue(String key, Object value)
+  {
 		store.put(key, value);
-	} // putValue()
+  }
 
 	/**
 	 * isEnabled
-	 * @returns boolean
+   *
+   * @return boolean
 	 */
-	public boolean isEnabled() {
+  public boolean isEnabled()
+  {
 		return enabled;
-	} // isEnabled()
+  }
 
 	/**
 	 * setEnabled
+   *
 	 * @param enabled TODO
 	 */
-	public void setEnabled(boolean enabled) {
+  public void setEnabled(boolean enabled)
+  {
 		this.enabled = enabled;
-	} // setEnabled()
+  }
 
 	/**
 	 * getKeys
 	 * @returns Object[]
 	 */
-	public Object[] getKeys() {
+  public Object[] getKeys()
+  {
 		return store.keySet().toArray();
-	} // getKeys()
+  }
 
   /**
    * firePropertyChange

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]