Makefile.in: Rebuilt.
authorTom Tromey <tromey@redhat.com>
Sun, 22 Apr 2001 03:05:39 +0000 (03:05 +0000)
committerTom Tromey <tromey@gcc.gnu.org>
Sun, 22 Apr 2001 03:05:39 +0000 (03:05 +0000)
* Makefile.in: Rebuilt.
* Makefile.am (awt_java_source_files): Added Line2D.java.
* java/awt/geom/Line2D.java: Wrote.

* java/awt/Menu.java (addNotify): Wrote.

* java/awt/PopupMenu.java (addNotify): Implemented.
(show): Likewise.

* java/awt/Scrollbar.java (addNotify): Call super.addNotify.
* java/awt/List.java (addNotify): Call super.addNotify.
* java/awt/Label.java (addNotify): Call super.addNotify.
* java/awt/FileDialog.java (addNotify): Call super.addNotify.
* java/awt/Dialog.java (addNotify): Call super.addNotify.
* java/awt/Choice.java (addNotify): Call super.addNotify.
* java/awt/CheckboxMenuItem.java (addNotify): Call super.addNotify.
* java/awt/Checkbox.java (addNotify): Call super.addNotify.

* java/awt/List.java (replaceItem): Notify peer.

* java/awt/geom/Rectangle2D.java
(Float.setRect(float,float,float,float)): New method.

* java/awt/event/ContainerEvent.java (getContainer): Now returns
Container.

* java/awt/RenderingHints.java (Key): Class now public.

* java/awt/Rectangle.java (Rectangle): Now implements
Serializable.
(getPathIterator): Removed.

* java/awt/GraphicsConfiguration.java (GraphicsConfiguration): New
constructor.

* java/awt/FileDialog.java: Wrote.

* java/awt/EventQueue.java (isDispatchThread): Now public.
(invokeLater): Likewise.

* java/awt/Component.java (setCursor): Update peer.
(getFontMetrics): Use peer.

* java/awt/ComponentOrientation.java (ComponentOrientation): Class
now final.

From-SVN: r41489

24 files changed:
libjava/ChangeLog
libjava/Makefile.am
libjava/Makefile.in
libjava/java/awt/Checkbox.java
libjava/java/awt/CheckboxMenuItem.java
libjava/java/awt/Choice.java
libjava/java/awt/Component.java
libjava/java/awt/ComponentOrientation.java
libjava/java/awt/Dialog.java
libjava/java/awt/EventQueue.java
libjava/java/awt/FileDialog.java
libjava/java/awt/GraphicsConfiguration.java
libjava/java/awt/Label.java
libjava/java/awt/List.java
libjava/java/awt/Menu.java
libjava/java/awt/MenuBar.java
libjava/java/awt/MenuItem.java
libjava/java/awt/PopupMenu.java
libjava/java/awt/Rectangle.java
libjava/java/awt/RenderingHints.java
libjava/java/awt/Scrollbar.java
libjava/java/awt/TextComponent.java
libjava/java/awt/event/ContainerEvent.java
libjava/java/awt/geom/Rectangle2D.java

