[kaffe] CVS kaffe (robilad): resynced with gnu classpath: swing fixes

Kaffe CVS cvs-commits at kaffe.org
Sat May 21 08:18:26 PDT 2005


PatchSet 6564 
Date: 2005/05/21 15:13:35
Author: robilad
Branch: HEAD
Tag: (none) 
Log:
resynced with gnu classpath: swing fixes

Members: 
	ChangeLog:1.4091->1.4092 
	libraries/javalib/Makefile.am:1.355->1.356 
	libraries/javalib/Makefile.in:1.445->1.446 
	libraries/javalib/all.files:1.128->1.129 
	libraries/javalib/java/awt/Component.java:1.51->1.52 
	libraries/javalib/java/awt/DefaultKeyboardFocusManager.java:1.7->1.8 
	libraries/javalib/javax/swing/DefaultComboBoxModel.java:1.4->1.5 
	libraries/javalib/javax/swing/FocusManager.java:1.2->1.3 
	libraries/javalib/javax/swing/JEditorPane.java:1.7->1.8 
	libraries/javalib/javax/swing/JFileChooser.java:1.3->1.4 
	libraries/javalib/javax/swing/JProgressBar.java:1.3->1.4 
	libraries/javalib/javax/swing/JTextField.java:1.10->1.11 
	libraries/javalib/javax/swing/SizeRequirements.java:1.2->1.3 
	libraries/javalib/javax/swing/SwingUtilities.java:1.12->1.13 
	libraries/javalib/javax/swing/filechooser/FileSystemView.java:1.1->1.2 
	libraries/javalib/javax/swing/filechooser/UnixFileSystemView.java:INITIAL->1.1 
	libraries/javalib/javax/swing/plaf/basic/BasicComboBoxUI.java:1.6->1.7 
	libraries/javalib/javax/swing/plaf/basic/BasicDirectoryModel.java:INITIAL->1.1 
	libraries/javalib/javax/swing/plaf/basic/BasicFileChooserUI.java:INITIAL->1.1 
	libraries/javalib/javax/swing/plaf/basic/BasicInternalFrameTitlePane.java:1.5->1.6 
	libraries/javalib/javax/swing/plaf/basic/BasicLookAndFeel.java:1.11->1.12 
	libraries/javalib/javax/swing/plaf/basic/BasicProgressBarUI.java:1.5->1.6 
	libraries/javalib/javax/swing/plaf/metal/MetalComboBoxUI.java:1.1->1.2 
	libraries/javalib/javax/swing/text/DefaultCaret.java:1.4->1.5 
	libraries/javalib/javax/swing/text/JTextComponent.java:1.16->1.17 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.4091 kaffe/ChangeLog:1.4092
--- kaffe/ChangeLog:1.4091	Sat May 21 14:53:05 2005
+++ kaffe/ChangeLog	Sat May 21 15:13:35 2005
@@ -2,6 +2,138 @@
 
 	Resynced with GNU Classpath.
 
