[cp-patches] FYI: ListSelectionEvent/ListSelectionListener.java - reformatting and API doc updates

David Gilbert david.gilbert at object-refinery.com
Fri Mar 3 16:26:21 UTC 2006


I committed this patch:

2006-03-03  David Gilbert  <david.gilbert at object-refinery.com>

	* javax/swing/event/ListSelectionEvent.java: Reformatted and fixed
	API doc warnings,
	* javax/swing/event/ListSelectionListener.java: Updated API docs.

Regards,

Dave
-------------- next part --------------
Index: javax/swing/event/ListSelectionEvent.java
===================================================================
RCS file: /sources/classpath/classpath/javax/swing/event/ListSelectionEvent.java,v
retrieving revision 1.3
diff -u -r1.3 ListSelectionEvent.java
--- javax/swing/event/ListSelectionEvent.java	2 Jul 2005 20:32:50 -0000	1.3
+++ javax/swing/event/ListSelectionEvent.java	3 Mar 2006 16:22:01 -0000
@@ -1,5 +1,5 @@
 /* ListSelectionEvent.java --
-   Copyright (C) 2002 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2006, Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -37,7 +37,6 @@
 
 package javax.swing.event;
 
-// Imports
 import java.util.EventObject;
 
 /**
@@ -45,82 +44,74 @@
  * @author Andrew Selkirk
  * @author Ronald Veldema
  */
-public class ListSelectionEvent extends EventObject {
+public class ListSelectionEvent extends EventObject 
+{
 
-	//-------------------------------------------------------------
-	// Variables --------------------------------------------------
-	//-------------------------------------------------------------
-
-	/**
-	 * firstIndex
-	 */
-	private int		firstIndex	= 0;
-	
-	/**
-	 * lastIndex
-	 */
-	private int		lastIndex	= 0;
-	
-	/**
-	 * isAdjusting
-	 */
-	private boolean	isAdjusting	= false;
-
-	//-------------------------------------------------------------
-	// Initialization ---------------------------------------------
-	//-------------------------------------------------------------
-
-	/**
-	 * Constructor ListSelectionEvent
-	 * @param source Source
-	 * @param firstIndex First index
-	 * @param lastIndex Last index
-	 * @param isAdjusting Is Adjusting?
-	 */
-	public ListSelectionEvent(Object source, int firstIndex,
-								int lastIndex, boolean isAdjusting) {
-		super(source);
-		this.firstIndex		= firstIndex;
-		this.lastIndex		= lastIndex;
-		this.isAdjusting	= isAdjusting;
-	} // ListSelectionEvent()
-
-
-	//-------------------------------------------------------------
-	// Methods ----------------------------------------------------
-	//-------------------------------------------------------------
-
-	/**
-	 * getFirstIndex
-	 * @returns firstIndex
-	 */
-	public int getFirstIndex() {
-		return firstIndex;
-	} // getFirstIndex()
-
-	/**
-	 * getLastIndex
-	 * @returns lastIndex
-	 */
-	public int getLastIndex() {
-		return lastIndex;
-	} // getLastIndex()
-
-	/**
-	 * getValueIsAdjusting
-	 * @returns isAdjusting
-	 */
-	public boolean getValueIsAdjusting() {
-		return isAdjusting;
-	} // getValueIsAdjusting()
-
-	/**
-	 * String representation
-	 * @returns String representation
-	 */
-	public String toString() {
-		return null; // TODO
-	} // toString()
+  /**
+   * firstIndex
+   */
+  private int firstIndex = 0;
+
+  /**
+   * lastIndex
+   */
+  private int lastIndex = 0;
+
+  /**
+   * isAdjusting
+   */
+  private boolean isAdjusting = false;
+
+  /**
+   * Constructor ListSelectionEvent
+   * @param source Source
+   * @param firstIndex First index
+   * @param lastIndex Last index
+   * @param isAdjusting Is Adjusting?
+   */
+  public ListSelectionEvent(Object source, int firstIndex,
+      int lastIndex, boolean isAdjusting) 
+  {
+    super(source);
+    this.firstIndex = firstIndex;
+    this.lastIndex = lastIndex;
+    this.isAdjusting = isAdjusting;
+  }
+ 
+  /**
+   * getFirstIndex
+   * @return firstIndex
+   */
+  public int getFirstIndex() 
+  {
+    return firstIndex;
+  }
+
+  /**
+   * getLastIndex
+   * @return lastIndex
+   */
+  public int getLastIndex() 
+  {
+    return lastIndex;
+  }
+
+  /**
+   * getValueIsAdjusting
+   * @return isAdjusting
+   */
+  public boolean getValueIsAdjusting() 
+  {
+    return isAdjusting;
+  }
+
+  /**
+   * String representation
+   * @return String representation
+   */
+  public String toString() 
+  {
+    return null; // TODO
+  }
 
-
-} // ListSelectionEvent
+}
Index: javax/swing/event/ListSelectionListener.java
===================================================================
RCS file: /sources/classpath/classpath/javax/swing/event/ListSelectionListener.java,v
retrieving revision 1.5
diff -u -r1.5 ListSelectionListener.java
--- javax/swing/event/ListSelectionListener.java	2 Jul 2005 20:32:50 -0000	1.5
+++ javax/swing/event/ListSelectionListener.java	3 Mar 2006 16:22:01 -0000
@@ -1,5 +1,5 @@
 /* ListSelectionListener.java --
-   Copyright (C) 2002 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2006, Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -37,21 +37,25 @@
 
 package javax.swing.event;
 
-// Imports
 import java.util.EventListener;
 
+import javax.swing.ListSelectionModel;
+
 /**
- * ListSelectionListener public interface
+ * A listener that receives {@link ListSelectionEvent} notifications, 
+ * typically from a {@link ListSelectionModel} when it is modified.
+ *
  * @author Andrew Selkirk
  * @author Ronald Veldema
  */
-public interface ListSelectionListener extends EventListener {
-
-	/**
-	 * Value changed
-	 * @param event List Selection Event
-	 */
-	void valueChanged(ListSelectionEvent event);
+public interface ListSelectionListener extends EventListener 
+{
 
+  /**
+   * Receives notification of a {@link ListSelectionEvent}.
+   * 
+   * @param event  the event.
+   */
+  void valueChanged(ListSelectionEvent event);
 
-} // ListSelectionListener
+}
\ No newline at end of file


More information about the Classpath-patches mailing list