index 2a91fb4489f47796f5f7d80fb6eccee3a64f8e61..63e3851580aedc00b23294c9b51760b459e38f28 100644 (file)
@@ -1,3 +1,51 @@
+2001-04-21  Tom Tromey  <tromey@redhat.com>
+
+       * Makefile.in: Rebuilt.
+       * Makefile.am (awt_java_source_files): Added Line2D.java.
+       * java/awt/geom/Line2D.java: Wrote.
+
+       * java/awt/Menu.java (addNotify): Wrote.
+
+       * java/awt/PopupMenu.java (addNotify): Implemented.
+       (show): Likewise.
+
+       * java/awt/Scrollbar.java (addNotify): Call super.addNotify.
+       * java/awt/List.java (addNotify): Call super.addNotify.
+       * java/awt/Label.java (addNotify): Call super.addNotify.
+       * java/awt/FileDialog.java (addNotify): Call super.addNotify.
+       * java/awt/Dialog.java (addNotify): Call super.addNotify.
+       * java/awt/Choice.java (addNotify): Call super.addNotify.
+       * java/awt/CheckboxMenuItem.java (addNotify): Call super.addNotify.
+       * java/awt/Checkbox.java (addNotify): Call super.addNotify.
+
+       * java/awt/List.java (replaceItem): Notify peer.
+
+       * java/awt/geom/Rectangle2D.java
+       (Float.setRect(float,float,float,float)): New method.
+
+       * java/awt/event/ContainerEvent.java (getContainer): Now returns
+       Container.
+
+       * java/awt/RenderingHints.java (Key): Class now public.
+
+       * java/awt/Rectangle.java (Rectangle): Now implements
+       Serializable.
+       (getPathIterator): Removed.
+
+       * java/awt/GraphicsConfiguration.java (GraphicsConfiguration): New
+       constructor.
+
+       * java/awt/FileDialog.java: Wrote.
+
+       * java/awt/EventQueue.java (isDispatchThread): Now public.
+       (invokeLater): Likewise.
+
+       * java/awt/Component.java (setCursor): Update peer.
+       (getFontMetrics): Use peer.
+
+       * java/awt/ComponentOrientation.java (ComponentOrientation): Class
+       now final.
+
 2001-04-20  Tom Tromey  <tromey@redhat.com>
 
        * java/awt/List.java: Wrote.
index c6d7ca28b110c8fd16dab31cfd5321c5a4efb9dc..e07b11625ab9a5575d7893692e19881ed81fd089 100644 (file)
@@ -694,6 +694,7 @@ java/awt/geom/AffineTransform.java \
 java/awt/geom/Dimension2D.java \
 java/awt/geom/Ellipse2D.java \
 java/awt/geom/IllegalPathStateException.java \
+java/awt/geom/Line2D.java \
 java/awt/geom/NoninvertibleTransformException.java \
 java/awt/geom/PathIterator.java        \
 java/awt/geom/Point2D.java \
index 5f237d81e7ce23a6bd108af3061505a130bf24f2..2dcc77769f216f8326c626aaff0612a6158ab3d8 100644 (file)
@@ -119,29 +119,43 @@ here = @here@
 libgcj_basedir = @libgcj_basedir@
 
 AUTOMAKE_OPTIONS = foreign
-@TESTSUBDIR_TRUE@SUBDIRS = @TESTSUBDIR_TRUE@$(DIRLTDL) testsuite gcj include
-@TESTSUBDIR_FALSE@SUBDIRS = @TESTSUBDIR_FALSE@$(DIRLTDL) gcj include
-@USE_LIBDIR_TRUE@toolexeclibdir = @USE_LIBDIR_TRUE@$(libdir)$(MULTISUBDIR)
-@USE_LIBDIR_FALSE@toolexeclibdir = @USE_LIBDIR_FALSE@$(toolexecdir)/lib$(MULTISUBDIR)
-@USE_LIBDIR_FALSE@toolexecdir = @USE_LIBDIR_FALSE@$(exec_prefix)/$(target_alias)
-@XLIB_AWT_TRUE@cond_x_ltlibrary = @XLIB_AWT_TRUE@libgcjx.la
-@XLIB_AWT_FALSE@cond_x_ltlibrary = 
+@TESTSUBDIR_TRUE@SUBDIRS = \
+@TESTSUBDIR_TRUE@$(DIRLTDL) testsuite gcj include
+@TESTSUBDIR_FALSE@SUBDIRS = \
+@TESTSUBDIR_FALSE@$(DIRLTDL) gcj include
+@USE_LIBDIR_TRUE@toolexeclibdir = \
+@USE_LIBDIR_TRUE@$(libdir)$(MULTISUBDIR)
+@USE_LIBDIR_FALSE@toolexeclibdir = \
+@USE_LIBDIR_FALSE@$(toolexecdir)/lib$(MULTISUBDIR)
+@USE_LIBDIR_FALSE@toolexecdir = \
+@USE_LIBDIR_FALSE@$(exec_prefix)/$(target_alias)
+@XLIB_AWT_TRUE@cond_x_ltlibrary = \
+@XLIB_AWT_TRUE@libgcjx.la
+@XLIB_AWT_FALSE@cond_x_ltlibrary = \
 
 toolexeclib_LTLIBRARIES = libgcj.la $(cond_x_ltlibrary)
 toolexeclib_DATA = libgcj.spec
 data_DATA = libgcj.jar
 
