[kaffe] CVS kaffe (robilad): Resynced with GNU Classpath: awt and swing fixes
Kaffe CVS
cvs-commits at kaffe.org
Tue Jul 5 20:10:12 PDT 2005
PatchSet 6704
Date: 2005/07/06 02:40:41
Author: robilad
Branch: HEAD
Tag: (none)
Log:
Resynced with GNU Classpath: awt and swing fixes
Members:
libraries/javalib/javax/swing/table/DefaultTableColumnModel.java:1.10->1.11
libraries/javalib/javax/swing/text/JTextComponent.java:1.19->1.20
libraries/javalib/javax/swing/text/StyleContext.java:1.4->1.5
ChangeLog:1.4228->1.4229
libraries/javalib/java/applet/Applet.java:1.16->1.17
libraries/javalib/java/awt/DefaultKeyboardFocusManager.java:1.9->1.10
libraries/javalib/java/util/BitSet.java:1.18->1.19
libraries/javalib/java/util/Calendar.java:1.37->1.38
libraries/javalib/java/util/Collections.java:1.19->1.20
libraries/javalib/java/util/Date.java:1.27->1.28
libraries/javalib/java/util/Hashtable.java:1.36->1.37
libraries/javalib/java/util/LinkedList.java:1.11->1.12
libraries/javalib/java/util/Properties.java:1.27->1.28
libraries/javalib/java/util/PropertyResourceBundle.java:1.6->1.7
libraries/javalib/java/util/ResourceBundle.java:1.29->1.30
libraries/javalib/java/util/SimpleTimeZone.java:1.26->1.27
libraries/javalib/java/util/TreeMap.java:1.22->1.23
libraries/javalib/javax/swing/AbstractAction.java:1.5->1.6
libraries/javalib/javax/swing/Action.java:1.3->1.4
libraries/javalib/javax/swing/JLabel.java:1.10->1.11
libraries/javalib/javax/swing/JScrollPane.java:1.15->1.16
libraries/javalib/javax/swing/JTable.java:1.22->1.23
Index: kaffe/libraries/javalib/javax/swing/table/DefaultTableColumnModel.java
diff -u kaffe/libraries/javalib/javax/swing/table/DefaultTableColumnModel.java:1.10 kaffe/libraries/javalib/javax/swing/table/DefaultTableColumnModel.java:1.11
--- kaffe/libraries/javalib/javax/swing/table/DefaultTableColumnModel.java:1.10 Mon Jul 4 00:08:41 2005
+++ kaffe/libraries/javalib/javax/swing/table/DefaultTableColumnModel.java Wed Jul 6 02:40:41 2005
@@ -1,5 +1,5 @@
/* DefaultTableColumnModel.java --
- Copyright (C) 2002, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -119,9 +119,11 @@
*/
public void addColumn(TableColumn col)
{
+ if (col == null)
+ throw new IllegalArgumentException("Null 'col' argument.");
tableColumns.add(col);
invalidateWidthCache();
- fireColumnAdded(new TableColumnModelEvent(this,0,tableColumns.size()));
+ fireColumnAdded(new TableColumnModelEvent(this, 0, tableColumns.size() - 1));
}
/**
@@ -132,8 +134,10 @@
*/
public void removeColumn(TableColumn col)
{
- int index = getColumnIndex(col);
- fireColumnRemoved(new TableColumnModelEvent(this,index,0));
+ int index = this.tableColumns.indexOf(col);
+ if (index < 0)
+ return;
+ fireColumnRemoved(new TableColumnModelEvent(this, index, 0));
tableColumns.remove(col);
invalidateWidthCache();
}
@@ -147,10 +151,14 @@
*/
public void moveColumn(int i, int j)
{
- Object tmp = tableColumns.get(i);
- tableColumns.set(i, tableColumns.get(j));
- tableColumns.set(j, tmp);
- fireColumnAdded(new TableColumnModelEvent(this,i,j));
+ int columnCount = getColumnCount();
+ if (i < 0 || i >= columnCount)
+ throw new IllegalArgumentException("Index 'i' out of range.");
+ if (j < 0 || j >= columnCount)
+ throw new IllegalArgumentException("Index 'j' out of range.");
+ Object column = tableColumns.remove(i);
+ tableColumns.add(j, column);
+ fireColumnAdded(new TableColumnModelEvent(this, i, j));
}
/**
@@ -182,14 +190,27 @@
}
/**
- * getColumnIndex returns index of the specified column
+ * Returns the index of the {@link TableColumn} with the given identifier.
*
- * @param identifier identifier of the column
- * @return int index of the given column
+ * @param identifier the identifier (<code>null</code> not permitted).
+ *
+ * @return The index of the {@link TableColumn} with the given identifier.
+ *
+ * @throws IllegalArgumentException if <code>identifier</code> is
+ * <code>null</code> or there is no column with that identifier.
*/
public int getColumnIndex(Object identifier)
{
- return tableColumns.indexOf(identifier, 0);
+ if (identifier == null)
+ throw new IllegalArgumentException("Null identifier.");
+ int columnCount = tableColumns.size();
+ for (int i = 0; i < columnCount; i++)
+ {
+ TableColumn tc = (TableColumn) tableColumns.get(i);
+ if (identifier.equals(tc.getIdentifier()))
+ return i;
+ }
+ throw new IllegalArgumentException("No TableColumn with that identifier.");
}
/**
Index: kaffe/libraries/javalib/javax/swing/text/JTextComponent.java
diff -u kaffe/libraries/javalib/javax/swing/text/JTextComponent.java:1.19 kaffe/libraries/javalib/javax/swing/text/JTextComponent.java:1.20
--- kaffe/libraries/javalib/javax/swing/text/JTextComponent.java:1.19 Mon Jul 4 00:08:45 2005
+++ kaffe/libraries/javalib/javax/swing/text/JTextComponent.java Wed Jul 6 02:40:41 2005
@@ -54,6 +54,8 @@
import java.awt.event.InputMethodListener;
import java.awt.event.KeyEvent;
import java.io.IOException;
+import java.io.Reader;
+import java.io.Writer;
import java.util.Enumeration;
import java.util.Hashtable;
@@ -1611,4 +1613,55 @@
{
navigationFilter = filter;
}
+
+ /**
+ * Read and set the content this component. If not overridden, the
+ * method reads the component content as a plain text.
+ *
+ * The second parameter of this method describes the input stream. It can
+ * be String, URL, File and so on. If not null, this object is added to
+ * the properties of the associated document under the key
+ * {@link Document#StreamDescriptionProperty}.
+ *
+ * @param input an input stream to read from.
+ * @param streamDescription an object, describing the stream.
+ *
+ * @throws IOException if the reader throws it.
+ *
+ * @see getDocument()
+ * @see Document#getProperty(Object)
+ */
+ public void read(Reader input, Object streamDescription)
+ throws IOException
+ {
+ if (streamDescription != null)
+ {
+ Document d = getDocument();
+ if (d != null)
+ d.putProperty(Document.StreamDescriptionProperty, streamDescription);
+ }
+
+ StringBuffer b = new StringBuffer();
+ int c;
+
+ // Read till -1 (EOF).
+ while ((c = input.read()) >= 0)
+ b.append((char) c);
+
+ setText(b.toString());
+ }
+
+ /**
+ * Write the content of this component to the given stream. If not
+ * overridden, the method writes the component content as a plain text.
+ *
+ * @param output the writer to write into.
+ *
+ * @throws IOException if the writer throws it.
+ */
+ public void write(Writer output)
+ throws IOException
+ {
+ output.write(getText());
+ }
}
Index: kaffe/libraries/javalib/javax/swing/text/StyleContext.java
diff -u kaffe/libraries/javalib/javax/swing/text/StyleContext.java:1.4 kaffe/libraries/javalib/javax/swing/text/StyleContext.java:1.5
--- kaffe/libraries/javalib/javax/swing/text/StyleContext.java:1.4 Mon Jul 4 00:08:45 2005
+++ kaffe/libraries/javalib/javax/swing/text/StyleContext.java Wed Jul 6 02:40:41 2005
@@ -380,9 +380,17 @@
// FIXME: also not sure if these tables ought to be static (singletons),
// shared across all StyleContexts. I think so, but it's not clear in
// docs. revert to non-shared if you think it matters.
-
+
+ /**
+ * The name of the default style.
+ */
public static final String DEFAULT_STYLE = "default";
+ /**
+ * The default style for this style context.
+ */
+ NamedStyle defaultStyle = new NamedStyle(DEFAULT_STYLE, null);
+
static Hashtable sharedAttributeSets = new Hashtable();
static Hashtable sharedFonts = new Hashtable();
@@ -392,10 +400,15 @@
EventListenerList listenerList;
Hashtable styleTable;
+ /**
+ * Creates a new instance of the style context. Add the default style
+ * to the style table.
+ */
public StyleContext()
{
listenerList = new EventListenerList();
styleTable = new Hashtable();
+ styleTable.put(DEFAULT_STYLE, defaultStyle);
}
protected SmallAttributeSet createSmallAttributeSet(AttributeSet a)
@@ -436,11 +449,25 @@
styleTable.remove(name);
}
+ /**
+ * Get the style from the style table. If the passed name
+ * matches {@link #DEFAULT_STYLE}, returns the default style.
+ * Otherwise returns the previously defined style of
+ * <code>null</code> if the style with the given name is not defined.
+ *
+ * @param name the name of the style.
+ *
+ * @return the style with the given name or null if no such defined.
+ */
public Style getStyle(String name)
{
return (Style) styleTable.get(name);
}
-
+
+ /**
+ * Get the names of the style. The returned enumeration always
+ * contains at least one member, the default style.
+ */
public Enumeration getStyleNames()
{
return styleTable.keys();
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.4228 kaffe/ChangeLog:1.4229
--- kaffe/ChangeLog:1.4228 Wed Jul 6 02:26:05 2005
+++ kaffe/ChangeLog Wed Jul 6 02:40:33 2005
@@ -2,6 +2,85 @@
Resynced with GNU Classpath.
+ 2005-07-05 David Gilbert <david.gilbert at object-refinery.com>
+
+ * javax/swing/JTable.java
+ (getColumnName): return name from column in data model.
+
+ 2005-07-05 Thomas Fitzsimmons <fitzsim at redhat.com>
+
+ * java/awt/DefaultKeyboardFocusManager.java (dispatchEvent): Check
+ parent and target before casting target to Window.
+
+ 2005-07-05 David Gilbert <david.gilbert at object-refinery.com>
+
+ * javax/swing/AbstractAction.java: updated API docs,
+ * javax/swing/Action.java: likewise.
+
+ 2005-07-05 David Gilbert <david.gilbert at object-refinery.com>
+
+ * java/applet/Applet.java: added import to fix API doc link.
+
+ 2005-07-05 Audrius Meskauskas <AudriusA at Bioinformatics.org>
+
+ * javax/swing/text/StyleContext.java
+ (defaultStyle): New field.
+ (constructor): Add defaultStyle to the styleTable.
+ (DEFAULT_STYLE, getStyle, getStyleNames): Documented.
+
+ 2005-07-05 David Gilbert <david.gilbert at object-refinery.com>
+
+ * javax/swing/JTable.java:
+ (addColumn): retrieve correct column name,
+ (convertColumnIndexToModel): remove check for > columnCount and let
+ exception happen,
+ (getColumnName): retrieve name from TableColumn,
+ (isCellEditable): implemented,
+ (createDefaultColumnsFromModel): implemented.
+ * javax/swing/table/DefaultTableColumnModel.java:
+ (addColumn): throw exception for null argument, set correct column
+ index in TableColumnModelEvent,
+ (removeColumn): use correct column index,
+ (moveColumn): move the column, don't swap it. Also added argument
+ checks,
+ (getColumnIndex): reimplemented.
+
+ 2005-07-05 Sven de Marothy <sven at physto.se>
+
+ * javax/swing/JLabel.java:
+ (JLabel): Revert previous change for JLabel(Icon) constructor.
+
+ 2005-07-05 Roman Kennke <roman at kennke.org>
+
+ * javax/swing/JScrollPane.java:
+ Added API documentation for class and constructors.
+
+ 2005-07-05 David Gilbert <david.gilbert at object-refinery.com>
+
+ * java/util/BitSet.java: fixed minor problems in API docs,
+ * java/util/Calendar.java: likewise,
+ * java/util/Collections.java: likewise,
+ * java/util/Date.java: likewise,
+ * java/util/Hashtable.java: likewise,
+ * java/util/LinkedList.java: likewise,
+ * java/util/Properties.java: likewise,
+ * java/util/PropertyResourceBundle.java: likewise,
+ * java/util/ResourceBundle.java: likewise,
+ * java/util/SimpleTimeZone.java: likewise,
+ * java/util/TreeMap.java: likewise.
+
+ 2005-07-05 Audrius Meskauskas <AudriusA at Bioinformatics.org>
+
+ * javax/swing/text/JTextComponent.java (read, write): New methods.
+
+ 2005-07-05 David Gilbert <david.gilbert at object-refinery.com>
+
+ * javax/swing/JTable.java: fixed API doc links all over.
+
+2005-07-06 Dalibor Topic <robilad at kaffe.org>
+
+ Resynced with GNU Classpath.
+
2005-07-05 Mark Wielaard <mark at klomp.org>
* include/Makefile.am (GTKPEER_H_FILES): Removed GtkTextComponentPeer.
Index: kaffe/libraries/javalib/java/applet/Applet.java
diff -u kaffe/libraries/javalib/java/applet/Applet.java:1.16 kaffe/libraries/javalib/java/applet/Applet.java:1.17
--- kaffe/libraries/javalib/java/applet/Applet.java:1.16 Mon Jul 4 00:06:00 2005
+++ kaffe/libraries/javalib/java/applet/Applet.java Wed Jul 6 02:40:37 2005
@@ -38,6 +38,7 @@
package java.applet;
+import java.awt.Component;
import java.awt.Dimension;
import java.awt.GraphicsEnvironment;
import java.awt.HeadlessException;
Index: kaffe/libraries/javalib/java/awt/DefaultKeyboardFocusManager.java
diff -u kaffe/libraries/javalib/java/awt/DefaultKeyboardFocusManager.java:1.9 kaffe/libraries/javalib/java/awt/DefaultKeyboardFocusManager.java:1.10
--- kaffe/libraries/javalib/java/awt/DefaultKeyboardFocusManager.java:1.9 Mon Jul 4 00:06:02 2005
+++ kaffe/libraries/javalib/java/awt/DefaultKeyboardFocusManager.java Wed Jul 6 02:40:39 2005
@@ -187,20 +187,26 @@
// Keep track of this window's focus owner.
- // Find the target Component's top-level ancestor.
+ // Find the target Component's top-level ancestor. target
+ // may be a window.
Container parent = target.getParent ();
while (parent != null
&& !(parent instanceof Window))
parent = parent.getParent ();
- Window toplevel = parent == null ?
- (Window) target : (Window) parent;
+ // If the parent is null and target is not a window, then target is an
+ // unanchored component and so we don't want to set the focus owner.
+ if (! (parent == null && ! (target instanceof Window)))
+ {
+ Window toplevel = parent == null ?
+ (Window) target : (Window) parent;
- Component focusOwner = getFocusOwner ();
- if (focusOwner != null
- && ! (focusOwner instanceof Window))
- toplevel.setFocusOwner (focusOwner);
+ Component focusOwner = getFocusOwner ();
+ if (focusOwner != null
+ && ! (focusOwner instanceof Window))
+ toplevel.setFocusOwner (focusOwner);
+ }
}
else if (e.id == FocusEvent.FOCUS_LOST)
{
Index: kaffe/libraries/javalib/java/util/BitSet.java
diff -u kaffe/libraries/javalib/java/util/BitSet.java:1.18 kaffe/libraries/javalib/java/util/BitSet.java:1.19
--- kaffe/libraries/javalib/java/util/BitSet.java:1.18 Mon Jul 4 00:07:24 2005
+++ kaffe/libraries/javalib/java/util/BitSet.java Wed Jul 6 02:40:39 2005
@@ -116,8 +116,8 @@
* given <code>set</code>. This means it builds the intersection
* of the two sets. The result is stored into this bit set.
*
- * @param set the second bit set
- * @throws NullPointerException if set is null
+ * @param bs the second bit set
+ * @throws NullPointerException if bs is null
*/
public void and(BitSet bs)
{
@@ -131,13 +131,13 @@
/**
* Performs the logical AND operation on this bit set and the
- * complement of the given <code>set</code>. This means it
+ * complement of the given <code>bs</code>. This means it
* selects every element in the first set, that isn't in the
* second set. The result is stored into this bit set and is
* effectively the set difference of the two.
*
- * @param set the second bit set
- * @throws NullPointerException if set is null
+ * @param bs the second bit set
+ * @throws NullPointerException if bs is null
* @since 1.2
*/
public void andNot(BitSet bs)
@@ -190,12 +190,12 @@
}
/**
- * Removes the integer <code>bitIndex</code> from this set. That is
+ * Removes the integer <code>pos</code> from this set. That is
* the corresponding bit is cleared. If the index is not in the set,
* this method does nothing.
*
- * @param bitIndex a non-negative integer
- * @throws IndexOutOfBoundsException if bitIndex < 0
+ * @param pos a non-negative integer
+ * @throws IndexOutOfBoundsException if pos < 0
*/
public void clear(int pos)
{
@@ -336,8 +336,8 @@
* set, otherwise false.
*
* @param pos a non-negative integer
- * @return the value of the bit at the specified index
- * @throws IndexOutOfBoundsException if the index is negative
+ * @return the value of the bit at the specified position
+ * @throws IndexOutOfBoundsException if the pos is negative
*/
public boolean get(int pos)
{
Index: kaffe/libraries/javalib/java/util/Calendar.java
diff -u kaffe/libraries/javalib/java/util/Calendar.java:1.37 kaffe/libraries/javalib/java/util/Calendar.java:1.38
--- kaffe/libraries/javalib/java/util/Calendar.java:1.37 Mon Jul 4 00:07:24 2005
+++ kaffe/libraries/javalib/java/util/Calendar.java Wed Jul 6 02:40:39 2005
@@ -897,7 +897,6 @@
/**
* Fills any unset fields in the time field list
- * @return true if the specified field has a value.
*/
protected void complete()
{
Index: kaffe/libraries/javalib/java/util/Collections.java
diff -u kaffe/libraries/javalib/java/util/Collections.java:1.19 kaffe/libraries/javalib/java/util/Collections.java:1.20
--- kaffe/libraries/javalib/java/util/Collections.java:1.19 Mon Jul 4 00:07:24 2005
+++ kaffe/libraries/javalib/java/util/Collections.java Wed Jul 6 02:40:39 2005
@@ -298,7 +298,7 @@
*
* @param index The index of the element to retrieve.
* @return the object at the specified index.
- * @throws IndexOutofBoundsException as any given index
+ * @throws IndexOutOfBoundsException as any given index
* is outside the bounds of an empty array.
*/
public Object get(int index)
@@ -2137,7 +2137,7 @@
* within the underlying collection, first obtaining
* a lock on the mutex.
*
- * @param cl the collection to test for.
+ * @param c1 the collection to test for.
* @return <code>true</code> if for every element o in c, contains(o)
* would return <code>true</code>.
* @throws ClassCastException if the type of any element in cl is not a valid
@@ -3396,7 +3396,7 @@
* operation). If the map already contains a key, its value is replaced.
* A lock is obtained on the mutex before the operation proceeds.
*
- * @param m the mapping to load into this map
+ * @param map the mapping to load into this map
* @throws UnsupportedOperationException if the operation is not supported
* @throws ClassCastException if a key or value is of the wrong type
* @throws IllegalArgumentException if something about a key or value
@@ -3420,7 +3420,7 @@
* <code>containsKey()</code> check is required to avoid this ambiguity.
* Before the mapping is removed, a lock is obtained on the mutex.
*
- * @param key the key to remove
+ * @param o the key to remove
* @return the value the key mapped to, or null if not present
* @throws UnsupportedOperationException if deletion is unsupported
* @throws NullPointerException if the key is null and this map doesn't
@@ -4109,7 +4109,7 @@
* Test whether the underlying collection contains every element in a given
* collection.
*
- * @param c the collection to test for.
+ * @param c1 the collection to test for.
* @return <code>true</code> if for every element o in c, contains(o) would
* return <code>true</code>.
* @throws ClassCastException if the type of any element in c is not a valid
Index: kaffe/libraries/javalib/java/util/Date.java
diff -u kaffe/libraries/javalib/java/util/Date.java:1.27 kaffe/libraries/javalib/java/util/Date.java:1.28
--- kaffe/libraries/javalib/java/util/Date.java:1.27 Mon Jul 4 00:07:25 2005
+++ kaffe/libraries/javalib/java/util/Date.java Wed Jul 6 02:40:39 2005
@@ -41,6 +41,8 @@
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
/**
* <p>
@@ -240,8 +242,8 @@
* <code>TimeZone</code> instead.
* @param year the difference between the required year and 1900.
* @param month the month as a value between 0 and 11.
- * @param day the day as a value between 0 and 31.
- * @param hour the hour as a value between 0 and 23, in 24-hour
+ * @param date the day as a value between 0 and 31.
+ * @param hrs the hour as a value between 0 and 23, in 24-hour
* clock notation.
* @param min the minute as a value between 0 and 59.
* @param sec the second as a value between 0 and 61 (with 60
@@ -718,7 +720,7 @@
* </li>
* </ul>
*
- * @param s The String to parse.
+ * @param string The String to parse.
* @return The time in milliseconds since the epoch.
* @throws IllegalArgumentException if the string fails to parse.
* @deprecated Use DateFormat.parse(String)
Index: kaffe/libraries/javalib/java/util/Hashtable.java
diff -u kaffe/libraries/javalib/java/util/Hashtable.java:1.36 kaffe/libraries/javalib/java/util/Hashtable.java:1.37
--- kaffe/libraries/javalib/java/util/Hashtable.java:1.36 Mon Jul 4 00:07:25 2005
+++ kaffe/libraries/javalib/java/util/Hashtable.java Wed Jul 6 02:40:40 2005
@@ -196,7 +196,7 @@
/**
* Resets the value.
- * @param newValue the new value
+ * @param newVal the new value
* @return the prior value
* @throws NullPointerException if <code>newVal</code> is null
*/
Index: kaffe/libraries/javalib/java/util/LinkedList.java
diff -u kaffe/libraries/javalib/java/util/LinkedList.java:1.11 kaffe/libraries/javalib/java/util/LinkedList.java:1.12
--- kaffe/libraries/javalib/java/util/LinkedList.java:1.11 Mon Jul 4 00:07:25 2005
+++ kaffe/libraries/javalib/java/util/LinkedList.java Wed Jul 6 02:40:40 2005
@@ -385,7 +385,7 @@
/**
* Adds an element to the end of the list.
*
- * @param e the entry to add
+ * @param o the entry to add
* @return true, as it always succeeds
*/
public boolean add(Object o)
Index: kaffe/libraries/javalib/java/util/Properties.java
diff -u kaffe/libraries/javalib/java/util/Properties.java:1.27 kaffe/libraries/javalib/java/util/Properties.java:1.28
--- kaffe/libraries/javalib/java/util/Properties.java:1.27 Mon Jul 4 00:07:26 2005
+++ kaffe/libraries/javalib/java/util/Properties.java Wed Jul 6 02:40:40 2005
@@ -173,7 +173,7 @@
# The safest way to include a space at the end of a value:
label = Name:\\u0020</pre>
*
- * @param in the input stream
+ * @param inStream the input stream
* @throws IOException if an error occurred when reading the input
* @throws NullPointerException if in is null
*/
Index: kaffe/libraries/javalib/java/util/PropertyResourceBundle.java
diff -u kaffe/libraries/javalib/java/util/PropertyResourceBundle.java:1.6 kaffe/libraries/javalib/java/util/PropertyResourceBundle.java:1.7
--- kaffe/libraries/javalib/java/util/PropertyResourceBundle.java:1.6 Mon Jul 4 00:07:26 2005
+++ kaffe/libraries/javalib/java/util/PropertyResourceBundle.java Wed Jul 6 02:40:40 2005
@@ -87,7 +87,7 @@
* @author Jochen Hoenicke
* @see ResourceBundle
* @see ListResourceBundle
- * @see Properties#load()
+ * @see Properties#load(InputStream)
* @since 1.1
* @status updated to 1.4
*/
Index: kaffe/libraries/javalib/java/util/ResourceBundle.java
diff -u kaffe/libraries/javalib/java/util/ResourceBundle.java:1.29 kaffe/libraries/javalib/java/util/ResourceBundle.java:1.30
--- kaffe/libraries/javalib/java/util/ResourceBundle.java:1.29 Mon Jul 4 00:07:26 2005
+++ kaffe/libraries/javalib/java/util/ResourceBundle.java Wed Jul 6 02:40:40 2005
@@ -359,7 +359,7 @@
*
* @param baseName the name of the ResourceBundle
* @param locale A locale
- * @param classloader a ClassLoader
+ * @param classLoader a ClassLoader
* @return the desired resource bundle
* @throws MissingResourceException if the resource bundle can't be found
* @throws NullPointerException if any argument is null
Index: kaffe/libraries/javalib/java/util/SimpleTimeZone.java
diff -u kaffe/libraries/javalib/java/util/SimpleTimeZone.java:1.26 kaffe/libraries/javalib/java/util/SimpleTimeZone.java:1.27
--- kaffe/libraries/javalib/java/util/SimpleTimeZone.java:1.26 Mon Jul 4 00:07:26 2005
+++ kaffe/libraries/javalib/java/util/SimpleTimeZone.java Wed Jul 6 02:40:40 2005
@@ -50,7 +50,7 @@
* lying in the AD era.
*
* @see Calendar
- * @see GregorianCalender
+ * @see GregorianCalendar
* @author Jochen Hoenicke
*/
public class SimpleTimeZone extends TimeZone
@@ -126,7 +126,7 @@
/**
* This variable can have different meanings. See startMode for details
- * @see #startMode;
+ * @see #startMode
* @serial
*/
private int startDay;
@@ -135,7 +135,7 @@
* This variable specifies the day of week the change takes place. If
* startMode == DOM_MODE, this is undefined.
* @serial
- * @see #startMode;
+ * @see #startMode
*/
private int startDayOfWeek;
@@ -173,7 +173,7 @@
/**
* This variable can have different meanings. See startMode for details
* @serial
- * @see #startMode;
+ * @see #startMode
*/
private int endDay;
@@ -181,7 +181,7 @@
* This variable specifies the day of week the change takes place. If
* endMode == DOM_MODE, this is undefined.
* @serial
- * @see #startMode;
+ * @see #startMode
*/
private int endDayOfWeek;
@@ -309,13 +309,13 @@
* @param id The identifier of this time zone.
* @param startMonth The start month of daylight savings; use the
* constants in Calendar.
- * @param startday A day in month or a day of week number, as
+ * @param startDayOfWeekInMonth A day in month or a day of week number, as
* described above.
* @param startDayOfWeek The start rule day of week; see above.
* @param startTime A time in millis in standard time.
* @param endMonth The end month of daylight savings; use the
* constants in Calendar.
- * @param endday A day in month or a day of week number, as
+ * @param endDayOfWeekInMonth A day in month or a day of week number, as
* described above.
* @param endDayOfWeek The end rule day of week; see above.
* @param endTime A time in millis in standard time.
@@ -562,7 +562,7 @@
* @param day A day in month, or a day of week in month.
* @param dayOfWeek A day of week, when daylight savings ends.
* @param time A time in millis in standard time.
- * @see #setStartRule
+ * @see #setStartRule(int, int, int, int)
*/
public void setEndRule(int month, int day, int dayOfWeek, int time)
{
@@ -602,7 +602,7 @@
* @param after If true, day and dayOfWeek specify first day of week on or
* after day, else first day of week on or before.
* @since 1.2
- * @see #setStartRule
+ * @see #setStartRule(int, int, int, int, boolean)
*/
public void setEndRule(int month, int day, int dayOfWeek, int time,
boolean after)
@@ -638,9 +638,8 @@
*
* @param month The end month of daylight savings.
* @param day A day in month, or a day of week in month.
- * @param dayOfWeek A day of week, when daylight savings ends.
* @param time A time in millis in standard time.
- * @see #setStartRule
+ * @see #setStartRule(int, int, int)
*/
public void setEndRule(int month, int day, int time)
{
Index: kaffe/libraries/javalib/java/util/TreeMap.java
diff -u kaffe/libraries/javalib/java/util/TreeMap.java:1.22 kaffe/libraries/javalib/java/util/TreeMap.java:1.23
--- kaffe/libraries/javalib/java/util/TreeMap.java:1.22 Mon Jul 4 00:07:26 2005
+++ kaffe/libraries/javalib/java/util/TreeMap.java Wed Jul 6 02:40:40 2005
@@ -207,7 +207,7 @@
* comparable by the Comparator, otherwise map operations may throw a
* {@link ClassCastException}.
*
- * @param comparator the sort order for the keys of this map, or null
+ * @param c the sort order for the keys of this map, or null
* for the natural order
*/
public TreeMap(Comparator c)
Index: kaffe/libraries/javalib/javax/swing/AbstractAction.java
diff -u kaffe/libraries/javalib/javax/swing/AbstractAction.java:1.5 kaffe/libraries/javalib/javax/swing/AbstractAction.java:1.6
--- kaffe/libraries/javalib/javax/swing/AbstractAction.java:1.5 Mon Jul 4 00:08:07 2005
+++ kaffe/libraries/javalib/javax/swing/AbstractAction.java Wed Jul 6 02:40:40 2005
@@ -48,7 +48,8 @@
import javax.swing.event.SwingPropertyChangeSupport;
/**
- * AbstractAction
+ * A base class for implementing the {@link Action} interface.
+ *
* @author Andrew Selkirk
* @version 1.0
*/
@@ -58,12 +59,12 @@
private static final long serialVersionUID = -6803159439231523484L;
/**
- * enabled
+ * A flag that indicates whether or not the action is enabled.
*/
protected boolean enabled = true;
/**
- * changeSupport
+ * Provides support for property change event notification.
*/
protected SwingPropertyChangeSupport changeSupport =
new SwingPropertyChangeSupport(this);
@@ -74,7 +75,8 @@
private transient HashMap store = new HashMap();
/**
- * Constructor AbstractAction
+ * Creates a new action with an empty string for the name. All other
+ * properties are initialised to <code>null</code>
*/
public AbstractAction()
{
@@ -82,9 +84,10 @@
}
/**
- * Constructor AbstractAction
+ * Creates a new action with the specified name. All other properties are
+ * initialised to <code>null</code>.
*
- * @param name TODO
+ * @param name the name (<code>null</code> permitted).
*/
public AbstractAction(String name)
{
@@ -92,10 +95,11 @@
}
/**
- * Constructor AbstractAction
+ * Creates a new action with the specified name and icon. All other
+ * properties are initialised to <code>null</code>.
*
- * @param name TODO
- * @param icon TODO
+ * @param name the name (<code>null</code> permitted).
+ * @param icon the icon (<code>null</code> permitted).
*/
public AbstractAction(String name, Icon icon)
{
@@ -144,11 +148,12 @@
}
/**
- * Returns a value for a given key from the built-in store.
- *
- * @param key the key to get the value for
- *
- * @return Object
+ * Returns the value associated with the specified key.
+ *
+ * @param key the key (not <code>null</code>).
+ *
+ * @return The value associated with the specified key, or
+ * <code>null</code> if the key is not found.
*/
public Object getValue(String key)
{
@@ -156,10 +161,16 @@
}
/**
- * Puts a key/value pair into the built-in store.
- *
- * @param key the key
- * @param value the value
+ * Sets the value associated with the specified key and sends a
+ * {@link java.beans.PropertyChangeEvent} to all registered listeners.
+ * The standard keys are: {@link #NAME}, {@link #SHORT_DESCRIPTION},
+ * {@link #LONG_DESCRIPTION}, {@link #SMALL_ICON},
+ * {@link #ACTION_COMMAND_KEY}, {@link #ACCELERATOR_KEY} and
+ * {@link #MNEMONIC_KEY}. Any existing value associated with the key will be
+ * overwritten.
+ *
+ * @param key the key (not <code>null</code>).
+ * @param value the value (<code>null</code> permitted).
*/
public void putValue(String key, Object value)
{
@@ -172,9 +183,9 @@
}
/**
- * isEnabled
+ * Returns the flag that indicates whether or not the action is enabled.
*
- * @return boolean
+ * @return The flag.
*/
public boolean isEnabled()
{
@@ -182,9 +193,11 @@
}
/**
- * setEnabled
+ * Sets the flag that indicates whether or not the action is enabled and, if
+ * the value of the flag changed from the previous setting, sends a
+ * {@link java.beans.PropertyChangeEvent} to all registered listeners.
*
- * @param enabled TODO
+ * @param enabled the new flag value.
*/
public void setEnabled(boolean enabled)
{
Index: kaffe/libraries/javalib/javax/swing/Action.java
diff -u kaffe/libraries/javalib/javax/swing/Action.java:1.3 kaffe/libraries/javalib/javax/swing/Action.java:1.4
--- kaffe/libraries/javalib/javax/swing/Action.java:1.3 Mon Jul 4 00:08:07 2005
+++ kaffe/libraries/javalib/javax/swing/Action.java Wed Jul 6 02:40:40 2005
@@ -1,5 +1,5 @@
/* Action.java --
- Copyright (C) 2002, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -41,99 +41,112 @@
import java.beans.PropertyChangeListener;
/**
- * Action
+ * An action provides a convenient central point of control for some task
+ * that can be triggered by more than one control in a Swing user interface
+ * (for example, a menu item and a toolbar button).
+ *
+ * @see AbstractButton#setAction(Action)
+ *
* @author Ronald Veldema (rveldema at cs.vu.nl)
* @author Andrew Selkirk
*/
public interface Action extends ActionListener {
/**
- * DEFAULT
+ * A key to access the default property for the action (this is not used).
*/
String DEFAULT = "Default";
- /**
- * LONG_DESCRIPTION
+ /**
+ * A key to access the long description for the action.
*/
String LONG_DESCRIPTION = "LongDescription";
/**
- * NAME
+ * A key to access the name for the action.
*/
String NAME = "Name";
/**
- * SHORT_DESCRIPTION
+ * A key to access the short description for the action (the short
+ * description is typically used as the tool tip text).
*/
String SHORT_DESCRIPTION = "ShortDescription";
/**
- * SMALL_ICON
+ * A key to access the icon for the action.
*/
String SMALL_ICON = "SmallIcon";
/**
- * ACCELERATOR_KEY
+ * A key to access the {@link KeyStroke} used as the accelerator for the
+ * action.
*/
String ACCELERATOR_KEY = "AcceleratorKey";
/**
- * ACTION_COMMAND_KEY
+ * A key to access the action command string for the action.
*/
String ACTION_COMMAND_KEY = "ActionCommandKey";
/**
- * MNEMONIC_KEY
+ * A key to access the mnemonic for the action.
*/
String MNEMONIC_KEY = "MnemonicKey";
- /**
- * getValue
+ /**
+ * Returns the value associated with the specified key.
+ *
+ * @param key the key (not <code>null</code>).
*
- * @param key
- * TODO
- * @returns TODO
+ * @return The value associated with the specified key, or
+ * <code>null</code> if the key is not found.
*/
Object getValue(String key);
/**
- * setValue
+ * Sets the value associated with the specified key and sends a
+ * {@link java.beans.PropertyChangeEvent} to all registered listeners.
+ * The standard keys are defined in this interface: {@link #NAME},
+ * {@link #SHORT_DESCRIPTION}, {@link #LONG_DESCRIPTION},
+ * {@link #SMALL_ICON}, {@link #ACTION_COMMAND_KEY},
+ * {@link #ACCELERATOR_KEY} and {@link #MNEMONIC_KEY}. Any existing value
+ * associated with the key will be overwritten.
*
- * @param key
- * TODO
- * @param value
- * TODO
+ * @param key the key (not <code>null</code>).
+ * @param value the value (<code>null</code> permitted).
*/
void putValue(String key, Object value);
/**
- * isEnabled
+ * Returns the flag that indicates whether or not this action is enabled.
*
- * @returns TODO
+ * @return The flag.
*/
boolean isEnabled();
/**
- * setEnabled
+ * Sets the flag that indicates whether or not this action is enabled. If
+ * the value changes, a {@link java.beans.PropertyChangeEvent} is sent to
+ * all registered listeners.
*
- * @param b
- * TODO
+ * @param b the new value of the flag.
*/
void setEnabled(boolean b);
/**
- * addPropertyChangeListener
+ * Registers a listener to receive notification whenever one of the
+ * action's properties is modified.
*
- * @param listener
- * TODO
+ * @param listener the listener.
*/
void addPropertyChangeListener(PropertyChangeListener listener);
/**
- * removePropertyChangeListener
+ * Deregisters a listener so that it no longer receives notification of
+ * changes to the action's properties.
*** Patch too long, truncated ***
More information about the kaffe
mailing list