[kaffe] CVS kaffe (robilad): Resynced with GNU Classpath: cleanups in swing

Kaffe CVS cvs-commits at kaffe.org
Thu Dec 2 17:10:52 PST 2004


PatchSet 5514 
Date: 2004/12/03 00:56:16
Author: robilad
Branch: HEAD
Tag: (none) 
Log:
Resynced with GNU Classpath: cleanups in swing

2004-12-02  Dalibor Topic  <robilad at kaffe.org>

        * libraries/javalib/javax/swing/DefaultSingleSelectionModel.java,
        libraries/javalib/javax/swing/JPasswordField.java,
        libraries/javalib/javax/swing/tree/AbstractLayoutCache.java:
        Resynced with GNU Classpath.

        2004-11-23  Michael Koch  <konqueror at gmx.de>

        * javax/swing/DefaultSingleSelectionModel.java,
        javax/swing/JPasswordField.java,
        javax/swing/tree/AbstractLayoutCache.java:
        Reformatted and javadocs cleaned up.

Members: 
	ChangeLog:1.3060->1.3061 
	libraries/javalib/javax/swing/DefaultSingleSelectionModel.java:1.2->1.3 
	libraries/javalib/javax/swing/JPasswordField.java:1.3->1.4 
	libraries/javalib/javax/swing/tree/AbstractLayoutCache.java:1.2->1.3 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.3060 kaffe/ChangeLog:1.3061
--- kaffe/ChangeLog:1.3060	Fri Dec  3 00:44:27 2004
+++ kaffe/ChangeLog	Fri Dec  3 00:56:16 2004
@@ -1,5 +1,19 @@
 2004-12-02  Dalibor Topic  <robilad at kaffe.org>
 
+	* libraries/javalib/javax/swing/DefaultSingleSelectionModel.java,
+	libraries/javalib/javax/swing/JPasswordField.java,
+	libraries/javalib/javax/swing/tree/AbstractLayoutCache.java:
+        Resynced with GNU Classpath.
+
+	2004-11-23  Michael Koch  <konqueror at gmx.de>
+
+        * javax/swing/DefaultSingleSelectionModel.java,
+        javax/swing/JPasswordField.java,
+        javax/swing/tree/AbstractLayoutCache.java:
+        Reformatted and javadocs cleaned up.
+
+2004-12-02  Dalibor Topic  <robilad at kaffe.org>
+
 	* libraries/javalib/java/nio/channels/spi/AbstractSelectableChannel.java:
         Resynced with GNU Classpath.
 