+	2005-05-20  Roman Kennke  <roman at kennke.org>
+
+        * java/awt/DefaultKeyboardFocusManager.java:
+        Documentation fixes.
+
+	2005-05-20  Roman Kennke  <roman at kennke.org>
+
+        * javax/swing/text/JTextComponent.java
+        (CaretBlinkTimer): Added inner class to make caret blinking.
+        (constructor): Create one instance of CaretBlinkTimer.
+        (setEditable): Switch caret on and off depending on the editable
+        property.
+        (setCare): Register caret with the CaretBlinkTimer.
+        * javax/swing/text/DefaultCaret.java:
+        Set a good blink rate of 500ms.
+
+	2005-05-20  Roman Kennke  <roman at kennke.org>
+
+        * javax/swing/JEditorPane.java:
+        (processComponentKeyEvent): Removed this method. This blocks
+        key events from beeing delivered and is not in the API.
+        (processKeyEvent): Removed this method. This blocks
+        key events from beeing delivered and is not in the API.
+
+	2005-05-20  Roman Kennke  <roman at kennke.org>
+
+        * java/awt/DefaultKeyboardFocusManager.java
+        (processKeyEvent): Properly swallow KEY_TYPED events after
+        a KEY_PRESSED event for a focusTraversalKey has been received.
+        Otherwise the focusTraversalKey (e.g. a TAB) would end up
+        beeing delivered to the focused component.
+
+	2005-05-20  Roman Kennke  <roman at kennke.org>
+
+        * java/awt/Component.java
+        (dispatchEventImpl): Let MouseEvents trigger a focus change
+        on lightweight components.
+
+	2005-05-20  Roman Kennke  <roman at kennke.org>
+
+        * javax/swing/JTextField.java
+        (constructor): Set default value for the horizontalAlignment
+        property.
+
+	2005-05-20  Roman Kennke  <roman at kennke.org>
+
+        * javax/swing/plaf/basic/BasicInternalFrameTitlePane.java
+        (setButtonIcons): Added checks for null references.
+
+	2005-05-20  Roman Kennke  <roman at kennke.org>
+
+        * javax/swing/JProgressBar.java
+        (paintBorder): Check if border is null before trying to paint it.
+        * javax/swing/plaf/basic/BasicProgressBarUI.java
+        (paint): Don't paint the border here. This would lead to the border
+        beeing painted twice.
+
+	2005-05-20  Roman Kennke  <roman at kennke.org>
+
+        * javax/swing/SwingUtilities.java
+        (convertPoint): Check for visibility of source and destination
+        before calling convertPointToScreen or convertPointFromScreen.
+
+	2005-05-20  Robert Schuster  <thebohemian at gmx.net>
+
+        * javax/swing/SizeRequirements.java: Removed two non-UTF8 chars.
+
+	2005-05-19  Roman Kennke  <roman at kennke.org>
+
+        * javax/swing/SizeRequirements.java
+        (constructors): Implemented.
+        (getTiledSizeRequirements): Implemented.
+        (calculateTiledPositions): Implemented.
+
+	2005-05-19  Roman Kennke  <roman at kennke.org>
+
+        * javax/swing/SizeRequirements.java:
+        Added API documentation for this class.
+
+	2005-05-19  Roman Kennke  <roman at kennke.org>
+
+        * javax/swing/SizeRequirements.java:
+        Reformatted file to meet our coding standards.
+
+	2005-05-19  Roman Kennke  <roman at kennke.org>
+
+        * javax/swing/SwingUtilities.java
+        (getUIInputMap): Return the InputMap that has been set by
+        the UI of the component, not the component's own InputMap.
+        (getUIActionMap): Return the ActionMap that has been set by
+        the UI of the component, not the component's own ActionMap.
+
+	2005-05-19  Roman Kennke  <roman at kennke.org>
+
+        * javax/swing/FocusManager.java:
+        Reformatted this file to match our coding standard.
+
+	2005-05-19  Roman Kennke  <roman at kennke.org>
+
+        * javax/swing/plaf/metal/BasicFileChooserUI.java:
+        (installComponents): Include parents ComboBox. This has been
+        commented out because ComboBox was broken (see previous entry).
+
+	2005-05-19  Roman Kennke  <roman at kennke.org>
+
+        * javax/swing/plaf/metal/MetalComboBoxUI.java
+        (createUI): Do not share instances of this UI class between
+        different JComboBoxes.
+
+	2005-05-19  Kim Ho  <kho at luxsci.net>
+
+        * javax/swing/DefaultComboBoxModel.java:
+        (addElement): Set index to be the element of the added item.
+        (removeAllElements): Clear before retrieving new size. Use
+        correct size.
+        * javax/swing/JFileChooser.java: Implemented.
+        * javax/swing/filechooser/FileSystemView.java: Implemented.
+        * javax/swing/filechooser/UnixFileSystemView.java: New file.
+        Implemented.
+        * javax/swing/plaf/basic/BasicComboBoxUI.java:
+        (intervalAdded): Set initial index to start.
+        * javax/swing/plaf/basic/BasicDirectoryModel.java: New file.
+        Implemented.
+        * javax/swing/plaf/basic/BasicFileChooserUI.java: New file.
+        Implemented.
+        * javax/swing/plaf/basic/BasicLookAndFeel.java: Add FileChooserUI.
+        Commented out GIF properties for FileChooser stuff.
+
+2005-05-21  Dalibor Topic  <robilad at kaffe.org>
+
+	Resynced with GNU Classpath.
+
 	2005-05-19  Michael Koch  <konqueror at gmx.de>
 
         * java/text/DateFormatSymbols.java
Index: kaffe/libraries/javalib/Makefile.am
diff -u kaffe/libraries/javalib/Makefile.am:1.355 kaffe/libraries/javalib/Makefile.am:1.356
--- kaffe/libraries/javalib/Makefile.am:1.355	Sat May 21 14:53:10 2005
+++ kaffe/libraries/javalib/Makefile.am	Sat May 21 15:13:36 2005
@@ -3690,7 +3690,8 @@
 javax_swing_filechooser_SRCS = \
 	javax/swing/filechooser/FileFilter.java \
 	javax/swing/filechooser/FileSystemView.java \
-	javax/swing/filechooser/FileView.java
+	javax/swing/filechooser/FileView.java \
+	javax/swing/filechooser/UnixFileSystemView.java
 javax_swing_plaf_SRCS = \
 	javax/swing/plaf/ActionMapUIResource.java \
 	javax/swing/plaf/BorderUIResource.java \
@@ -3747,7 +3748,9 @@
 	javax/swing/plaf/basic/BasicComboPopup.java \
 	javax/swing/plaf/basic/BasicDesktopIconUI.java \
 	javax/swing/plaf/basic/BasicDesktopPaneUI.java \