-@NEEDS_DATA_START_TRUE@toolexeclib_LIBRARIES = @NEEDS_DATA_START_TRUE@libgcjdata.a
-@NEEDS_DATA_START_TRUE@libgcjdata_a_SOURCES = @NEEDS_DATA_START_TRUE@libgcjdata.c
+@NEEDS_DATA_START_TRUE@toolexeclib_LIBRARIES = \
+@NEEDS_DATA_START_TRUE@libgcjdata.a
+@NEEDS_DATA_START_TRUE@libgcjdata_a_SOURCES = \
+@NEEDS_DATA_START_TRUE@libgcjdata.c
 
-@NATIVE_TRUE@bin_PROGRAMS = @NATIVE_TRUE@jv-convert gij
+@NATIVE_TRUE@bin_PROGRAMS = \
+@NATIVE_TRUE@jv-convert gij
 
 bin_SCRIPTS = addr2name.awk
-@CANADIAN_TRUE@@NULL_TARGET_TRUE@ZIP = @CANADIAN_TRUE@@NULL_TARGET_TRUE@$(MULTIBUILDTOP)../$(COMPPATH)/fastjar/fastjar$(EXEEXT)
-@CANADIAN_TRUE@@NULL_TARGET_FALSE@ZIP = @CANADIAN_TRUE@@NULL_TARGET_FALSE@fastjar
-@CANADIAN_FALSE@ZIP = @CANADIAN_FALSE@$(MULTIBUILDTOP)../$(COMPPATH)/fastjar/fastjar$(EXEEXT)
-@CANADIAN_TRUE@GCJH = @CANADIAN_TRUE@gcjh
-@CANADIAN_FALSE@GCJH = @CANADIAN_FALSE@$(MULTIBUILDTOP)../$(COMPPATH)/gcc/gcjh$(EXEEXT)
+@CANADIAN_TRUE@@NULL_TARGET_TRUE@ZIP = \
+@CANADIAN_TRUE@@NULL_TARGET_TRUE@$(MULTIBUILDTOP)../$(COMPPATH)/fastjar/fastjar$(EXEEXT)
+@CANADIAN_TRUE@@NULL_TARGET_FALSE@ZIP = \
+@CANADIAN_TRUE@@NULL_TARGET_FALSE@fastjar
+@CANADIAN_FALSE@ZIP = \
+@CANADIAN_FALSE@$(MULTIBUILDTOP)../$(COMPPATH)/fastjar/fastjar$(EXEEXT)
+@CANADIAN_TRUE@GCJH = \
+@CANADIAN_TRUE@gcjh
+@CANADIAN_FALSE@GCJH = \
+@CANADIAN_FALSE@$(MULTIBUILDTOP)../$(COMPPATH)/gcc/gcjh$(EXEEXT)
 
 GCJ_WITH_FLAGS = $(GCJ) --encoding=UTF-8
 
@@ -160,8 +174,10 @@ AM_CXXFLAGS = -fno-rtti -fvtable-thunks -fnon-call-exceptions \
        -fdollars-in-identifiers \
        @LIBGCJ_CXXFLAGS@ @X_CFLAGS@ $(WARNINGS) -D_GNU_SOURCE
 
-@USING_GCC_TRUE@AM_CFLAGS = @USING_GCC_TRUE@@LIBGCJ_CFLAGS@ $(WARNINGS)
-@USING_GCC_FALSE@AM_CFLAGS = @USING_GCC_FALSE@@LIBGCJ_CFLAGS@
+@USING_GCC_TRUE@AM_CFLAGS = \
+@USING_GCC_TRUE@@LIBGCJ_CFLAGS@ $(WARNINGS)
+@USING_GCC_FALSE@AM_CFLAGS = \
+@USING_GCC_FALSE@@LIBGCJ_CFLAGS@
 
 JCFLAGS = -g
 JC1FLAGS = @LIBGCJ_JAVAFLAGS@ $(GCJFLAGS)