Index: kaffe/libraries/javalib/javax/swing/DefaultSingleSelectionModel.java
diff -u kaffe/libraries/javalib/javax/swing/DefaultSingleSelectionModel.java:1.2 kaffe/libraries/javalib/javax/swing/DefaultSingleSelectionModel.java:1.3
--- kaffe/libraries/javalib/javax/swing/DefaultSingleSelectionModel.java:1.2	Sun Oct 24 13:39:10 2004
+++ kaffe/libraries/javalib/javax/swing/DefaultSingleSelectionModel.java	Fri Dec  3 00:56:19 2004
@@ -79,7 +79,7 @@
 
   /**
    * getSelectedIndex
-   * @returns int
+   * @return int
    */
   public int getSelectedIndex ()
   {
@@ -113,7 +113,7 @@
 
   /**
    * isSelected
-   * @returns boolean
+   * @return boolean
    */
   public boolean isSelected ()
   {
@@ -122,7 +122,8 @@
 
   /**
    * addChangeListener
-   * @param listener TODO
+   *
+   * @param listener the listener to add
    */
   public void addChangeListener (ChangeListener listener)
   {
@@ -131,7 +132,8 @@
 
   /**
    * removeChangeListener
-   * @param listener TODO
+   *
+   * @param listener the listener to remove
    */
   public void removeChangeListener (ChangeListener listener)
   {
@@ -161,8 +163,12 @@
 
   /**
    * getListeners
-   * @param listenerClass TODO
-   * @returns EventListener[]
+   *
+   * @param listenerClass the type fo listener
+   *
+   * @return an array of listeners
+   *
+   * @since 1.3
    */
   public EventListener[] getListeners (Class listenerClass)
   {
@@ -171,6 +177,8 @@
 
   /**
    * getChangeListeners
+   *
+   * @since 1.4
    */
   public ChangeListener[] getChangeListeners ()
   {
Index: kaffe/libraries/javalib/javax/swing/JPasswordField.java
diff -u kaffe/libraries/javalib/javax/swing/JPasswordField.java:1.3 kaffe/libraries/javalib/javax/swing/JPasswordField.java:1.4
--- kaffe/libraries/javalib/javax/swing/JPasswordField.java:1.3	Sun Oct 24 13:39:11 2004
+++ kaffe/libraries/javalib/javax/swing/JPasswordField.java	Fri Dec  3 00:56:19 2004
@@ -91,8 +91,9 @@
   }
 
   /**
-   * Constructor JPasswordField
-   * @param text TODO
+   * Creates a <code>JPasswordField</code> object.
+   *
+   * @param text the initial text
    */
   public JPasswordField(String text)
   {
@@ -100,8 +101,9 @@
   }
 
   /**
-   * Constructor JPasswordField
-   * @param columns TODO
+   * Creates a <code>JPasswordField</code> object.
+   *
+   * @param columns the number of columns
    */
   public JPasswordField(int columns)
   {
@@ -109,9 +111,10 @@
   }
 
   /**
-   * Constructor JPasswordField
-   * @param text TODO
-   * @param columns TODO
+   * Creates a <code>JPasswordField</code> object.
+   *
+   * @param text the initial text
+   * @param columns the number of columns
    */
   public JPasswordField(String text, int columns)
   {
@@ -119,10 +122,11 @@
   }
 
   /**
-   * Constructor JPasswordField
-   * @param document TODO
-   * @param text TODO
-   * @param columns TODO
+   * Creates a <code>JPasswordField</code> object.
+   *
+   * @param document the document to use
+   * @param text the initial text
+   * @param columns the number of columns
    */
   public JPasswordField(Document document, String text, int columns)
   {
@@ -131,17 +135,20 @@
 
   /**
    * 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
   {
-    // TODO
+    // TODO: Implement me.
   }
 
   /**
-   * getUIClassID
-   * @return String
+   * Returns the <code>UIClassID</code>
+   *
+   * @return the string "PasswordFieldUI"
    */
   public String getUIClassID()
   {
@@ -150,7 +157,8 @@
 
   /**
    * getEchoChar
-   * @return char
+   *
+   * @return the echo char
    */
   public char getEchoChar()
   {
@@ -159,7 +167,8 @@
 
   /**
    * setEchoChar
-   * @param echo TODO
+   *
+   * @param echo the echo char
    */
   public void setEchoChar(char echo)
   {
@@ -168,7 +177,9 @@
 
   /**
    * echoCharIsSet
-   * @return boolean
+   *
+   * @return <code>true</code> if the echo char is set,
+   * <code>false</code> otherwise.
    */
   public boolean echoCharIsSet()
   {
@@ -176,7 +187,8 @@
   }
 
   /**
-   * copy
+   * Copies the selected text into the clipboard. This operation is not
+   * allowed in a password input field.
    */
   public void copy()
   {
@@ -184,7 +196,8 @@
   }
 
   /**
-   * cut
+   * Cuts the selected text and puts it into the clipboard. This operation
+   * is not allowed in a password input field.
    */
   public void cut()
   {
@@ -193,7 +206,9 @@
 
   /**
    * getText
+   *
    * @return String
+   *
    * @deprecated
    */
   public String getText()
@@ -203,10 +218,14 @@
 
   /**
    * getText
+   *
    * @param offset TODO
    * @param length TODO
+   *
    * @return String
+   *
    * @exception BadLocationException TODO
+   *
    * @deprecated
    */
   public String getText(int offset, int length) throws BadLocationException
@@ -216,6 +235,7 @@
 
   /**
    * getPassword
+   *
    * @return char[]
    */
   public char[] getPassword()
@@ -225,6 +245,7 @@
 
   /**
    * paramString
+   *
    * @return String
    */
   protected String paramString()
@@ -234,7 +255,8 @@
 
   /**
    * getAccessibleContext
-   * @return AccessibleContext
+   *
+   * @return the <code>AccessibleContext</code> object
    */
   public AccessibleContext getAccessibleContext()
   {
Index: kaffe/libraries/javalib/javax/swing/tree/AbstractLayoutCache.java
diff -u kaffe/libraries/javalib/javax/swing/tree/AbstractLayoutCache.java:1.2 kaffe/libraries/javalib/javax/swing/tree/AbstractLayoutCache.java:1.3
--- kaffe/libraries/javalib/javax/swing/tree/AbstractLayoutCache.java:1.2	Sun Oct 24 13:39:25 2004
+++ kaffe/libraries/javalib/javax/swing/tree/AbstractLayoutCache.java	Fri Dec  3 00:56:20 2004
@@ -44,55 +44,39 @@
 import javax.swing.event.TreeModelEvent;
 
 /**
- * AbstractLayoutCache
+ * class AbstractLayoutCache
+ * 
  * @author Andrew Selkirk
  */
 public abstract class AbstractLayoutCache implements RowMapper
 {
-
-	//-------------------------------------------------------------
-	// Classes ----------------------------------------------------
-	//-------------------------------------------------------------
-
 	/**
-	 * NodeDimensions
+	 * class NodeDimensions
 	 */
-	public abstract static class NodeDimensions {
-
-		//-------------------------------------------------------------
-		// Initialization ---------------------------------------------
-		//-------------------------------------------------------------
-
+	public abstract static class NodeDimensions
+	{
 		/**
-		 * Constructor NodeDimensions
+		 * Creates <code>NodeDimensions</code> object.
 		 */
-		public NodeDimensions() {
-			// TODO
-		} // NodeDimensions()
-
-
-		//-------------------------------------------------------------
-		// Methods ----------------------------------------------------
-		//-------------------------------------------------------------
+		public NodeDimensions()
+		{
+			// Do nothing here.
+		}
 
 		/**
 		 * getNodeDimensions
+		 * 
 		 * @param value0 TODO
 		 * @param value1 TODO
 		 * @param value2 TODO
 		 * @param value3 TODO
 		 * @param value4 TODO
-		 * @returns Rectangle
+		 * @return Rectangle
 		 */
-		public abstract Rectangle getNodeDimensions(Object value0, int value1, int value2, boolean value3, Rectangle value4);
-
-
-	} // NodeDimensions
-
-
-	//-------------------------------------------------------------
-	// Variables --------------------------------------------------
-	//-------------------------------------------------------------
+		public abstract Rectangle getNodeDimensions(Object value0, int value1,
+		                                            int value2, boolean value3,
+		                                            Rectangle value4);
+	}
 
 	/**
 	 * nodeDimensions
@@ -119,201 +103,241 @@
 	 */
 	protected int rowHeight;
 
-
-	//-------------------------------------------------------------
-	// Initialization ---------------------------------------------
-	//-------------------------------------------------------------
-
 	/**
 	 * Constructor AbstractLayoutCache
 	 */
-	public AbstractLayoutCache() {
-		// TODO
-	} // AbstractLayoutCache()
-
-
-	//-------------------------------------------------------------
-	// Methods ----------------------------------------------------
-	//-------------------------------------------------------------
+	public AbstractLayoutCache()
+	{
+	  // Do nothing here.
+	}
 
 	/**
 	 * setNodeDimensions
-	 * @param value0 TODO
+	 * 
+	 * @param dimensions TODO
 	 */
-	public void setNodeDimensions(NodeDimensions value0) {
-		// TODO
-	} // setNodeDimensions()
+	public void setNodeDimensions(NodeDimensions dimensions)
+	{
+		nodeDimensions = dimensions;
+	}
 
 	/**
 	 * getNodeDimensions
-	 * @returns NodeDimensions
+	 * 
+	 * @return NodeDimensions
 	 */
-	public NodeDimensions getNodeDimensions() {
-		return null; // TODO
-	} // getNodeDimensions()
+	public NodeDimensions getNodeDimensions()
+	{
+		return nodeDimensions;
+	}
 
 	/**
 	 * getNodeDimensions
+	 * 
 	 * @param value0 TODO
 	 * @param value1 TODO
 	 * @param value2 TODO
 	 * @param value3 TODO
 	 * @param value4 TODO
-	 * @returns Rectangle
+	 * 
+	 * @return Rectangle
 	 */
-	protected Rectangle getNodeDimensions(Object value0, int value1, int value2, boolean value3, Rectangle value4) {
+	protected Rectangle getNodeDimensions(Object value0, int value1, int value2, boolean value3, Rectangle value4)
+	{
 		return null; // TODO
-	} // getNodeDimensions()
+	}
 
 	/**
-	 * setModel
-	 * @param value0 TODO
+	 * Sets the model that provides the tree data.
+	 * 
+	 * @param the model
 	 */
-	public void setModel(TreeModel value0) {
-		// TODO
-	} // setModel()
+	public void setModel(TreeModel model)
+	{
+	  treeModel = model;
+	}
 
 	/**
-	 * getModel
-	 * @returns TreeModel
+	 * Returns the model that provides the tree data.
+	 * 
+	 * @return the model
 	 */
-	public TreeModel getModel() {
-		return null; // TODO
-	} // getModel()
+	public TreeModel getModel()
+	{
+		return treeModel;
+	}
 
 	/**
 	 * setRootVisible
-	 * @param value0 TODO
-	 */
-	public void setRootVisible(boolean value0) {
-		// TODO
-	} // setRootVisible()
+	 * 
+	 * @param visible <code>true</code> if root should be visible,
+	 * <code>false</code> otherwise
+	 */
+	public void setRootVisible(boolean visible)
+	{
+		rootVisible = visible;
+	}
 
 	/**
 	 * isRootVisible
-	 * @returns boolean
-	 */
-	public boolean isRootVisible() {
-		return false; // TODO
-	} // isRootVisible()
+	 * 
+	 * @return <code>true</code> if root is visible,
+	 * <code>false</code> otherwise
+	 */
+	public boolean isRootVisible()
+	{
+		return rootVisible;
+	}
 
 	/**
 	 * setRowHeight
-	 * @param value0 TODO
+	 * 
+	 * @param height the row height
 	 */
-	public void setRowHeight(int value0) {
-		// TODO
-	} // setRowHeight()
+	public void setRowHeight(int height)
+	{
+		rowHeight = height;
+	}
 
 	/**
 	 * getRowHeight
-	 * @returns int
+	 * 
+	 * @return the row height
 	 */
-	public int getRowHeight() {
-		return 0; // TODO
-	} // getRowHeight()
+	public int getRowHeight()
+	{
+		return rowHeight;
+	}
 
 	/**
 	 * setSelectionModel
-	 * @param value0 TODO
+	 * 
+	 * @param model the model
 	 */
-	public void setSelectionModel(TreeSelectionModel value0) {
-		// TODO
-	} // setSelectionModel()
+	public void setSelectionModel(TreeSelectionModel model)
+	{
+		treeSelectionModel = model;
+	}
 
 	/**
 	 * getSelectionModel
-	 * @returns TreeSelectionModel
+	 * 
+	 * @return the model
 	 */
-	public TreeSelectionModel getSelectionModel() {
-		return null; // TODO
-	} // getSelectionModel()
+	public TreeSelectionModel getSelectionModel()
+	{
+		return treeSelectionModel;
+	}
 
 	/**
 	 * getPreferredHeight
-	 * @returns int
+	 * 
+	 * @return int
 	 */
-	public int getPreferredHeight() {
+	public int getPreferredHeight()
+	{
 		return 0; // TODO
-	} // getPreferredHeight()
+	}
 
 	/**
 	 * getPreferredWidth
+	 * 
 	 * @param value0 TODO
-	 * @returns int
+	 * 
+	 * @return int
 	 */
-	public int getPreferredWidth(Rectangle value0) {
+	public int getPreferredWidth(Rectangle value0)
+	{
 		return 0; // TODO
-	} // getPreferredWidth()
+	}
 
 	/**
 	 * isExpanded
+	 * 
 	 * @param value0 TODO
-	 * @returns boolean
+	 * 
+	 * @return boolean
 	 */
 	public abstract boolean isExpanded(TreePath value0);
 
 	/**
 	 * getBounds
+	 * 
 	 * @param value0 TODO
 	 * @param value1 TODO
-	 * @returns Rectangle
+	 * 
+	 * @return Rectangle
 	 */
 	public abstract Rectangle getBounds(TreePath value0, Rectangle value1);
 
 	/**
 	 * getPathForRow
-	 * @param value0 TODO
-	 * @returns TreePath
+	 * 
+	 * @param row the row
+	 * 
+	 * @return the tree path
 	 */
-	public abstract TreePath getPathForRow(int value0);
+	public abstract TreePath getPathForRow(int row);
 
 	/**
 	 * getRowForPath
-	 * @param value0 TODO
-	 * @returns int
+	 * 
+	 * @param path the tree path
+	 * 
+	 * @return the row
 	 */
-	public abstract int getRowForPath(TreePath value0);
+	public abstract int getRowForPath(TreePath path);
 
 	/**
 	 * getPathClosestTo
+	 * 
 	 * @param value0 TODO
 	 * @param value1 TODO
-	 * @returns TreePath
+	 * 
+	 * @return the tree path
 	 */
 	public abstract TreePath getPathClosestTo(int value0, int value1);
 
 	/**
 	 * getVisiblePathsFrom
-	 * @param value0 TODO
-	 * @returns Enumeration
+	 * 
+	 * @param path the tree path
+	 * 
+	 * @return Enumeration
 	 */
-	public abstract Enumeration getVisiblePathsFrom(TreePath value0);
+	public abstract Enumeration getVisiblePathsFrom(TreePath path);
 
 	/**
 	 * getVisibleChildCount
-	 * @param value0 TODO
-	 * @returns int
+	 * 
+	 * @param path the tree path
+	 * 
+	 * @return int
 	 */
 	public abstract int getVisibleChildCount(TreePath value0);
 
 	/**
 	 * setExpandedState
+	 * 
 	 * @param value0 TODO
+	 * 
 	 * @param value1 TODO
 	 */
 	public abstract void setExpandedState(TreePath value0, boolean value1);
 
 	/**
 	 * getExpandedState
-	 * @param value0 TODO
-	 * @returns boolean
+	 * 
+	 * @param path the tree path
+	 * 
+	 * @return boolean
 	 */
-	public abstract boolean getExpandedState(TreePath value0);
+	public abstract boolean getExpandedState(TreePath path);
 
 	/**
 	 * getRowCount
-	 * @returns int
+	 * 
+	 * @return the number of rows
 	 */
 	public abstract int getRowCount();
 
@@ -324,50 +348,58 @@
 
 	/**
 	 * invalidatePathBounds
-	 * @param value0 TODO
+	 * 
+	 * @param path the tree path
 	 */
-	public abstract void invalidatePathBounds(TreePath value0);
+	public abstract void invalidatePathBounds(TreePath path);
 
 	/**
 	 * treeNodesChanged
-	 * @param value0 TODO
+	 * 
+	 * @param event the event to send
 	 */
-	public abstract void treeNodesChanged(TreeModelEvent value0);
+	public abstract void treeNodesChanged(TreeModelEvent event);
 
 	/**
 	 * treeNodesInserted
-	 * @param value0 TODO
+	 * 
+	 * @param event the event to send
 	 */
-	public abstract void treeNodesInserted(TreeModelEvent value0);
+	public abstract void treeNodesInserted(TreeModelEvent event);
 
 	/**
 	 * treeNodesRemoved
-	 * @param value0 TODO
+	 * 
+	 * @param event the event to send
 	 */
-	public abstract void treeNodesRemoved(TreeModelEvent value0);
+	public abstract void treeNodesRemoved(TreeModelEvent event);
 
 	/**
 	 * treeStructureChanged
-	 * @param value0 TODO
+	 * 
+	 * @param event the event to send
 	 */
-	public abstract void treeStructureChanged(TreeModelEvent value0);
+	public abstract void treeStructureChanged(TreeModelEvent event);
 
 	/**
 	 * getRowsForPaths
-	 * @param value0 TODO
-	 * @returns int[]
+	 * 
+	 * @param paths the tree paths
+	 * 
+	 * @return an array of rows
 	 */
-	public int[] getRowsForPaths(TreePath[] value0) {
+	public int[] getRowsForPaths(TreePath[] paths)
+	{
 		return null; // TODO
-	} // getRowsForPaths()
+	}
 
 	/**
 	 * isFixedRowHeight
-	 * @returns boolean
+	 * 
+	 * @return boolean
 	 */
-	protected boolean isFixedRowHeight() {
+	protected boolean isFixedRowHeight()
+	{
 		return false; // TODO
-	} // isFixedRowHeight()
-
-
-} // AbstractLayoutCache
+	}
+}




More information about the kaffe mailing list