+	javax/swing/plaf/basic/BasicDirectoryModel.java \
 	javax/swing/plaf/basic/BasicEditorPaneUI.java \
+	javax/swing/plaf/basic/BasicFileChooserUI.java \
 	javax/swing/plaf/basic/BasicFormattedTextFieldUI.java \
 	javax/swing/plaf/basic/BasicGraphicsUtils.java \
 	javax/swing/plaf/basic/BasicIconFactory.java \
Index: kaffe/libraries/javalib/Makefile.in
diff -u kaffe/libraries/javalib/Makefile.in:1.445 kaffe/libraries/javalib/Makefile.in:1.446
--- kaffe/libraries/javalib/Makefile.in:1.445	Sat May 21 14:53:10 2005
+++ kaffe/libraries/javalib/Makefile.in	Sat May 21 15:13:37 2005
@@ -4261,7 +4261,8 @@
 javax_swing_filechooser_SRCS = \
 	javax/swing/filechooser/FileFilter.java \
 	javax/swing/filechooser/FileSystemView.java \
-	javax/swing/filechooser/FileView.java
+	javax/swing/filechooser/FileView.java \
+	javax/swing/filechooser/UnixFileSystemView.java
 
 javax_swing_plaf_SRCS = \
 	javax/swing/plaf/ActionMapUIResource.java \
@@ -4320,7 +4321,9 @@
 	javax/swing/plaf/basic/BasicComboPopup.java \
 	javax/swing/plaf/basic/BasicDesktopIconUI.java \
 	javax/swing/plaf/basic/BasicDesktopPaneUI.java \
+	javax/swing/plaf/basic/BasicDirectoryModel.java \
 	javax/swing/plaf/basic/BasicEditorPaneUI.java \
+	javax/swing/plaf/basic/BasicFileChooserUI.java \
 	javax/swing/plaf/basic/BasicFormattedTextFieldUI.java \
 	javax/swing/plaf/basic/BasicGraphicsUtils.java \
 	javax/swing/plaf/basic/BasicIconFactory.java \
Index: kaffe/libraries/javalib/all.files
diff -u kaffe/libraries/javalib/all.files:1.128 kaffe/libraries/javalib/all.files:1.129
--- kaffe/libraries/javalib/all.files:1.128	Sat May 21 14:53:11 2005
+++ kaffe/libraries/javalib/all.files	Sat May 21 15:13:38 2005
@@ -3031,6 +3031,7 @@
 javax/swing/filechooser/FileFilter.java
 javax/swing/filechooser/FileSystemView.java
 javax/swing/filechooser/FileView.java
+javax/swing/filechooser/UnixFileSystemView.java
 javax/swing/FocusManager.java
 javax/swing/GrayFilter.java
 javax/swing/Icon.java
@@ -3107,7 +3108,9 @@
 javax/swing/plaf/basic/BasicComboPopup.java
 javax/swing/plaf/basic/BasicDesktopIconUI.java
 javax/swing/plaf/basic/BasicDesktopPaneUI.java
+javax/swing/plaf/basic/BasicDirectoryModel.java
 javax/swing/plaf/basic/BasicEditorPaneUI.java
+javax/swing/plaf/basic/BasicFileChooserUI.java
 javax/swing/plaf/basic/BasicFormattedTextFieldUI.java
 javax/swing/plaf/basic/BasicGraphicsUtils.java
 javax/swing/plaf/basic/BasicIconFactory.java
Index: kaffe/libraries/javalib/java/awt/Component.java
diff -u kaffe/libraries/javalib/java/awt/Component.java:1.51 kaffe/libraries/javalib/java/awt/Component.java:1.52
--- kaffe/libraries/javalib/java/awt/Component.java:1.51	Thu May 19 00:31:17 2005
+++ kaffe/libraries/javalib/java/awt/Component.java	Sat May 21 15:13:38 2005
@@ -1149,7 +1149,9 @@
   public Point getLocationOnScreen()
   {
     if (! isShowing())
-      throw new IllegalComponentStateException("component not showing");
+      throw new IllegalComponentStateException("component "
+                                               + getClass().getName()
+                                               + " not showing");
     // We know peer != null here.
     return peer.getLocationOnScreen();
   }
@@ -4762,6 +4764,10 @@
                     .getCurrentKeyboardFocusManager()
                     .dispatchEvent(e))
                     return;
+              case MouseEvent.MOUSE_PRESSED:
+                if (isLightweight())
+                  requestFocus();
+                break;
               }
           }
         processEvent (e);