@@ -229,7 +245,8 @@ extra_headers = java/lang/Object.h java/lang/Class.h
 
 NM = nm
 
-@NATIVE_TRUE@@MAINTAINER_MODE_TRUE@noinst_PROGRAMS = @NATIVE_TRUE@@MAINTAINER_MODE_TRUE@gen-from-JIS
+@NATIVE_TRUE@@MAINTAINER_MODE_TRUE@noinst_PROGRAMS = \
+@NATIVE_TRUE@@MAINTAINER_MODE_TRUE@gen-from-JIS
 
 CONVERT_DIR = gnu/gcj/convert
 
@@ -429,6 +446,7 @@ java/awt/geom/AffineTransform.java \
 java/awt/geom/Dimension2D.java \
 java/awt/geom/Ellipse2D.java \
 java/awt/geom/IllegalPathStateException.java \
+java/awt/geom/Line2D.java \
 java/awt/geom/NoninvertibleTransformException.java \
 java/awt/geom/PathIterator.java        \
 java/awt/geom/Point2D.java \
@@ -1194,7 +1212,7 @@ libgcj-test.spec.in libgcj.spec.in
 
 DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
 
-TAR = gtar
+TAR = tar
 GZIP_ENV = --best
 DIST_SUBDIRS =  @DIRLTDL@ testsuite gcj include @DIRLTDL@ gcj include
 DEP_FILES =  .deps/$(srcdir)/$(CONVERT_DIR)/gen-from-JIS.P \
@@ -1378,6 +1396,7 @@ DEP_FILES =  .deps/$(srcdir)/$(CONVERT_DIR)/gen-from-JIS.P \
 .deps/java/awt/geom/AffineTransform.P .deps/java/awt/geom/Dimension2D.P \
 .deps/java/awt/geom/Ellipse2D.P \
 .deps/java/awt/geom/IllegalPathStateException.P \
+.deps/java/awt/geom/Line2D.P \
 .deps/java/awt/geom/NoninvertibleTransformException.P \
 .deps/java/awt/geom/PathIterator.P .deps/java/awt/geom/Point2D.P \
 .deps/java/awt/geom/Rectangle2D.P \
@@ -2092,7 +2111,7 @@ distdir: $(DISTFILES)
        @for file in $(DISTFILES); do \
          d=$(srcdir); \
          if test -d $$d/$$file; then \
-           cp -pr $$d/$$file $(distdir)/$$file; \
+           cp -pr $$/$$file $(distdir)/$$file; \
          else \
            test -f $(distdir)/$$file \
            || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
index 10c6744376ccb6eabf493b8b387b656f579d48dd..82ced6412f6ed259718856e138d05f6600e320a9 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000  Free Software Foundation
+/* Copyright (C) 2000, 2001  Free Software Foundation
 
    This file is part of libgcj.
 
@@ -63,6 +63,7 @@ public class Checkbox extends Component implements ItemSelectable
   {
     if (peer == null)
       peer = getToolkit ().createCheckbox (this);
+    super.addNotify ();
   }
 
   /** Returns the current CheckboxGroup associated with this
index 83941a782643c4ec7990fd96c40e5f746fb78420..007d3dc4e2a6826a0d47460601b7ad87612475d4 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000  Free Software Foundation
+/* Copyright (C) 2000, 2001  Free Software Foundation
 
    This file is part of libgcj.
 
@@ -55,6 +55,7 @@ public class CheckboxMenuItem extends MenuItem implements ItemSelectable
        // what else to do.
        peer = Toolkit.getDefaultToolkit ().createCheckboxMenuItem (this);
       }
+    super.addNotify ();
   }
 
   /** Returns this checkbox's label if this checkbox is selected.  */
