This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

FYI: Patch: java.awt classpath merge


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi list,


I commited the attached patch to trunk to merge java.awt with 
classpath again.


Michael
- -- 
Homepage: http://www.worldforge.org/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+0KifWSOgCCdjSDsRAhPgAKCEF289GhVOzivxtXU8d+Krv6maAQCglFwQ
db3Cs1Af5uI6udztrLjT/lc=
=R5cl
-----END PGP SIGNATURE-----
Index: ChangeLog
===================================================================
RCS file: /cvs/gcc/gcc/libjava/ChangeLog,v
retrieving revision 1.1903
diff -u -b -B -r1.1903 ChangeLog
--- ChangeLog	20 May 2003 11:53:09 -0000	1.1903
+++ ChangeLog	25 May 2003 11:23:01 -0000
@@ -1,3 +1,14 @@
+2003-05-25  Michael Koch  <konqueror@gmx.de>
+
+	* java/awt/Checkbox.java,
+	java/awt/Dialog.java,
+	java/awt/Font.java,
+	java/awt/Frame.java,
+	java/awt/ScrollPaneAdjustable.java,
+	java/awt/Scrollbar.java,
+	java/awt/Window.java:
+	New versions from classpath.
+
 2003-05-20  Michael Koch  <konqueror@gmx.de>
 
 	* java/io/DataInputStream.java
Index: java/awt/Checkbox.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/awt/Checkbox.java,v
retrieving revision 1.7
diff -u -b -B -r1.7 Checkbox.java
--- java/awt/Checkbox.java	24 Mar 2002 22:37:51 -0000	1.7
+++ java/awt/Checkbox.java	25 May 2003 11:23:01 -0000
@@ -307,7 +307,11 @@
   super.addNotify ();
 }
 
-/*************************************************************************/
+  public ItemListener[] getItemListeners ()
+  {
+    return (ItemListener[])
+      AWTEventMulticaster.getListeners (item_listeners, ItemListener.class);
+  }
 
 /**
   * Adds a new listeners to the list of registered listeners for this object.
Index: java/awt/Dialog.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/awt/Dialog.java,v
retrieving revision 1.7
diff -u -b -B -r1.7 Dialog.java
--- java/awt/Dialog.java	17 Mar 2003 15:20:09 -0000	1.7
+++ java/awt/Dialog.java	25 May 2003 11:23:01 -0000
@@ -46,7 +46,7 @@
 /**
   * A dialog box widget class.
   *
-  * @author Aaron M. Renn (arenn@urbanophile.com)
+ * @author Aaron M. Renn <arenn@urbanophile.com>
   * @author Tom Tromey <tromey@redhat.com>
   */
 public class Dialog extends Window
@@ -81,6 +81,11 @@
   */
 private String title;
 
+  /**
+   * This field indicates whether the dialog is undecorated or not.
+   */
+  private boolean undecorated = false;
+
 /*************************************************************************/
 
 /*
@@ -395,5 +400,30 @@
 	  ",resizable=" + resizable + "," + super.paramString());
 }
 
+  /**
+   * Returns whether this frame is undecorated or not.
+   * 
+   * @since 1.4
+   */
+  public boolean isUndecorated ()
+  {
+    return undecorated;
+  }
+
+  /**
+   * Disables or enables decorations for this frame. This method can only be
+   * called while the frame is not displayable.
+   * 
+   * @exception IllegalComponentStateException If this frame is displayable.
+   * 
+   * @since 1.4
+   */
+  public void setUndecorated (boolean undecorated)
+  {
+    if (isDisplayable ())
+      throw new IllegalComponentStateException ();
+
+    this.undecorated = undecorated;
+  }
 } // class Dialog
 
Index: java/awt/Font.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/awt/Font.java,v
retrieving revision 1.10
diff -u -b -B -r1.10 Font.java
--- java/awt/Font.java	15 Feb 2003 09:21:54 -0000	1.10
+++ java/awt/Font.java	25 May 2003 11:23:02 -0000
@@ -406,6 +406,8 @@
   * Returns a native peer object for this font.
   *
   * @return A native peer object for this font.