Index: kaffe/libraries/javalib/java/awt/DefaultKeyboardFocusManager.java
diff -u kaffe/libraries/javalib/java/awt/DefaultKeyboardFocusManager.java:1.7 kaffe/libraries/javalib/java/awt/DefaultKeyboardFocusManager.java:1.8
--- kaffe/libraries/javalib/java/awt/DefaultKeyboardFocusManager.java:1.7	Wed Nov 10 11:32:26 2004
+++ kaffe/libraries/javalib/java/awt/DefaultKeyboardFocusManager.java	Sat May 21 15:13:38 2005
@@ -140,6 +140,12 @@
     }
   }
 
+  /**
+   * This flag indicates for which focus traversal key release event we
+   * possibly wait, before letting any more KEY_TYPED events through.
+   */
+  private AWTKeyStroke waitForKeyStroke = null;
+
   /** The {@link java.util.SortedSet} of current {@link
       #EventDelayRequest}s. */
   private SortedSet delayRequests = new TreeSet ();
@@ -357,10 +363,33 @@
     // the other two key event types for the same key (e.g. if
     // KEY_PRESSED TAB is a focus traversal keystroke, we also need to
     // consume KEY_RELEASED and KEY_TYPED TAB key events).
+    // consuming KEY_RELEASED is easy, because their keyCodes matches
+    // the KEY_PRESSED event. Consuming the intermediate KEY_TYPED is
+    // very difficult because their is no clean way that we can know
+    // which KEY_TYPED belongs to a focusTraversalKey and which not.
+    // To address this problem we swallow every KEY_TYPE between the
+    // KEY_PRESSED event that matches a focusTraversalKey and the
+    // corresponding KEY_RELEASED.
     AWTKeyStroke oppositeKeystroke = AWTKeyStroke.getAWTKeyStroke (e.getKeyCode (),
                                                                    e.getModifiersEx (),
                                                                    !(e.id == KeyEvent.KEY_RELEASED));
 
+    // Here we check if we are currently waiting for a KEY_RELEASED and
+    // swallow all KeyEvents that are to be delivered in between. This
+    // should only be the KEY_TYPED events that correspond to the
+    // focusTraversalKey's KEY_PRESSED event
+    if (waitForKeyStroke != null)
+      {
+        if (eventKeystroke.equals(waitForKeyStroke))
+          // release this lock
+          waitForKeyStroke = null;
+
+        // as long as we are waiting for the KEY_RELEASED, we swallow every
+        // KeyEvent, including the KEY_RELEASED
+        e.consume();
+        return;
+      }
+
     Set forwardKeystrokes = comp.getFocusTraversalKeys (KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS);
     Set backwardKeystrokes = comp.getFocusTraversalKeys (KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS);
     Set upKeystrokes = comp.getFocusTraversalKeys (KeyboardFocusManager.UP_CYCLE_TRAVERSAL_KEYS);
@@ -370,31 +399,29 @@
 
     if (forwardKeystrokes.contains (eventKeystroke))
       {
+        waitForKeyStroke = oppositeKeystroke;        
         focusNextComponent (comp);
         e.consume ();
       }
     else if (backwardKeystrokes.contains (eventKeystroke))
       {
+        waitForKeyStroke = oppositeKeystroke;        
         focusPreviousComponent (comp);
         e.consume ();
       }
     else if (upKeystrokes.contains (eventKeystroke))
       {
+        waitForKeyStroke = oppositeKeystroke;        
         upFocusCycle (comp);
         e.consume ();
       }
     else if (comp instanceof Container
              && downKeystrokes.contains (eventKeystroke))
       {
+        waitForKeyStroke = oppositeKeystroke;        
         downFocusCycle ((Container) comp);
         e.consume ();
       }
-    else if (forwardKeystrokes.contains (oppositeKeystroke)
-             || backwardKeystrokes.contains (oppositeKeystroke)
-             || upKeystrokes.contains (oppositeKeystroke)
-             || (comp instanceof Container &&
-                 downKeystrokes.contains (oppositeKeystroke)))
-      e.consume ();
   }
 
   protected void enqueueKeyEvents (long after, Component untilFocused)
Index: kaffe/libraries/javalib/javax/swing/DefaultComboBoxModel.java
diff -u kaffe/libraries/javalib/javax/swing/DefaultComboBoxModel.java:1.4 kaffe/libraries/javalib/javax/swing/DefaultComboBoxModel.java:1.5
--- kaffe/libraries/javalib/javax/swing/DefaultComboBoxModel.java:1.4	Wed Jan  5 19:37:12 2005
+++ kaffe/libraries/javalib/javax/swing/DefaultComboBoxModel.java	Sat May 21 15:13:39 2005
@@ -108,7 +108,7 @@
   public void addElement(Object object)
   {
     list.add(object);
-    fireIntervalAdded(this, list.size(), list.size());
+    fireIntervalAdded(this, list.size() - 1, list.size());
   }
 
   /**
@@ -163,9 +163,9 @@
    */
   public void removeAllElements()
   {
-    int listSize = getSize();
     list.clear();
-    fireIntervalAdded(this, 0, listSize - 1);
+    int listSize = getSize();
+    fireIntervalAdded(this, 0, listSize);
   }
 
   /**
Index: kaffe/libraries/javalib/javax/swing/FocusManager.java
diff -u kaffe/libraries/javalib/javax/swing/FocusManager.java:1.2 kaffe/libraries/javalib/javax/swing/FocusManager.java:1.3
--- kaffe/libraries/javalib/javax/swing/FocusManager.java:1.2	Sun Oct 24 10:44:36 2004
+++ kaffe/libraries/javalib/javax/swing/FocusManager.java	Sat May 21 15:13:39 2005
@@ -47,140 +47,123 @@
  * @author	Andrew Selkirk
  * @version	1.0
  */