index 3e30ead4e3577711fd815aa1e4b1b467423e48df..6b9a112ecb8144bac1d77997240cfd2503cd3705 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000  Free Software Foundation
+/* Copyright (C) 2000, 2001  Free Software Foundation
 
    This file is part of libgcj.
 
@@ -66,6 +66,7 @@ public class Choice extends Component implements ItemSelectable
   {
     if (peer == null)
       peer = getToolkit ().createChoice (this);
+    super.addNotify ();
   }
 
   /** Returns number of items.
index 6bca20d4c32c3825f6f91abff4c4da4742b9b189..0feb69451aab9d40e0aebbda16acdd70e30007ec 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2000  Free Software Foundation
+/* Copyright (C) 1999, 2000, 2001  Free Software Foundation
 
    This file is part of libgcj.
 
@@ -649,14 +649,18 @@ public abstract class Component implements ImageObserver, MenuContainer,
   
   public FontMetrics getFontMetrics(Font font)
   {
-    return getToolkit().getFontMetrics(font);
+    if (peer == null)
+      return getToolkit().getFontMetrics(font);
+    return peer.getFontMetrics (font);
   }
-  
+
   public void setCursor(Cursor cursor)
   {
     this.cursor = cursor;
+    if (peer != null)
+      peer.setCursor (cursor);
   }
-  
+
   public Cursor getCursor()
   {
     return this.cursor;
@@ -705,7 +709,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
          parent.repaint(tm, x+getX(), y+getY(), width, height);
        return;
       }
-    
+
     if (peer != null)
       peer.repaint(tm, x, y, width, height);
   }
index 8cc0664ba5449a28cd2b865c55ffc296c4cb5bd5..5497d230b12b3a59ea266a3fe1d43709728714f7 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000  Free Software Foundation
+/* Copyright (C) 2000, 2001  Free Software Foundation
 
    This file is part of libgcj.
 
@@ -13,7 +13,7 @@ package java.awt;
 import java.util.Locale;
 import java.util.ResourceBundle;
 
-public class ComponentOrientation implements java.io.Serializable
+public final class ComponentOrientation implements java.io.Serializable
 {
   // Here is a wild guess.
   private static int HORIZONTAL_ID    = 1 << 0,
@@ -29,7 +29,7 @@ public class ComponentOrientation implements java.io.Serializable
   // FIXME: This field is from the serialization spec, but what are the 
   // correct values?
   int orientation;
-  
+
   ComponentOrientation(int orientation)
   {
     this.orientation = orientation;
@@ -54,7 +54,7 @@ public class ComponentOrientation implements java.io.Serializable
   public static ComponentOrientation getOrientation(ResourceBundle bdl)
   {
     ComponentOrientation r;
-    
+
     try
     {
       Object obj = bdl.getObject("Orientation");
index 82f5fef3a7fcff5c1e09d2970e675e1eeeb36d8b..7b84907931655bab2c41bfac72c654b4381f8f9d 100644 (file)
@@ -63,6 +63,7 @@ public class Dialog extends Window
   {
     if (peer == null)
       peer = getToolkit ().createDialog (this);
+    super.addNotify ();
   }
 
   public boolean isModal ()
index 2cddc6ba119b34f70721fa7f90fab456d2c01e2b..7037118c0dd94ca81a1b9ce0e1879f3a968cd46c 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000  Free Software Foundation
+/* Copyright (C) 2000, 2001  Free Software Foundation
 
    This file is part of libgcj.
 
@@ -166,7 +166,7 @@ public class EventQueue
   }
   
   /** @since JDK1.2 */
-  static void invokeLater(Runnable runnable)
+  public static void invokeLater(Runnable runnable)
   {
     EventQueue eq = Toolkit.getDefaultToolkit().getSystemEventQueue(); 
 
@@ -176,7 +176,7 @@ public class EventQueue
     eq.postEvent(ie);
   }
   