+  *
+  * @deprecated
   */
 public FontPeer
 getPeer()
Index: java/awt/Frame.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/awt/Frame.java,v
retrieving revision 1.13
diff -u -b -B -r1.13 Frame.java
--- java/awt/Frame.java	24 Mar 2003 08:26:52 -0000	1.13
+++ java/awt/Frame.java	25 May 2003 11:23:02 -0000
@@ -201,6 +201,16 @@
   */
 private String title = "";
 
+  /**
+   * Maximized bounds for this frame.
+   */
+  private Rectangle maximizedBounds;
+
+  /**
+   * This field indicates whether the frame is undecorated or not.
+   */
+  private boolean undecorated = false;
+
 /*************************************************************************/
 
 /*
@@ -456,14 +466,6 @@
   return(getClass().getName());
 }
 
-public int
-getState()
-{
-  /* FIXME: State might have changed in the peer... Must check. */
-    
-  return state;
-}
-
 public static Frame[]
 getFrames()
 {
@@ -475,5 +477,86 @@
   throw new UnsupportedOperationException(msg);
 }
 
+  public void setState (int state)
+  {
+    int current_state = getExtendedState ();
+
+    if (state == NORMAL
+        && (current_state & ICONIFIED) != 0)
+      setExtendedState (current_state | ICONIFIED);
+    
+    if (state == ICONIFIED
+        && (current_state & ~ICONIFIED) == 0)
+      setExtendedState (current_state & ~ICONIFIED);
+  }
+
+  public int getState ()
+  {
+    /* FIXME: State might have changed in the peer... Must check. */
+  
+    return (state & ICONIFIED) != 0 ? ICONIFIED : NORMAL;
+  }
+
+  /**
+   * @since 1.4
+   */
+  public void setExtendedState (int state)
+  {
+    this.state = state;
+  }
+
+  /**
+   * @since 1.4
+   */
+  public int getExtendedState ()
+  {
+    return state;
+  }
+
+  /**
+   * @since 1.4
+   */
+  public void setMaximizedBounds (Rectangle maximizedBounds)
+  {
+    throw new Error ("not implemented");
+  }
+
+  /**
+   * Returns the maximized bounds of this frame.
+   *
+   * @return the maximized rectangle, may be null.
+   *
+   * @since 1.4
+   */
+  public Rectangle getMaximizedBounds ()
+  {
+    return maximizedBounds;
+  }
+
+  /**
+   * Returns whether this frame is undecorated or not.
+   * 
+   * @since 1.4
+   */
+  public boolean isUndecorated ()
+  {
+    return undecorated;
+  }
+
+  /**
+   * Disables or enables decorations for this frame. This method can only be
+   * called while the frame is not displayable.
+   * 
+   * @exception IllegalComponentStateException If this frame is displayable.
+   * 
+   * @since 1.4
+   */
+  public void setUndecorated (boolean undecorated)
+  {
+    if (!isDisplayable ())
+      throw new IllegalComponentStateException ();
+
+    this.undecorated = undecorated;
+  }
 } // class Frame 
 
Index: java/awt/ScrollPaneAdjustable.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/awt/ScrollPaneAdjustable.java,v
retrieving revision 1.5
diff -u -b -B -r1.5 ScrollPaneAdjustable.java
--- java/awt/ScrollPaneAdjustable.java	18 Mar 2003 18:16:54 -0000	1.5
+++ java/awt/ScrollPaneAdjustable.java	25 May 2003 11:23:02 -0000
@@ -63,6 +63,8 @@
   int blockIncrement = 1;
   AdjustmentListener adjustmentListener;
 
+  private transient boolean valueIsAdjusting = false;
+
   ScrollPaneAdjustable (ScrollPane sp, int orientation)
   {
     this.sp = sp;
@@ -175,5 +177,24 @@
     throw new Error ("not implemented");
   }
 