-public abstract class FocusManager extends DefaultKeyboardFocusManager
+public abstract class FocusManager
+  extends DefaultKeyboardFocusManager
 {
 
-	//-------------------------------------------------------------
-	// Classes ----------------------------------------------------
-	//-------------------------------------------------------------
-
-	/**
-	 * DisabledFocusManager
-	 */
-	static class DisabledFocusManager extends FocusManager {
-
-		//-------------------------------------------------------------
-		// Initialization ---------------------------------------------
-		//-------------------------------------------------------------
-
-		/**
-		 * Constructor DisabledFocusManager
-		 */
-		DisabledFocusManager() {
-			// TODO
-		} // DisabledFocusManager()
-
-
-		//-------------------------------------------------------------
-		// Methods ----------------------------------------------------
-		//-------------------------------------------------------------
-
-		/**
-		 * processKeyEvent
-		 * @param component TODO
-		 * @param event TODO
-		 */
-		public void processKeyEvent(Component component, KeyEvent event) {
-			// TODO
-		} // processKeyEvent()
-
-		/**
-		 * focusNextComponent
-		 * @param component TODO
-		 */
-		public void focusNextComponent(Component component) {
-			// TODO
-		} // focusNextComponent()
-
-		/**
-		 * focusPreviousComponent
-		 * @param value0 TODO
-		 */
-		public void focusPreviousComponent(Component value0) {
-			// TODO
-		} // focusPreviousComponent()
-
-
-	} // DisabledFocusManager
-
-
-	//-------------------------------------------------------------
-	// Variables --------------------------------------------------
-	//-------------------------------------------------------------
-
-	/**
-	 * FOCUS_MANAGER_CLASS_PROPERTY
-	 */
-	public static final String FOCUS_MANAGER_CLASS_PROPERTY = "FocusManagerClassName";
-
-
-	//-------------------------------------------------------------
-	// Initialization ---------------------------------------------
-	//-------------------------------------------------------------
-
-	/**
-	 * Constructor FocusManager
-	 */
-	public FocusManager() {
-		// TODO
-	} // FocusManager()
-
-
-	//-------------------------------------------------------------
-	// Methods ----------------------------------------------------
-	//-------------------------------------------------------------
-
-	/**
-	 * getCurrentManager
-	 * @returns FocusManager
-	 */
-	public static FocusManager getCurrentManager() {
-		return null; // TODO
-	} // getCurrentManager()
-
-	/**
-	 * setCurrentManager
-	 * @param manager TODO
-	 */
-	public static void setCurrentManager(FocusManager manager) {
-		// TODO
-	} // setCurrentManager()
-
-	/**
-	 * disableSwingFocusManager
-	 * @deprecated 1.4
-	 */
-	public static void disableSwingFocusManager() {
-		// TODO
-	} // disableSwingFocusManager()
-
-	/**
-	 * isFocusManagerEnabled
-	 * @return boolean
-	 * @deprecated 1.4
-	 */
-	public static boolean isFocusManagerEnabled() {
-		return false; // TODO
-	} // isFocusManagerEnabled()
-
-	/**
-	 * processKeyEvent
-	 * @param component TODO
-	 * @param event TODO
-	 */
-	public abstract void processKeyEvent(Component component, KeyEvent event);
-
-	/**
-	 * focusNextComponent
-	 * @param component TODO
-	 */
-	public abstract void focusNextComponent(Component component);
-
-	/**
-	 * focusPreviousComponent
-	 * @param component TODO
-	 */
-	public abstract void focusPreviousComponent(Component component);
+  /**
+   * DisabledFocusManager
+   */
+  static class DisabledFocusManager
+    extends FocusManager
+  {
+
+    /**
+     * Constructor DisabledFocusManager
+     */
+    DisabledFocusManager()
+    {
+      // TODO
+    }
+
+    /**
+     * processKeyEvent
+     * @param component TODO
+     * @param event TODO
+     */
+    public void processKeyEvent(Component component, KeyEvent event)
+    {
+      // TODO
+    }
+
+    /**
+     * focusNextComponent
+     * @param component TODO
+     */
+    public void focusNextComponent(Component component)
+    {
+      // TODO
+    }
+
+    /**
+     * focusPreviousComponent
+     * @param value0 TODO
+     */
+    public void focusPreviousComponent(Component value0)
+    {
+      // TODO
+    }
+  }
+
+
+  /**
+   * FOCUS_MANAGER_CLASS_PROPERTY
+   */
+  public static final String FOCUS_MANAGER_CLASS_PROPERTY =
+    "FocusManagerClassName";
+
+  /**
+   * Constructor FocusManager
+   */
+  public FocusManager()
+  {
+    // TODO
+  }
+
+  /**
+   * getCurrentManager
+   * @returns FocusManager
+   */
+  public static FocusManager getCurrentManager()
+  {
+    return null; // TODO
+  }
+
+  /**
+   * setCurrentManager
+   * @param manager TODO
+   */
+  public static void setCurrentManager(FocusManager manager)
+  {
+    // TODO
+  }
+
+  /**
+   * disableSwingFocusManager
+   * @deprecated 1.4
+   */
+  public static void disableSwingFocusManager()
+  {
+    // TODO
+  }
+
+  /**
+   * isFocusManagerEnabled
+   * @return boolean
+   * @deprecated 1.4
+   */
+  public static boolean isFocusManagerEnabled()
+  {
+    return false; // TODO
+  }
+
+  /**
+   * processKeyEvent
+   * @param component TODO
+   * @param event TODO
+   */
+  public abstract void processKeyEvent(Component component, KeyEvent event);
+
+  /**
+   * focusNextComponent
+   * @param component TODO
+   */
+  public abstract void focusNextComponent(Component component);
+
+  /**
+   * focusPreviousComponent
+   * @param component TODO
+   */
+  public abstract void focusPreviousComponent(Component component);
 
-
-} // FocusManager
+}
Index: kaffe/libraries/javalib/javax/swing/JEditorPane.java
diff -u kaffe/libraries/javalib/javax/swing/JEditorPane.java:1.7 kaffe/libraries/javalib/javax/swing/JEditorPane.java:1.8
--- kaffe/libraries/javalib/javax/swing/JEditorPane.java:1.7	Thu May 19 00:31:21 2005
+++ kaffe/libraries/javalib/javax/swing/JEditorPane.java	Sat May 21 15:13:39 2005
@@ -182,21 +182,6 @@
   }
 
   /**
-   * Overridden to handle processing of tab/shift tab. 
-   */
-  protected void processComponentKeyEvent(KeyEvent e)
-  {
-  }
-
-  /**
-   * Make sure that TAB and Shift-TAB events get consumed,
-   * so that awt doesn't attempt focus traversal.  
-   */
-  protected void processKeyEvent(KeyEvent e)
-  {
-  }
-
-  /**
    * This method initializes from a stream. 
    */
   public void read(InputStream in, Object desc)
