[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cp-patches] [generics] Patch: FYI: some AWT generics fixes
From: |
Tom Tromey |
Subject: |
[cp-patches] [generics] Patch: FYI: some AWT generics fixes |
Date: |
27 Sep 2005 10:42:53 -0600 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 |
I'm checking this in on the generics branch.
This is a few generics-related fixes for AWT.
Tom
Index: ChangeLog
from Tom Tromey <address@hidden>
* java/awt/im/InputMethodHighlight.java (InputMethodHighlight):
Updated argument types.
(getStyle): Updated return type.
* java/awt/MenuBar.java (shortcuts): Updated return type.
* java/awt/Window.java (hide): Now deprecated.
(show): Likewise.
Index: java/awt/MenuBar.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/awt/MenuBar.java,v
retrieving revision 1.10.2.5
diff -u -r1.10.2.5 MenuBar.java
--- java/awt/MenuBar.java 2 Aug 2005 20:12:15 -0000 1.10.2.5
+++ java/awt/MenuBar.java 27 Sep 2005 16:41:35 -0000
@@ -313,10 +313,10 @@
*
* @return A list of all shortcuts for the menus in this menu bar.
*/
-public synchronized Enumeration
+public synchronized Enumeration<MenuShortcut>
shortcuts()
{
- Vector shortcuts = new Vector();
+ Vector<MenuShortcut> shortcuts = new Vector<MenuShortcut>();
Enumeration e = menus.elements();
while (e.hasMoreElements())
Index: java/awt/Window.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/awt/Window.java,v
retrieving revision 1.35.2.11
diff -u -r1.35.2.11 Window.java
--- java/awt/Window.java 20 Sep 2005 18:46:26 -0000 1.35.2.11
+++ java/awt/Window.java 27 Sep 2005 16:41:35 -0000
@@ -1,5 +1,5 @@
/* Window.java --
- Copyright (C) 1999, 2000, 2002, 2003, 2004 Free Software Foundation
+ Copyright (C) 1999, 2000, 2002, 2003, 2004, 2005 Free Software Foundation
This file is part of GNU Classpath.
@@ -277,7 +277,9 @@
/**
* Shows on-screen this window and any of its owned windows for whom
* isVisible returns true.
+ * @specnote: Deprecated starting in 1.5.
*/
+ @Deprecated
public void show()
{
if (parent != null && !parent.isDisplayable())
@@ -327,6 +329,10 @@
}
}
+ /**
+ * @specnote: Deprecated starting in 1.5.
+ */
+ @Deprecated
public void hide()
{
// Hide visible owned windows.
Index: java/awt/im/InputMethodHighlight.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/awt/im/InputMethodHighlight.java,v
retrieving revision 1.2.2.2
diff -u -r1.2.2.2 InputMethodHighlight.java
--- java/awt/im/InputMethodHighlight.java 2 Aug 2005 20:12:15 -0000 1.2.2.2
+++ java/awt/im/InputMethodHighlight.java 27 Sep 2005 16:41:36 -0000
@@ -38,6 +38,7 @@
package java.awt.im;
import java.util.Map;
+import java.awt.font.TextAttribute;
/**
* This describes the highlight attributes of text composed in an input method.
@@ -92,7 +93,7 @@
private final int variation;
/** The unmodifiable map of rendering styles. */
- private final Map style;
+ private final Map<TextAttribute, ?> style;
/**
* Create an input method highlight style, with variation 0 and null style
@@ -131,7 +132,7 @@
* @since 1.3
*/
public InputMethodHighlight(boolean selected, int state, int variation,
- Map style)
+ Map<TextAttribute, ?> style)
{
if (state != RAW_TEXT && state != CONVERTED_TEXT)
throw new IllegalArgumentException();
@@ -178,7 +179,7 @@
* @return the style map
* @since 1.3
*/
- public Map getStyle()
+ public Map<TextAttribute, ?> getStyle()
{
return style;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [cp-patches] [generics] Patch: FYI: some AWT generics fixes,
Tom Tromey <=