-  static boolean isDispatchThread()
+  public static boolean isDispatchThread()
   {
     EventQueue eq = Toolkit.getDefaultToolkit().getSystemEventQueue(); 
     return (Thread.currentThread() == eq.dispatchThread);
index cdcf442dfd34ffe1d963424a99ed001089757bfd..f1ba23c358a061333185f931f0f3014c96276a83 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000  Free Software Foundation
+/* Copyright (C) 2000, 2001  Free Software Foundation
 
    This file is part of libgcj.
 
@@ -8,13 +8,112 @@ details.  */
 
 package java.awt;
 
-/* A very incomplete placeholder. */
+import java.awt.peer.FileDialogPeer;
+import java.io.FilenameFilter;
+
+/**
+ * @author Tom Tromey <tromey@redhat.com>
+ * @date April 20, 2001
+ */
 
 public class FileDialog extends Dialog
 {
-  public FileDialog (Frame owner)
+  public static int LOAD = 0;
+  public static int SAVE = 1;
+
+  public FileDialog (Frame parent)
+  {
+    this (parent, "", LOAD);
+  }
+
+  public FileDialog (Frame parent, String title)
+  {
+    this (parent, title, LOAD);
+  }
+
+  public FileDialog (Frame parent, String title, int mode)
+  {
+    super (parent, title, true);
+    if (mode != LOAD && mode != SAVE)
+      throw new IllegalArgumentException ("unknown mode: " + mode);
+    this.mode = mode;
+  }
+
+  public void addNotify ()
+  {
+    if (peer == null)
+      peer = getToolkit ().createFileDialog (this);
+    super.addNotify ();
+  }
+
+  public String getDirectory ()
+  {
+    return dir;
+  }
+
+  public String getFile ()
+  {
+    return file;
+  }
+
+  public FilenameFilter getFilenameFilter ()
   {
-    super(owner);
-    // FIXME
+    return filter;
   }
+
+  public int getMode ()
+  {
+    return mode;
+  }
+
+  protected String paramString ()
+  {
+    return ("FileDialog[mode=" + mode
+           + ",dir=" + dir
+           + ",file=" + file + "]");
+  }
+
+  public void setDirectory (String dir)
+  {
+    this.dir = dir;
+    if (peer != null)
+      {
+       FileDialogPeer f = (FileDialogPeer) peer;
+       f.setDirectory (dir);
+      }
+  }
+
+  public void setFile (String file)
+  {
+    this.file = file;
+    if (peer != null)
+      {
+       FileDialogPeer f = (FileDialogPeer) peer;
+       f.setFile (file);
+      }
+  }
+
+  public void setFilenameFilter (FilenameFilter filter)
+  {
+    this.filter = filter;
+    if (peer != null)
+      {
+       FileDialogPeer f = (FileDialogPeer) peer;
+       f.setFilenameFilter (filter);
+      }
+  }
+
+  public void setMode (int mode)
+  {
+    if (mode != LOAD && mode != SAVE)
+      throw new IllegalArgumentException ("unknown mode: " + mode);
+    this.mode = mode;
+    // FIXME: update peer?
+  }
+
+  // Names here from serialization spec.
+  private int mode;
+  private String dir;
+  private String file;
+  private FilenameFilter filter;
 }
index ca4b56622a6b06eebc39b19b00f5ff34c49f10f3..8e4fd088165e91304214600f1ca1d8f1d1c0f92c 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000  Free Software Foundation
+/* Copyright (C) 2000, 2001  Free Software Foundation
 
    This file is part of libgcj.
 
@@ -17,6 +17,12 @@ import java.awt.geom.AffineTransform;
 
 public abstract class GraphicsConfiguration
 {
+  // Can't instantiate directly.  Having a protected constructor seems
+  // redundant, but that is what the docs specify.
+  protected GraphicsConfiguration ()
+  {
+  }
+
   /*
   public abstract GraphicsDevice getDevice();
   */
index c184dce03b969916f60965cd93538508a9c0a9e8..d5992889a10eb34ed8e1e4564be8a21b0126ffa5 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000  Free Software Foundation
+/* Copyright (C) 2000, 2001  Free Software Foundation
 
    This file is part of libjava.
 
@@ -43,6 +43,7 @@ public class Label extends Component
   {
     if (peer == null)
       peer = getToolkit ().createLabel (this);
+    super.addNotify ();
   }
 
   public int getAlignment ()
index c0ac3023ced03eef6a6bf32bcc4e670d294a5362..f3d5e4becfa86d8ffc1132ff444ed1521b57c560 100644 (file)
@@ -52,6 +52,7 @@ public class List extends Component implements ItemSelectable
   {
     if (peer != null)
       peer = getToolkit ().createList (this);
+    super.addNotify ();
   }
 
   public int getItemCount ()
@@ -107,7 +108,12 @@ public class List extends Component implements ItemSelectable
   public void replaceItem (String item, int index)
   {
     items.setElementAt (item, index);
-    // FIXME: notify peer
+    if (peer != null)
+      {
+       ListPeer l = (ListPeer) peer;
+       l.delItems (index, index);
+       l.add (item, index);
+      }
   }
 
   public void removeAll ()
index 34dd600d779595dfce12c2e4f3cf7e1bdbfb02b0..6d52d050b469057c6db74324cfd1945e10fccc15 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2000  Free Software Foundation
+/* Copyright (C) 1999, 2000, 2001  Free Software Foundation
 
    This file is part of libjava.
 
@@ -40,7 +40,13 @@ public class Menu extends MenuItem implements MenuContainer
 
   public void addNotify()
   {
-    // FIXME
+    if (peer != null)
+      {
+       // This choice of toolkit seems unsatisfying, but I'm not sure
+       // what else to do.
+       peer = Toolkit.getDefaultToolkit ().createMenu (this);
+      }
+    super.addNotify ();
   }
 
   public void removeNotify()
index 6e25bc9ca4675ced1872c0d52e33cf2358ddd9ad..40de61abbb59e7ef27618cc329d7a241ffcf64cb 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2000  Free Software Foundation
+/* Copyright (C) 1999, 2000, 2001  Free Software Foundation
 
    This file is part of libjava.
 
index 06b5accc24ea292d9de7551079938438d96d7e95..b127bfa87a70bde789671da7a12d46d1aafe5c05 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2000  Free Software Foundation
+/* Copyright (C) 1999, 2000, 2001  Free Software Foundation
 
    This file is part of libgcj.
 
index 3be7f847cae07ef46f06e3fd925302f76b370700..ed4f343239d283a61189a13ff96883a493504ecf 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000  Free Software Foundation
+/* Copyright (C) 2000, 2001  Free Software Foundation
 
    This file is part of libjava.
 
@@ -8,6 +8,8 @@ details.  */
 
 package java.awt;
 
+import java.awt.peer.PopupMenuPeer;
+
 /* Status: Incomplete. */
 
 public class PopupMenu extends Menu
@@ -24,14 +26,31 @@ public class PopupMenu extends Menu
 
   public void addNotify()
   {
-    // FIXME
+    if (peer != null)
+      {
+       // This choice of toolkit seems unsatisfying, but I'm not sure
+       // what else to do.
+       peer = Toolkit.getDefaultToolkit ().createPopupMenu (this);
+      }
+    super.addNotify ();
   }
 
   public void show(Component origin, int x, int y)
   {
-    // FIXME
+    if (! origin.isShowing ()
+       // FIXME: or ! parent is showing -- but how?
+       )
+      {
+       // This is an invalid call which we choose to ignore.
+       return;
+      }
+       
+    addNotify ();              // FIXME?
+    Event e = new Event (origin, 0, 0, x, y, 0, 0);
+    PopupMenuPeer p = (PopupMenuPeer) peer;
+    p.show (e);
   }
-  
+
   // Accessibility API not yet implemented.
   // public AccessibleContext getAccessibleContext()
 }