Index: kaffe/libraries/javalib/javax/swing/JFileChooser.java
diff -u kaffe/libraries/javalib/javax/swing/JFileChooser.java:1.3 kaffe/libraries/javalib/javax/swing/JFileChooser.java:1.4
--- kaffe/libraries/javalib/javax/swing/JFileChooser.java:1.3	Thu Dec 23 02:13:08 2004
+++ kaffe/libraries/javalib/javax/swing/JFileChooser.java	Sat May 21 15:13:39 2005
@@ -1,5 +1,5 @@
 /* JFileChooser.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.
 
@@ -35,925 +35,1120 @@
 obligated to do so.  If you do not wish to do so, delete this
 exception statement from your version. */
 
-
 package javax.swing;
 
 import java.awt.Component;
+import java.awt.Frame;
+import java.awt.HeadlessException;
+import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
 import java.io.File;
-import java.io.IOException;
-import java.io.ObjectOutputStream;
-import java.util.Vector;
-
+import java.util.ArrayList;
 import javax.accessibility.Accessible;
 import javax.accessibility.AccessibleContext;
-import javax.accessibility.AccessibleRole;
+import javax.swing.JDialog;
 import javax.swing.filechooser.FileFilter;
 import javax.swing.filechooser.FileSystemView;
 import javax.swing.filechooser.FileView;
 import javax.swing.plaf.FileChooserUI;
 
+
 /**
- * JFileChooser
- * @author	Andrew Selkirk
- * @version	1.0
+ * DOCUMENT ME!
  */