+  /**
+   * Returns true if the value is in the process of changing.
+   *
+   * @since 1.4
+   */
+  public boolean getValueIsAdjusting ()
+  {
+    return valueIsAdjusting;
+  }
+
+  /**
+   * Sets the value of valueIsAdjusting.
+   *
+   * @since 1.4
+   */
+  public void setValueIsAdjusting (boolean valueIsAdjusting)
+  {
+    this.valueIsAdjusting = valueIsAdjusting;
+  }
 } // class ScrollPaneAdjustable
 
Index: java/awt/Scrollbar.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/awt/Scrollbar.java,v
retrieving revision 1.13
diff -u -b -B -r1.13 Scrollbar.java
--- java/awt/Scrollbar.java	19 Feb 2003 00:35:35 -0000	1.13
+++ java/awt/Scrollbar.java	25 May 2003 11:23:02 -0000
@@ -119,6 +119,8 @@
 // List of AdjustmentListener's.
 private AdjustmentListener adjustment_listeners;
 
+private transient boolean valueIsAdjusting = false;
+
 /*************************************************************************/
 
 /*
@@ -724,6 +726,26 @@
   public AdjustmentListener[] getAdjustmentListeners ()
   {
     return (AdjustmentListener[]) getListeners (AdjustmentListener.class);
+  }
+
+  /**
+   * Returns true if the value is in the process of changing.
+   *
+   * @since 1.4
+   */
+  public boolean getValueIsAdjusting ()
+  {
+    return valueIsAdjusting;
+  }
+
+  /**
+   * Sets the value of valueIsAdjusting.
+   *
+   * @since 1.4
+   */
+  public void setValueIsAdjusting (boolean valueIsAdjusting)
+  {
+    this.valueIsAdjusting = valueIsAdjusting;
   }
 } // class Scrollbar 
 
Index: java/awt/Window.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/awt/Window.java,v
retrieving revision 1.20
diff -u -b -B -r1.20 Window.java
--- java/awt/Window.java	29 Apr 2003 07:51:46 -0000	1.20
+++ java/awt/Window.java	25 May 2003 11:23:02 -0000
@@ -57,10 +57,14 @@
 public class Window extends Container
 {
   // Serialized fields, from Sun's serialization spec.
-  // private FocusManager focusMgr;  // FIXME: what is this?  
   private String warningString = null;
-  private int state = 0;
   private int windowSerializedDataVersion = 0; // FIXME
+  /** @since 1.2 */
+  // private FocusManager focusMgr;  // FIXME: what is this?  
+  /** @since 1.2 */
+  private int state = 0;
+  /** @since 1.4 */
+  private boolean focusableWindowState = true;
 
   private transient WindowListener windowListener;
   private transient WindowFocusListener windowFocusListener;
@@ -644,5 +648,44 @@
     if (windowStateListener != null
         && event.getID () == WindowEvent.WINDOW_STATE_CHANGED)
       windowStateListener.windowStateChanged (event);
+  }
+
+  /**
+   * Returns whether this <code>Window</code> can get the focus or not.
+   *
+   * @since 1.4
+   */
+  public boolean isFocusableWindow ()
+  {
+    if (getFocusableWindowState () == false)
+      return false;
+
+    if (this instanceof Dialog
+        || this instanceof Frame)
+      return true;
+
+    // FIXME: Implement more possible cases for returning true.
+
+    return false;
+  }
+  
+  /**
+   * Returns the value of the focusableWindowState property.
+   * 
+   * @since 1.4
+   */
+  public boolean getFocusableWindowState ()
+  {
+    return focusableWindowState;
+  }
+
+  /**
+   * Sets the value of the focusableWindowState property.
+   * 
+   * @since 1.4
+   */
+  public void setFocusableWindowState (boolean focusableWindowState)
+  {
+    this.focusableWindowState = focusableWindowState;
   }
 }

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]