index 6695c580b1f278dd0596c23c03762e6d0511f4ec..7e7ef728d323d28393daaf160a4d7b214a33b9a4 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2000  Free Software Foundation
+/* Copyright (C) 1999, 2000, 2001  Free Software Foundation
 
    This file is part of libjava.
 
@@ -7,11 +7,14 @@ Libjava License.  Please consult the file "LIBJAVA_LICENSE" for
 details.  */
 
 package java.awt;
+
 import java.awt.geom.*;
+import java.io.Serializable;
 
 /* Status:  Mostly complete. Some of the Java2D stuff is commented out. */
 
-public class Rectangle extends Rectangle2D implements Cloneable, Shape
+public class Rectangle extends Rectangle2D
+  implements Cloneable, Shape, Serializable
 {
   public int x;
   public int y;
@@ -151,12 +154,6 @@ public class Rectangle extends Rectangle2D implements Cloneable, Shape
     return new Point(x,y);
   }
 
-  public PathIterator getPathIterator (AffineTransform t)
-  {
-    // FIXME
-    return null;
-  }
-
   public Dimension getSize()
   {
     return new Dimension(width, height);
index a2dace68ae32458512eb0e86f29a63b800d501bc..c0010cb7d6109b60b230491662995801c3db0609 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000  Free Software Foundation
+/* Copyright (C) 2000, 2001  Free Software Foundation
 
    This file is part of libgcj.
 
@@ -16,7 +16,7 @@ public class RenderingHints implements
     Cloneable
 {
 
-  static abstract class Key
+  public abstract static class Key
   {
     private int intKey;
 
index 88a8d1fec5a497ecc54675aa76ee7a339637476c..186a7c34580f50e7867dd543eec804de19ebdab7 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000  Free Software Foundation
+/* Copyright (C) 2000, 2001  Free Software Foundation
 
    This file is part of libjava.
 
@@ -55,6 +55,7 @@ public class Scrollbar extends Component implements Adjustable
   {
     if (peer == null)
       peer = getToolkit ().createScrollbar (this);
+    super.addNotify ();
   }
 
   public int getOrientation ()
index 738cc89c7e8beca0a467c0b115e5e2b22269baff..0836b5f5844e5d4990d25b8bae90be9af532c266 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999  Free Software Foundation
+/* Copyright (C) 1999, 2001  Free Software Foundation
 
    This file is part of libjava.
 
@@ -7,16 +7,25 @@ Libjava License.  Please consult the file "LIBJAVA_LICENSE" for
 details.  */
 
 package java.awt;
+
 import java.awt.event.*;
+import java.awt.peer.TextComponentPeer;
 
 /* A very incomplete placeholder. */
 
 public class TextComponent extends Component
 {
+  protected TextListener textListener;
+
   char[] buffer;
   int length;
   int caretPosition;
 
+  public synchronized void addTextListener (TextListener listener)
+  {
+    textListener = AWTEventMulticaster.add (textListener, listener);
+  }
+
   public synchronized String getText ()
   { return new String(buffer, 0, length); }
 
@@ -28,11 +37,15 @@ public class TextComponent extends Component
     text.getChars(0, length, buffer, 0);
   }
 
-  public synchronized void addTextListener (TextListener listener)
-  { /* FIXME */ }
-
   public int getCaretPosition () { return caretPosition; }
 
-  public void setCaretPosition (int pos) { caretPosition = pos; }
-
+  public void setCaretPosition (int pos)
+  {
+    caretPosition = pos;
+    if (peer != null)
+      {
+       TextComponentPeer t = (TextComponentPeer) peer;
+       t.setCaretPosition (pos);
+      }
+  }
 }
index 9e895191e608bad94f81c210ed287b389c95faf8..99964141857bab5b5e00d1880fa5aa534ccbc893 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000  Free Software Foundation
+/* Copyright (C) 2000, 2001  Free Software Foundation
 
    This file is part of libjava.
 
@@ -35,9 +35,9 @@ public class ContainerEvent extends ComponentEvent
     return child;
   }
 
-  public Component getContainer ()
+  public Container getContainer ()
   {
-    return (Component) source;
+    return (Container) source;
   }
 
   public String paramString ()
index 16ab826ee9aa9a696d23cec550e048976a8d2d7b..f0957b12e78e952d58c860ad16c23eadf6f31bed 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000  Free Software Foundation
+/* Copyright (C) 2000, 2001  Free Software Foundation
 
    This file is part of libjava.
 
@@ -379,6 +379,14 @@ public abstract class Rectangle2D extends RectangularShape
       this.height = (float) h;
     }
 
+    public void setRect (float x, float y, float w, float h)
+    {
+      this.x = x;
+      this.y = y;
+      this.width = w;
+      this.height = h;
+    }
+
     public void setRect (Rectangle2D r)
     {
       this.x = (float) r.getX ();