-public class JFileChooser extends JComponent implements Accessible {
+public class JFileChooser extends JComponent implements Accessible
+{
+  /** DOCUMENT ME! */
+  public static final int OPEN_DIALOG = 0;
+
+  /** DOCUMENT ME! */
+  public static final int SAVE_DIALOG = 1;
+
+  /** DOCUMENT ME! */
+  public static final int CUSTOM_DIALOG = 2;
+
+  /** DOCUMENT ME! */
+  public static final int CANCEL_OPTION = 1;
+
+  /** DOCUMENT ME! */
+  public static final int APPROVE_OPTION = 0;
+
+  /** DOCUMENT ME! */
+  public static final int ERROR_OPTION = -1;
+
+  /** DOCUMENT ME! */
+  public static final int FILES_ONLY = 0;
+
+  /** DOCUMENT ME! */
+  public static final int DIRECTORIES_ONLY = 1;
+
+  /** DOCUMENT ME! */
+  public static final int FILES_AND_DIRECTORIES = 2;
+
+  /** DOCUMENT ME! */
+  public static final String CANCEL_SELECTION = "CancelSelection";
+
+  /** DOCUMENT ME! */
+  public static final String APPROVE_SELECTION = "ApproveSelection";
+
+  /** DOCUMENT ME! */
+  public static final String APPROVE_BUTTON_TEXT_CHANGED_PROPERTY = "approvebuttonText";
+
+  /** DOCUMENT ME! */
+  public static final String APPROVE_BUTTON_TOOL_TIP_TEXT_CHANGED_PROPERTY = "approveButtonToolTipText";
+
+  /** DOCUMENT ME! */
+  public static final String APPROVE_BUTTON_MNEMONIC_CHANGED_PROPERTY = "approveButtonMnemonic";
+
+  /** DOCUMENT ME! */
+  public static final String CONTROL_BUTTONS_ARE_SHOWN_CHANGED_PROPERTY = "controlButtonsAreShown";
+
+  /** DOCUMENT ME! */
+  public static final String DIRECTORY_CHANGED_PROPERTY = "directory";
+
+  /** DOCUMENT ME! */
+  public static final String SELECTED_FILE_CHANGED_PROPERTY = "SelectedFileChangedProperty";
+
+  /** DOCUMENT ME! */
+  public static final String SELECTED_FILES_CHANGED_PROPERTY = "selectedFiles";
+
+  /** DOCUMENT ME! */
+  public static final String MULTI_SELECTION_ENABLED_CHANGED_PROPERTY = "multiSelectionEnabled";
+
+  /** DOCUMENT ME! */
+  public static final String FILE_SYSTEM_VIEW_CHANGED_PROPERTY = "fileSystemView";
+
+  /** DOCUMENT ME! */
+  public static final String FILE_VIEW_CHANGED_PROPERTY = "fileView";
+
+  /** DOCUMENT ME! */
+  public static final String FILE_HIDING_CHANGED_PROPERTY = "fileHidingEnabled";
+
+  /** DOCUMENT ME! */
+  public static final String FILE_FILTER_CHANGED_PROPERTY = "fileFilter";
+
+  /** DOCUMENT ME! */
+  public static final String FILE_SELECTION_MODE_CHANGED_PROPERTY = "fileSelectionMode";
+
+  /** DOCUMENT ME! */
+  public static final String ACCESSORY_CHANGED_PROPERTY = "accessory";
 
-  private static final long serialVersionUID = 3162921138695327837L;
+  /** DOCUMENT ME! */
+  public static final String ACCEPT_ALL_FILE_FILTER_USED_CHANGED_PROPERTY = "acceptAllFileFilter";
+
+  /** DOCUMENT ME! */
+  public static final String DIALOG_TITLE_CHANGED_PROPERTY = "dialogTitle";
+
+  /** DOCUMENT ME! */
+  public static final String DIALOG_TYPE_CHANGED_PROPERTY = "dialogType";
+
+  /** DOCUMENT ME! */
+  public static final String CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY = "choosableFileFilter";
+
+  /** DOCUMENT ME! */
+  protected AccessibleContext accessibleContext;
+
+  /** DOCUMENT ME! */
+  private FileSystemView fsv;
+
+  /** DOCUMENT ME! */
+  private JComponent accessory;
+
+  /** DOCUMENT ME! */
+  private int approveButtonMnemonic = 0;
+
+  /** DOCUMENT ME! */
+  private String approveButtonText;
+
+  /** DOCUMENT ME! */
+  private String approveButtonToolTipText;
+
+  /** DOCUMENT ME! */
+  private ArrayList choosableFilters = new ArrayList();
+
+  /** DOCUMENT ME! */
+  private boolean isAcceptAll = true;
+
+  /** DOCUMENT ME! */
+  private String dialogTitle;
+
+  /** DOCUMENT ME! */
+  private int dialogType = OPEN_DIALOG;
+
+  /** DOCUMENT ME! */
+  private int retval = ERROR_OPTION;
+
+  /** DOCUMENT ME! */
+  private boolean multiSelection = false;
+
+  /** DOCUMENT ME! */
+  private boolean fileHiding = true;
+
+  /** DOCUMENT ME! */
+  private int fileSelectionMode = FILES_AND_DIRECTORIES;
+
+  /** DOCUMENT ME! */
+  private FileView fv = null;
+
+  /** DOCUMENT ME! */
+  private boolean controlButtonsShown = true;
+
+  /** DOCUMENT ME! */
+  private File currentDir = null;
+
+  /** DOCUMENT ME! */
+  private FileFilter currentFilter = null;
+
+  /** DOCUMENT ME! */
+  private File[] selectedFiles;
+
+  /** DOCUMENT ME! */
+  private File selectedFile;
 
   /**
-   * AccessibleJFileChooser
+   * Creates a new JFileChooser object.
    */
-  protected class AccessibleJFileChooser extends AccessibleJComponent
+  public JFileChooser()
   {
-    private static final long serialVersionUID = 8205148454060169244L;
-
-    /**
-     * Constructor AccessibleJFileChooser
-     * @param component TODO
-     */
-    protected AccessibleJFileChooser()
-    {
-    }
-
-    /**
-     * getAccessibleRole
-     * @return AccessibleRole
-     */
-    public AccessibleRole getAccessibleRole()
-    {
-      return AccessibleRole.FILE_CHOOSER;
-    }
-  }
-
-	/**
-	 * uiClassID
-	 */
-	private static final String uiClassID = "FileChooserUI";
-
-	/**
-	 * OPEN_DIALOG
-	 */
-	public static final int OPEN_DIALOG = 0;
-
-	/**
-	 * SAVE_DIALOG
-	 */
-	public static final int SAVE_DIALOG = 1;
-
-	/**
-	 * CUSTOM_DIALOG
-	 */
-	public static final int CUSTOM_DIALOG = 2;
-
-	/**
-	 * CANCEL_OPTION
-	 */
-	public static final int CANCEL_OPTION = 1;
-
-	/**
-	 * APPROVE_OPTION
-	 */
-	public static final int APPROVE_OPTION = 0;
-
-	/**
-	 * ERROR_OPTION
-	 */
-	public static final int ERROR_OPTION = -1;
-
-	/**
-	 * FILES_ONLY
-	 */
-	public static final int FILES_ONLY = 0;
-
-	/**
-	 * DIRECTORIES_ONLY
-	 */
-	public static final int DIRECTORIES_ONLY = 1;
-
-	/**
-	 * FILES_AND_DIRECTORIES
-	 */
-	public static final int FILES_AND_DIRECTORIES = 2;
-
-	/**
-	 * CANCEL_SELECTION
-	 */
-	public static final String CANCEL_SELECTION = "CancelSelection";
-
-	/**
-	 * APPROVE_SELECTION
-	 */
-	public static final String APPROVE_SELECTION = "ApproveSelection";
-
-	/**
-	 * APPROVE_BUTTON_TEXT_CHANGED_PROPERTY
-	 */
-	public static final String APPROVE_BUTTON_TEXT_CHANGED_PROPERTY = "ApproveButtonTextChangedProperty";
-
-	/**
-	 * APPROVE_BUTTON_TOOL_TIP_TEXT_CHANGED_PROPERTY
-	 */
-	public static final String APPROVE_BUTTON_TOOL_TIP_TEXT_CHANGED_PROPERTY = "ApproveButtonToolTipTextChangedProperty";
-
-	/**
-	 * APPROVE_BUTTON_MNEMONIC_CHANGED_PROPERTY
-	 */
-	public static final String APPROVE_BUTTON_MNEMONIC_CHANGED_PROPERTY = "ApproveButtonMnemonicChangedProperty";
-
-	/**
-	 * CONTROL_BUTTONS_ARE_SHOWN_CHANGED_PROPERTY
-	 */
-	public static final String CONTROL_BUTTONS_ARE_SHOWN_CHANGED_PROPERTY = "ControlButtonsAreShownChangedProperty";
-
-	/**
-	 * DIRECTORY_CHANGED_PROPERTY
-	 */
-	public static final String DIRECTORY_CHANGED_PROPERTY = "directoryChanged";
-
-	/**
-	 * SELECTED_FILE_CHANGED_PROPERTY
-	 */
-	public static final String SELECTED_FILE_CHANGED_PROPERTY = "SelectedFileChangedProperty";
-
-	/**
-	 * SELECTED_FILES_CHANGED_PROPERTY
-	 */
-	public static final String SELECTED_FILES_CHANGED_PROPERTY = "SelectedFilesChangedProperty";
-
-	/**
-	 * MULTI_SELECTION_ENABLED_CHANGED_PROPERTY
-	 */
-	public static final String MULTI_SELECTION_ENABLED_CHANGED_PROPERTY = "MultiSelectionEnabledChangedProperty";
-
-	/**
-	 * FILE_SYSTEM_VIEW_CHANGED_PROPERTY
-	 */

*** Patch too long, truncated ***




More information about the kaffe mailing list