harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ndbe...@apache.org
Subject svn commit: r441863 [4/5] - in /incubator/harmony/enhanced/classlib/trunk/modules/awt/src: main/java/common/java/awt/ test/api/java/common/java/awt/
Date Sat, 09 Sep 2006 21:56:50 GMT
Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Menu.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Menu.java?view=diff&rev=441863&r1=441862&r2=441863
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Menu.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Menu.java Sat Sep  9 14:56:46 2006
@@ -37,7 +37,7 @@
 
     private static final long serialVersionUID = -8809584163345499784L;
     final static int LAST_ELEMENT = Integer.MAX_VALUE;
-    private final ArrayList menuItems = new ArrayList();
+    private final ArrayList<MenuItem> menuItems = new ArrayList<MenuItem>();
     private final Point location = new Point();
     private final Dimension size = new Dimension();
 
@@ -48,6 +48,7 @@
 
         private static final long serialVersionUID = 5228160894980069094L;
 
+        @Override
         public AccessibleRole getAccessibleRole() {
             return AccessibleRole.MENU;
         }
@@ -58,27 +59,35 @@
      * The internal menu's state utilized by the visual theme
      */
     final class State extends MenuComponent.State implements MenuState {
+        @Override
         public int getWidth() {
             return Menu.this.getWidth();
         }
+        @Override
         public int getHeight() {
             return Menu.this.getHeight();
         }
+        @Override
         public Font getFont() {
             return Menu.this.getFont();
         }
+        @Override
         public int getItemCount() {
             return Menu.this.getItemCount();
         }
+        @Override
         public int getSelectedItemIndex() {
             return Menu.this.getSelectedItemIndex();
         }
+        @Override
         public boolean isFontSet() {
             return Menu.this.isFontSet();
         }
+        @Override
         public FontMetrics getFontMetrics(Font f) {
             return Menu.this.toolkit.getFontMetrics(f);
         }
+        @Override
         public Point getLocation() {
             return Menu.this.location;
         }
@@ -156,7 +165,7 @@
     }
 
     void removeImpl(int index) {
-        MenuComponent item = (MenuComponent)menuItems.remove(index);
+        MenuComponent item = menuItems.remove(index);
         item.setParent(null);
     }
 
@@ -209,6 +218,7 @@
         }
     }
 
+    @Override
     public String paramString() {
         toolkit.lockAWT();
         try {
@@ -218,15 +228,17 @@
         }
     }
 
+    @Override
     public MenuItem getItem(int index) {
         toolkit.lockAWT();
         try {
-            return (MenuItem)menuItems.get(index);
+            return menuItems.get(index);
         } finally {
             toolkit.unlockAWT();
         }
     }
 
+    @Override
     public void addNotify() {
         toolkit.lockAWT();
         try {
@@ -237,6 +249,7 @@
         }
     }
 
+    @Override
     public AccessibleContext getAccessibleContext() {
         toolkit.lockAWT();
         try {
@@ -246,6 +259,7 @@
         }
     }
 
+    @Override
     public void removeNotify() {
         toolkit.lockAWT();
         try {
@@ -267,6 +281,7 @@
         }
     }
 
+    @Override
     public int getItemCount() {
         toolkit.lockAWT();
         try {
@@ -298,6 +313,7 @@
         return tearOff;
     }
 
+    @Override
     Point getLocation() {
         return location;
     }
@@ -306,14 +322,17 @@
         return size;
     }
 
+    @Override
     int getWidth() {
         return size.width;
     }
 
+    @Override
     int getHeight() {
         return size.height;
     }
 
+    @Override
     void paint(Graphics gr) {
         toolkit.theme.drawMenu(menuState, gr);
     }
@@ -359,6 +378,7 @@
         return null;
     }
 
+    @Override
     void hide() {
         super.hide();
         for (int i = 0; i < getItemCount(); i++) {
@@ -368,14 +388,17 @@
         popupBox.hide();
     }
 
+    @Override
     boolean isVisible() {
         return popupBox.isVisible();
     }
 
+    @Override
     PopupBox getPopupBox() {
         return popupBox;
     }
 
+    @Override
     void onMouseEvent(int eventId, Point where, int mouseButton, long when, int modifiers) {
         if (eventId == MouseEvent.MOUSE_PRESSED ||
                 eventId == MouseEvent.MOUSE_MOVED ||
@@ -399,6 +422,7 @@
         }
     }
 
+    @Override
     void onKeyEvent(int eventId, int vKey, long when, int modifiers) {
         if (eventId != KeyEvent.KEY_PRESSED) {
             return;
@@ -444,29 +468,34 @@
         }
     }
 
+    @Override
     void itemSelected(long when, int modifiers) {
         // do nothing
     }
 
+    @Override
     Rectangle getItemRect(int index) {
         return menuState.getItem(index).getItemBounds();
     }
 
+    @Override
     Point getSubmenuLocation(int index) {
         return toolkit.theme.getMenuItemLocation(menuState, index);
     }
 
+    @Override
     Graphics getGraphics(MultiRectArea clip) {
         return popupBox.getGraphics(clip);
     }
 
+    @Override
     AccessibleContext createAccessibleContext() {
         return new AccessibleAWTMenu();
     }
 
-    void collectShortcuts(HashSet shortcuts) {
+    void collectShortcuts(HashSet<MenuShortcut> shortcuts) {
         for (int i=0; i<menuItems.size(); i++) {
-            MenuItem item = (MenuItem)menuItems.get(i);
+            MenuItem item = menuItems.get(i);
             if (item instanceof Menu) {
                 ((Menu)item).collectShortcuts(shortcuts);
             } else {

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/MenuBar.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/MenuBar.java?view=diff&rev=441863&r1=441862&r2=441863
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/MenuBar.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/MenuBar.java Sat Sep  9 14:56:46 2006
@@ -38,7 +38,7 @@
 public class MenuBar extends MenuComponent implements MenuContainer, Accessible {
 
     private static final long serialVersionUID = -4930327919388951260L;
-    private final ArrayList menuList;
+    private final ArrayList<Menu> menuList;
     private Menu helpMenu; // one of the list items
     private boolean unfolded;
 
@@ -49,6 +49,7 @@
 
         private static final long serialVersionUID = -8577604491830083815L;
 
+        @Override
         public AccessibleRole getAccessibleRole() {
             return AccessibleRole.MENU_BAR;
         }
@@ -67,6 +68,7 @@
             return MenuBar.this.getScreenLocation();
         }
 
+        @Override
         void calculate() {
             Frame f = getFrame();
             Insets ins = f.getNativeInsets();
@@ -74,6 +76,7 @@
             toolkit.theme.layoutMenuBar(this, width);
         }
 
+        @Override
         void reset() {
             super.reset();
         }
@@ -86,6 +89,7 @@
      */
     private final class MenuBarBox extends MenuComponent.MenuPopupBox {
 
+        @Override
         boolean isMenuBar() {
             return true;
         }
@@ -94,24 +98,29 @@
             return toolkit.dispatcher.popupDispatcher.isActive(this);
         }
 
+        @Override
         Dimension getSize() {
             size.setSize(menuBarState.getSize());
             return size;
         }
 
+        @Override
         Point getLocation () {
             location.setLocation(MenuBar.this.getLocation());
             return location;
         }
 
+        @Override
         Point getScreenLocation() {
             return MenuBar.this.getScreenLocation();
         }
 
+        @Override
         void paint(Graphics gr) {
             MenuBar.this.paint(gr);
         }
 
+        @Override
         Rectangle calculateBounds() {
             Dimension size = MenuBar.this.menuBarState.getSize();
             Point location = MenuBar.this.getLocation();
@@ -122,6 +131,7 @@
             show((Frame)MenuBar.this.getParent());
         }
 
+        @Override
         void hide() {
             selectItem(-1);
             toolkit.dispatcher.popupDispatcher.deactivate(this);
@@ -147,7 +157,7 @@
     public MenuBar() throws HeadlessException {
         toolkit.lockAWT();
         try {
-            menuList = new ArrayList();
+            menuList = new ArrayList<Menu>();
         } finally {
             toolkit.unlockAWT();
         }
@@ -190,7 +200,7 @@
     public void remove(int index) {
         toolkit.lockAWT();
         try {
-            Menu menu = (Menu)menuList.get(index);
+            Menu menu = menuList.get(index);
             remove(menu);
         } finally {
             toolkit.unlockAWT();
@@ -207,6 +217,7 @@
         }
     }
 
+    @Override
     public AccessibleContext getAccessibleContext() {
         toolkit.lockAWT();
         try {
@@ -216,6 +227,7 @@
         }
     }
 
+    @Override
     public void removeNotify() {
         toolkit.lockAWT();
         try {
@@ -246,10 +258,10 @@
         }
     }
 
-    public Enumeration shortcuts() {
+    public Enumeration<MenuShortcut> shortcuts() {
         toolkit.lockAWT();
         try {
-            HashSet shortcuts = new HashSet();
+            HashSet<MenuShortcut> shortcuts = new HashSet<MenuShortcut>();
             collectShortcuts(shortcuts);
             return Collections.enumeration(shortcuts);
         } finally {
@@ -278,7 +290,7 @@
     public Menu getMenu(int index) {
         toolkit.lockAWT();
         try {
-            return (Menu)menuList.get(index);
+            return menuList.get(index);
         } finally {
             toolkit.unlockAWT();
         }
@@ -309,6 +321,7 @@
         }
     }
 
+    @Override
     boolean hasDefaultFont() {
         return true;
     }
@@ -323,22 +336,27 @@
         f.validate();
     }
 
+    @Override
     MenuItem getItem(int index) {
-        return (MenuItem)menuList.get(index);
+        return menuList.get(index);
     }
 
+    @Override
     int getItemCount() {
         return menuList.size();
     }
 
+    @Override
     int getWidth() {
         return menuBarState.getWidth();
     }
 
+    @Override
     int getHeight() {
         return menuBarState.getHeight();
     }
 
+    @Override
     Point getLocation() {
         Frame f = (Frame)getParent();
         if (f == null) {
@@ -357,14 +375,17 @@
         return new Point(f.x + ins.left, f.y + ins.top);
     }
 
+    @Override
     void paint(Graphics gr) {
         toolkit.theme.drawMenuBar(menuBarState, gr);
     }
 
+    @Override
     Rectangle getItemRect(int index) {
         return menuBarState.getItem(index).getItemBounds();
     }
 
+    @Override
     final void onMouseEvent(int eventId, Point where, int mouseButton, long when, int modifiers) {
         int index = toolkit.theme.getMenuBarItemIndex(menuBarState, where);
 
@@ -395,6 +416,7 @@
         }
     }
 
+    @Override
     void onKeyEvent(int eventId, int vKey, long when, int modifiers) {
         if (eventId != KeyEvent.KEY_PRESSED) {
             return;
@@ -425,25 +447,31 @@
         }
     }
 
+    @Override
     boolean isActive() {
         return box.isActive();
     }
 
+    @Override
     MenuBar getMenuBar() {
         return this;
     }
 
+    @Override
     PopupBox getPopupBox() {
         return box;
     }
 
+    @Override
     void hide() {
         // do nothing
     }
 
+    @Override
     void itemHidden(MenuComponent mc) {
         unfolded = false;
     }
+    @Override
     Point getSubmenuLocation(int index) {
         return toolkit.theme.getMenuBarItemLocation(menuBarState, index);
     }
@@ -452,11 +480,13 @@
         super.selectNextItem(forward, unfolded);
     }
 
+    @Override
     void selectItem(int index) {
         unfolded = (index >= 0);
         super.selectItem(index, true);
     }
 
+    @Override
     void showSubMenu(int index) {
         unfolded = (index >= 0);
         super.showSubMenu(index);
@@ -467,10 +497,12 @@
         box.updateBounds();
     }
 
+    @Override
     Graphics getGraphics(MultiRectArea clip) {
         return box.getGraphics(clip);
     }
 
+    @Override
     AccessibleContext createAccessibleContext() {
         return new AccessibleAWTMenuBar();
     }
@@ -484,9 +516,9 @@
         }
     }
 
-    void collectShortcuts(HashSet shortcuts) {
+    void collectShortcuts(HashSet<MenuShortcut> shortcuts) {
         for (int i=0; i<menuList.size(); i++) {
-            ((Menu)menuList.get(i)).collectShortcuts(shortcuts);
+            menuList.get(i).collectShortcuts(shortcuts);
         }
     }
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/MenuComponent.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/MenuComponent.java?view=diff&rev=441863&r1=441862&r2=441863
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/MenuComponent.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/MenuComponent.java Sat Sep  9 14:56:46 2006
@@ -180,22 +180,27 @@
         public void selectAllAccessibleSelection() {
         }
 
+        @Override
         public Accessible getAccessibleChild(int index) {
             return null;
         }
 
+        @Override
         public int getAccessibleChildrenCount() {
             return 0;
         }
 
+        @Override
         public AccessibleComponent getAccessibleComponent() {
             return this;
         }
 
+        @Override
         public String getAccessibleDescription() {
             return super.getAccessibleDescription();
         }
 
+        @Override
         public int getAccessibleIndexInParent() {
             toolkit.lockAWT();
             try {
@@ -221,10 +226,12 @@
             }
         }
 
+        @Override
         public String getAccessibleName() {
             return super.getAccessibleName();
         }
 
+        @Override
         public Accessible getAccessibleParent() {
             toolkit.lockAWT();
             try {
@@ -242,18 +249,22 @@
             }
         }
 
+        @Override
         public AccessibleRole getAccessibleRole() {
             return AccessibleRole.AWT_COMPONENT;
         }
 
+        @Override
         public AccessibleSelection getAccessibleSelection() {
             return this;
         }
 
+        @Override
         public AccessibleStateSet getAccessibleStateSet() {
             return new AccessibleStateSet();
         }
 
+        @Override
         public Locale getLocale() {
             return Locale.getDefault();
         }
@@ -327,18 +338,22 @@
 
         private final Point lastMousePos = new Point();
 
+        @Override
         boolean isMenu() {
             return true;
         }
 
+        @Override
         void paint(Graphics gr) {
             MenuComponent.this.paint(gr);
         }
 
+        @Override
         void onKeyEvent(int eventId, int vKey, long when, int modifiers) {
             MenuComponent.this.onKeyEvent(eventId, vKey, when, modifiers);
         }
 
+        @Override
         void onMouseEvent(int eventId, Point where, int mouseButton, long when,
                 int modifiers, int wheelRotation) {
 
@@ -375,6 +390,7 @@
         }
     }
 
+    @Override
     public String toString() {
         toolkit.lockAWT();
         try {
@@ -428,7 +444,9 @@
         } finally {
             toolkit.unlockAWT();
         }
-        if (true) throw new RuntimeException("Method is not implemented"); //TODO: implement
+        if (true) {
+            throw new RuntimeException("Method is not implemented"); //TODO: implement
+        }
         return null;
     }
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/MenuItem.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/MenuItem.java?view=diff&rev=441863&r1=441862&r2=441863
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/MenuItem.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/MenuItem.java Sat Sep  9 14:56:46 2006
@@ -49,6 +49,7 @@
 
         private static final long serialVersionUID = -217847831945965825L;
 
+        @Override
         public String getAccessibleName() {
             String aName = super.getAccessibleName();
             if (aName == null) {
@@ -57,14 +58,17 @@
             return aName;
         }
 
+        @Override
         public AccessibleRole getAccessibleRole() {
             return AccessibleRole.MENU_ITEM;
         }
 
+        @Override
         public AccessibleAction getAccessibleAction() {
             return this;
         }
 
+        @Override
         public AccessibleValue getAccessibleValue() {
             return this;
         }
@@ -233,14 +237,14 @@
         try {
             if (ActionListener.class.isAssignableFrom(listenerType)) {
                 return getActionListeners();
-            } else {
-                return new EventListener[0];
             }
+            return new EventListener[0];
         } finally {
             toolkit.unlockAWT();
         }
     }
 
+    @Override
     public String paramString() {
         /* The format of paramString is based on 1.5 release behavior 
          * which can be revealed using the following code:
@@ -316,6 +320,7 @@
         }
     }
 
+    @Override
     public AccessibleContext getAccessibleContext() {
         toolkit.lockAWT();
         try {
@@ -334,6 +339,7 @@
         }
     }
 
+    @Override
     protected void processEvent(AWTEvent event) {
         if (toolkit.eventTypeLookup.getEventMask(event) == AWTEvent.ACTION_EVENT_MASK) {
             processActionEvent((ActionEvent) event);
@@ -420,6 +426,7 @@
         }
     }
 
+    @Override
     void itemSelected(long when, int modifiers) {
         AWTEvent event = createEvent(when, modifiers);
         toolkit.getSystemEventQueueImpl().postEvent(event);
@@ -432,6 +439,7 @@
                 getActionCommand(), when, modifiers);
     }
 
+    @Override
     AccessibleContext createAccessibleContext() {
         return new AccessibleAWTMenuItem();
     }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/MenuShortcut.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/MenuShortcut.java?view=diff&rev=441863&r1=441862&r2=441863
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/MenuShortcut.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/MenuShortcut.java Sat Sep  9 14:56:46 2006
@@ -19,6 +19,7 @@
  */
 package java.awt;
 
+import java.awt.event.InputEvent;
 import java.awt.event.KeyEvent;
 import java.io.Serializable;
 
@@ -40,6 +41,7 @@
         shiftModifier = useShiftModifier;
     }
 
+    @Override
     public int hashCode() {
         int hashCode = HashCode.EMPTY_HASH_CODE;
         hashCode = HashCode.combine(hashCode, keyCode);
@@ -52,6 +54,7 @@
                 (s.shiftModifier == shiftModifier);
     }
 
+    @Override
     public boolean equals(Object obj) {
         if (obj instanceof MenuShortcut) {
             MenuShortcut s = (MenuShortcut)obj;
@@ -61,9 +64,10 @@
         return false;
     }
 
+    @Override
     public String toString() {
-        int modifiers = KeyEvent.CTRL_DOWN_MASK |
-                (shiftModifier ? KeyEvent.SHIFT_DOWN_MASK : 0);
+        int modifiers = InputEvent.CTRL_DOWN_MASK |
+                (shiftModifier ? InputEvent.SHIFT_DOWN_MASK : 0);
 
         return KeyEvent.getKeyModifiersText(modifiers) +
                 "+" + KeyEvent.getKeyText(keyCode);

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/MouseDispatcher.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/MouseDispatcher.java?view=diff&rev=441863&r1=441862&r2=441863
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/MouseDispatcher.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/MouseDispatcher.java Sat Sep  9 14:56:46 2006
@@ -221,9 +221,7 @@
         {
             Component[] children = ((Container) info.src).getComponents();
 
-            for (int i = 0; i <  children.length; i++) {
-                Component child = children[i];
-
+            for (Component child : children) {
                 if (child.isShowing()) {
                     if (child.contains(x - child.getX(),
                             y - child.getY()))
@@ -293,10 +291,9 @@
         final Point lastPos = lastPressPos[index];
         if (lastPos == null) {
             return true;
-        } else {
-            return ((Math.abs(lastPos.x - info.position.x) > clickDelta) ||
-                    (Math.abs(lastPos.y - info.position.y) > clickDelta));
         }
+        return ((Math.abs(lastPos.x - info.position.x) > clickDelta) ||
+                (Math.abs(lastPos.y - info.position.y) > clickDelta));
     }
 
     private void dispatchMotionEvent(PointerInfo info, NativeEvent event) {
@@ -357,7 +354,7 @@
     }
 
     private PointerInfo propagateEvent(PointerInfo info, long mask,
-                                       Class type, boolean pierceHW) {
+                                       Class<?> type, boolean pierceHW) {
         Component src = info.src;
         while ((src != null) &&
                (src.isLightweight() || pierceHW) &&

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/PageAttributes.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/PageAttributes.java?view=diff&rev=441863&r1=441862&r2=441863
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/PageAttributes.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/PageAttributes.java Sat Sep  9 14:56:46 2006
@@ -31,7 +31,6 @@
 
 /*----------------- section of the nested classes --------------------*/
     public static final class ColorType {
-        private final int value;
         private final String name;
         public static final ColorType COLOR
                                         = new ColorType(0, "COLOR");
@@ -40,7 +39,6 @@
 
         private ColorType(int i, String n){
             super();
-            value = i;
             name = n;
         }
 
@@ -50,7 +48,6 @@
     }
 
     public static final class MediaType {
-        private final int value;
         private final String name;
 
         public static final MediaType ISO_4A0 = new MediaType(71, "ISO_4A0");
@@ -249,7 +246,6 @@
 
         private MediaType(int i, String n){
             super();
-            value = i;
             name = n;
         }
         private MediaType(){
@@ -258,7 +254,6 @@
     }
 
     public static final class OrientationRequestedType {
-        private final int value;
         private final String name;
 
         public static final OrientationRequestedType PORTRAIT
@@ -268,7 +263,6 @@
 
         private OrientationRequestedType(int i, String n){
             super();
-            value = i;
             name = n;
         }
         private OrientationRequestedType(){
@@ -277,7 +271,6 @@
     }
 
     public static final class OriginType {
-        private final int value;
         private final String name;
 
         public static final OriginType PHYSICAL
@@ -287,7 +280,6 @@
 
         private OriginType(int i, String n){
             super();
-            value = i;
             name = n;
         }
         private OriginType(){
@@ -296,7 +288,6 @@
     }
 
     public static final class PrintQualityType {
-        private final int value;
         private final String name;
 
         public static final PrintQualityType HIGH = new PrintQualityType(5,
@@ -307,7 +298,6 @@
                 "DRAFT");
 
         private PrintQualityType(int i, String n){
-            value = i;
             name = n;
         }
 
@@ -345,11 +335,13 @@
         set(pageAttributes);
     }
 
+    @Override
     public Object clone() {
         PageAttributes pa = new PageAttributes(this);
         return pa;
     }
 
+    @Override
     public boolean equals(Object obj) {
         PageAttributes pa;
 
@@ -383,6 +375,7 @@
         return true;
     }
 
+    @Override
     public String toString(){
         /* The format is based on 1.5 release behavior 
          * which can be revealed by the following code:
@@ -399,6 +392,7 @@
         return s;
     }
 
+    @Override
     public int hashCode() {
         int hash = this.toString().hashCode();
         return hash;

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Panel.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Panel.java?view=diff&rev=441863&r1=441862&r2=441863
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Panel.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Panel.java Sat Sep  9 14:56:46 2006
@@ -31,6 +31,7 @@
 
         private static final long serialVersionUID = -6409552226660031050L;
 
+        @Override
         public AccessibleRole getAccessibleRole() {
             toolkit.lockAWT();
             try {
@@ -60,6 +61,7 @@
         }
     }
 
+    @Override
     public void addNotify() {
         toolkit.lockAWT();
         try {
@@ -69,6 +71,7 @@
         }
     }
 
+    @Override
     public AccessibleContext getAccessibleContext() {
         toolkit.lockAWT();
         try {
@@ -78,14 +81,17 @@
         }
     }
 
+    @Override
     AccessibleContext createAccessibleContext() {
         return new AccessibleAWTPanel();
     }
 
+    @Override
     ComponentBehavior createBehavior() {
         return new HWBehavior(this);
     }
 
+    @Override
     String autoName() {
         return ("panel" + toolkit.autoNumber.nextPanel++);
     }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Point.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Point.java?view=diff&rev=441863&r1=441862&r2=441863
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Point.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Point.java Sat Sep  9 14:56:46 2006
@@ -41,6 +41,7 @@
         setLocation(p.x, p.y);
     }
 
+    @Override
     public boolean equals(Object obj) {
         if (obj == this) {
             return true;
@@ -52,14 +53,17 @@
         return false;
     }
 
+    @Override
     public String toString() {
         return getClass().getName() + "[x=" + x + ",y=" + y + "]";
     }
 
+    @Override
     public double getX() {
         return x;
     }
 
+    @Override
     public double getY() {
         return y;
     }
@@ -77,6 +81,7 @@
         this.y = y;
     }
 
+    @Override
     public void setLocation(double x, double y) {
         setLocation((int)Math.round(x), (int)Math.round(y));
     }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/PopupBox.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/PopupBox.java?view=diff&rev=441863&r1=441862&r2=441863
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/PopupBox.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/PopupBox.java Sat Sep  9 14:56:46 2006
@@ -238,8 +238,9 @@
             activeChild.hide();
         }
 
-        if (nativeWindow != null)
+        if (nativeWindow != null) {
             nativeWindow.setVisible(false);
+        }
 
         if (parent != null) {
             parent.activeChild = null;

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/PopupMenu.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/PopupMenu.java?view=diff&rev=441863&r1=441862&r2=441863
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/PopupMenu.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/PopupMenu.java Sat Sep  9 14:56:46 2006
@@ -33,6 +33,7 @@
 
         private static final long serialVersionUID = -4282044795947239955L;
 
+        @Override
         public AccessibleRole getAccessibleRole() {
             return AccessibleRole.POPUP_MENU;
         }
@@ -57,6 +58,7 @@
         }
     }
 
+    @Override
     public void addNotify() {
         toolkit.lockAWT();
         try {
@@ -66,6 +68,7 @@
         }
     }
 
+    @Override
     public AccessibleContext getAccessibleContext() {
         toolkit.lockAWT();
         try {
@@ -128,6 +131,7 @@
         super.show(originLocation.x + x, originLocation.y + y, true);
     }
 
+    @Override
     void hide() {
         if (!isVisible()) {
             return;
@@ -136,10 +140,12 @@
         super.hide();
     }
 
+    @Override
     boolean hasDefaultFont() {
         return true;
     }
 
+    @Override
     AccessibleContext createAccessibleContext() {
         return new AccessibleAWTPopupMenu();
     }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/PrintJob.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/PrintJob.java?view=diff&rev=441863&r1=441862&r2=441863
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/PrintJob.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/PrintJob.java Sat Sep  9 14:56:46 2006
@@ -31,6 +31,7 @@
 
     public abstract void end();
 
+    @Override
     public void finalize(){
         end();
     }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Rectangle.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Rectangle.java?view=diff&rev=441863&r1=441862&r2=441863
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Rectangle.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Rectangle.java Sat Sep  9 14:56:46 2006
@@ -59,22 +59,27 @@
         setBounds(0, 0, d.width, d.height);
     }
 
+    @Override
     public double getX() {
         return x;
     }
 
+    @Override
     public double getY() {
         return y;
     }
 
+    @Override
     public double getHeight() {
         return height;
     }
 
+    @Override
     public double getWidth() {
         return width;
     }
 
+    @Override
     public boolean isEmpty() {
         return width <= 0 || height <= 0;
     }
@@ -109,6 +114,7 @@
         setLocation(x, y);
     }
 
+    @Override
     public void setRect(double x, double y, double width, double height) {
         int x1 = (int)Math.floor(x);
         int y1 = (int)Math.floor(y);
@@ -125,10 +131,12 @@
         setBounds(x, y, width, height);
     }
 
+    @Override
     public Rectangle getBounds() {
         return new Rectangle(x, y, width, height);
     }
 
+    @Override
     public Rectangle2D getBounds2D() {
         return getBounds();
     }
@@ -204,6 +212,7 @@
         return contains(px, py);
     }
 
+    @Override
     public Rectangle2D createIntersection(Rectangle2D r) {
         if (r instanceof Rectangle) {
             return intersection((Rectangle) r);
@@ -225,6 +234,7 @@
         return !intersection(r).isEmpty();
     }
 
+    @Override
     public int outcode(double px, double py) {
         int code = 0;
 
@@ -251,6 +261,7 @@
         return code;
     }
 
+    @Override
     public Rectangle2D createUnion(Rectangle2D r) {
         if (r instanceof Rectangle) {
             return union((Rectangle)r);
@@ -266,6 +277,7 @@
         return dst;
     }
 
+    @Override
     public boolean equals(Object obj) {
         if (obj == this) {
             return true;
@@ -277,6 +289,7 @@
         return false;
     }
 
+    @Override
     public String toString() {
         // The output format based on 1.5 release behaviour. It could be obtained in the following way
         // System.out.println(new Rectangle().toString())

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/RedrawManager.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/RedrawManager.java?view=diff&rev=441863&r1=441862&r2=441863
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/RedrawManager.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/RedrawManager.java Sat Sep  9 14:56:46 2006
@@ -39,8 +39,8 @@
     private boolean paintNeeded;
     private boolean updateNeeded;
 
-    private final Map paintRegions = new IdentityHashMap();
-    private final Map updateRegions = new IdentityHashMap();
+    private final Map<Component, MultiRectArea> paintRegions = new IdentityHashMap<Component, MultiRectArea>();
+    private final Map<Component, MultiRectArea> updateRegions = new IdentityHashMap<Component, MultiRectArea>();
 
 
     public RedrawManager(Window window) {
@@ -102,8 +102,8 @@
         }
     }
 
-    private static void addRegion(Map map, Component c, Rectangle r) {
-        MultiRectArea area = (MultiRectArea)map.get(c);
+    private static void addRegion(Map<Component, MultiRectArea> map, Component c, Rectangle r) {
+        MultiRectArea area = map.get(c);
         if (area != null) {
             area.add(r);
         } else {
@@ -113,8 +113,8 @@
 
     }
 
-    private static void addRegion(Map map, Component c, MultiRectArea r) {
-        MultiRectArea area = (MultiRectArea)map.get(c);
+    private static void addRegion(Map<Component, MultiRectArea> map, Component c, MultiRectArea r) {
+        MultiRectArea area = map.get(c);
         if (area != null) {
             area.add(r);
         } else {
@@ -140,11 +140,11 @@
     }
 
     private void subtractPaintFromUpdate() {
-        for (Iterator it = paintRegions.entrySet().iterator(); it.hasNext();) {
-            Map.Entry entry = (Entry)it.next();
+        for (Object name : paintRegions.entrySet()) {
+            Map.Entry<?, ?> entry = (Entry<?, ?>)name;
             Component c = (Component) entry.getKey();
             MultiRectArea paint = (MultiRectArea) entry.getValue();
-            MultiRectArea update = (MultiRectArea) updateRegions.get(c);
+            MultiRectArea update = updateRegions.get(c);
             if (update == null) {
                 continue;
             }
@@ -162,9 +162,9 @@
      *      regions that need to be painted
      * @param eventId - PaintEvent.PAINT or PaintEvent.UPDATE
      */
-    private static void postEvents(Map regions, int eventId) {
-        for (Iterator it = regions.entrySet().iterator(); it.hasNext();) {
-            Map.Entry entry = (Entry)it.next();
+    private static void postEvents(Map<Component, MultiRectArea> regions, int eventId) {
+        for (Object name : regions.entrySet()) {
+            Map.Entry<?, ?> entry = (Entry<?, ?>)name;
             Component c = (Component) entry.getKey();
             if (!c.visible || !c.behaviour.isDisplayable()) {
                 continue;
@@ -205,8 +205,8 @@
 
         synchronized(this) {
             // Now c is heavyweight for sure
-            MultiRectArea paint = (MultiRectArea) paintRegions.get(c);
-            MultiRectArea update = (MultiRectArea) updateRegions.get(c);
+            MultiRectArea paint = paintRegions.get(c);
+            MultiRectArea update = updateRegions.get(c);
 
             if (paint == null && update == null) {
                 return mra;

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/RenderingHints.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/RenderingHints.java?view=diff&rev=441863&r1=441862&r2=441863
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/RenderingHints.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/RenderingHints.java Sat Sep  9 14:56:46 2006
@@ -81,8 +81,9 @@
     public static final Object VALUE_TEXT_ANTIALIAS_OFF = new KeyValue(KEY_TEXT_ANTIALIASING);
 
     public RenderingHints(Map map) {
-        if (map != null)
+        if (map != null) {
             putAll(map);
+        }
     }
 
     public RenderingHints(Key key, Object value) {
@@ -94,18 +95,19 @@
     }
 
     public Object put(Object key, Object value) {
-        if (!((Key)key).isCompatibleValue(value))
+        if (!((Key)key).isCompatibleValue(value)) {
             throw new IllegalArgumentException();
+        }
 
         return map.put(key, value);
     }
 
     public Object remove(Object key) {
-        return map.remove((Key)key);
+        return map.remove(key);
     }
 
     public Object get(Object key) {
-        return map.get((Key)key);
+        return map.get(key);
     }
 
     public Set keySet() {
@@ -142,10 +144,11 @@
     }
 
     public boolean containsKey(Object key) {
-        if (key == null)
+        if (key == null) {
             throw new NullPointerException();
+        }
 
-        return map.containsKey((Key)key);
+        return map.containsKey(key);
     }
 
     public boolean isEmpty() {
@@ -160,34 +163,41 @@
         return map.size();
     }
 
+    @Override
     public boolean equals(Object o) {
-        if (!(o instanceof Map))
+        if (!(o instanceof Map)) {
             return false;
+        }
 
         Map m = (Map)o;
         Set keys = keySet();
-        if (!keys.equals(m.keySet()))
+        if (!keys.equals(m.keySet())) {
             return false;
+        }
 
         Iterator it = keys.iterator();
         while (it.hasNext()) {
             Key key = (Key)it.next();
             Object v1 = get(key);
             Object v2 = m.get(key);
-            if (!(v1==null?v2==null:v1.equals(v2)))
+            if (!(v1==null?v2==null:v1.equals(v2))) {
                 return false;
+            }
         }
         return true;
     }
 
+    @Override
     public int hashCode() {
         return map.hashCode();
     }
 
+    @Override
     public Object clone() {
         return new RenderingHints(map);
     }
 
+    @Override
     public String toString() {
         return "RenderingHints["+map.toString()+"]";
     }
@@ -202,10 +212,12 @@
             this.key = key;
         }
 
+        @Override
         public final boolean equals(Object o) {
             return this == o;
         }
 
+        @Override
         public final int hashCode() {
             return System.identityHashCode(this);
         }
@@ -226,9 +238,11 @@
             super(key);
         }
 
+        @Override
         public boolean isCompatibleValue(Object val) {
-            if (!(val instanceof KeyValue))
+            if (!(val instanceof KeyValue)) {
                 return false;
+            }
 
             return ((KeyValue)val).key == this;
         }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Robot.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Robot.java?view=diff&rev=441863&r1=441862&r2=441863
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Robot.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Robot.java Sat Sep  9 14:56:46 2006
@@ -52,6 +52,7 @@
         nativeRobot = tk.getWTK().getNativeRobot(screen);
     }
 
+    @Override
     public String toString() {
         /* The format is based on 1.5 release behavior 
          * which can be revealed by the following code:

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/ScrollPane.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/ScrollPane.java?view=diff&rev=441863&r1=441862&r2=441863
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/ScrollPane.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/ScrollPane.java Sat Sep  9 14:56:46 2006
@@ -63,6 +63,7 @@
         protected AccessibleAWTScrollPane() {
         }
 
+        @Override
         public AccessibleRole getAccessibleRole() {
             return AccessibleRole.SCROLL_PANE;
         }
@@ -86,6 +87,7 @@
             return getScrollPosition();
         }
 
+        @SuppressWarnings("deprecation")
         public void setLocation(Point p) {
             Component comp = ScrollPane.this.getComponent();
             if (comp != null) {
@@ -186,6 +188,7 @@
         }
     }
 
+    @Override
     public void addNotify() {
         toolkit.lockAWT();
         try {
@@ -195,6 +198,7 @@
         }
     }
 
+    @Override
     public AccessibleContext getAccessibleContext() {
         toolkit.lockAWT();
         try {
@@ -204,6 +208,7 @@
         }
     }
 
+    @Override
     public String paramString() {
         /* The format is based on 1.5 release behavior 
          * which can be revealed by the following code:
@@ -243,6 +248,7 @@
         }
     }
 
+    @Override
     public void doLayout() {
         toolkit.lockAWT();
         try {
@@ -263,6 +269,7 @@
 
     }
 
+    @Override
     public void layout() {
         toolkit.lockAWT();
         try {
@@ -291,6 +298,7 @@
     }
 
 
+    @Override
     protected void processMouseWheelEvent(MouseWheelEvent e) {
         toolkit.lockAWT();
         try {
@@ -301,6 +309,7 @@
         }
     }
 
+    @Override
     protected final void addImpl(Component comp, Object constraints, int index) {
         toolkit.lockAWT();
         try {
@@ -394,6 +403,7 @@
         }
     }
 
+    @Override
     public void printComponents(Graphics g) {
         toolkit.lockAWT();
         try {
@@ -405,6 +415,7 @@
         }       
     }
 
+    @Override
     public final void setLayout(LayoutManager mgr) {
         toolkit.lockAWT();
         try {
@@ -463,14 +474,17 @@
 
     }
 
+    @Override
     ComponentBehavior createBehavior() {
         return new HWBehavior(this);
     }
 
+    @Override
     boolean isPrepainter() {
         return true;
     }
 
+    @Override
     void prepaint(Graphics g) {
         g.setColor(getBackground());
         g.fillRect(0, 0, w, h);
@@ -488,6 +502,7 @@
         return null;
     }
 
+    @Override
     Insets getNativeInsets() {
         if (!isDisplayable()) {
             return super.getNativeInsets();
@@ -498,6 +513,7 @@
         return insets;
     }
 
+    @Override
     String autoName() {
         return ("scrollpane" + toolkit.autoNumber.nextScrollPane++);
     }
@@ -525,6 +541,7 @@
     }
 
 
+    @Override
     AccessibleContext createAccessibleContext() {
         return new AccessibleAWTScrollPane();
     }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/ScrollPaneAdjustable.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/ScrollPaneAdjustable.java?view=diff&rev=441863&r1=441862&r2=441863
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/ScrollPaneAdjustable.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/ScrollPaneAdjustable.java Sat Sep  9 14:56:46 2006
@@ -241,18 +241,22 @@
         blockIncrement = 1;
         stateController = new ScrollbarStateController(state) {
 
+            @Override
             protected void fireEvent() {
                 generateEvent();
             }
 
+            @Override
             protected void repaint(Rectangle r) {
                 doRepaint(r);
             }
 
+            @Override
             protected void repaint() {
                doRepaint();
             }
 
+            @Override
             protected void requestFocus() {
                 // just don't do it
             }
@@ -262,6 +266,7 @@
         comp.addAWTComponentListener(stateController);
     }
 
+    @Override
     public String toString() {
         return (getClass().getName() + "[" + paramString() + "]");
     }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Scrollbar.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Scrollbar.java?view=diff&rev=441863&r1=441862&r2=441863
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Scrollbar.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Scrollbar.java Sat Sep  9 14:56:46 2006
@@ -45,10 +45,12 @@
 
         private static final long serialVersionUID = -344337268523697807L;
 
+        @Override
         public AccessibleRole getAccessibleRole() {
             return AccessibleRole.SCROLL_BAR;
         }
 
+        @Override
         public AccessibleStateSet getAccessibleStateSet() {
             toolkit.lockAWT();
             try {
@@ -71,6 +73,7 @@
             }
         }
 
+        @Override
         public AccessibleValue getAccessibleValue() {
             return this;
         }
@@ -139,18 +142,22 @@
             setBlockIncrement(10);
             stateController = new ScrollbarStateController(state) {
 
+                @Override
                 protected void fireEvent() {
                     generateEvent();
                 }
 
+                @Override
                 protected void repaint(Rectangle r) {
                     doRepaint(r);
                 }
 
+                @Override
                 protected void repaint() {
                    doRepaint();
                 }
 
+                @Override
                 protected void requestFocus() {
                     if (isFocusable()) {
                         Scrollbar.this.requestFocus(false);
@@ -290,6 +297,7 @@
             }
         }
 
+        @Override
         public void calculate() {
             toolkit.theme.calculateScrollbar(state);
         }
@@ -314,6 +322,7 @@
         }
     }
 
+    @Override
     public void addNotify() {
         toolkit.lockAWT();
         try {
@@ -323,6 +332,7 @@
         }
     }
 
+    @Override
     public AccessibleContext getAccessibleContext() {
         toolkit.lockAWT();
         try {
@@ -344,6 +354,7 @@
     /**
      * @deprecated
      */
+    @Deprecated
     public int getLineIncrement() {
         toolkit.lockAWT();
         try {
@@ -383,6 +394,7 @@
     /**
      * @deprecated
      */
+    @Deprecated
     public int getPageIncrement() {
         toolkit.lockAWT();
         try {
@@ -413,6 +425,7 @@
     /**
      * @deprecated
      */
+    @Deprecated
     public int getVisible() {
         toolkit.lockAWT();
         try {
@@ -431,6 +444,7 @@
         }
     }
 
+    @Override
     protected String paramString() {
         /* The format is based on 1.5 release behavior 
          * which can be revealed by the following code:
@@ -464,6 +478,7 @@
     /**
      * @deprecated
      */
+    @Deprecated
     public void setLineIncrement(int v) {
         toolkit.lockAWT();
         try {
@@ -515,6 +530,7 @@
     /**
      * @deprecated
      */
+    @Deprecated
     public void setPageIncrement(int v) {
         toolkit.lockAWT();
         try {
@@ -560,12 +576,12 @@
         }
     }
 
+    @Override
     public EventListener[] getListeners(Class listenerType) {
         if (AdjustmentListener.class.isAssignableFrom(listenerType)) {
             return getAdjustmentListeners();
-        } else {
-            return super.getListeners(listenerType);
         }
+        return super.getListeners(listenerType);
     }
 
     public void addAdjustmentListener(AdjustmentListener l) {
@@ -581,6 +597,7 @@
         getUserListeners(new AdjustmentListener[0]);
     }
 
+    @Override
     protected void processEvent(AWTEvent e) {
         if (toolkit.eventTypeLookup.getEventMask(e) ==
             AWTEvent.ADJUSTMENT_EVENT_MASK) {
@@ -603,14 +620,17 @@
         }
     }
 
+    @Override
     String autoName() {
         return ("scrollbar" + toolkit.autoNumber.nextScrollbar++);
     }
 
+    @Override
     void prepaint(Graphics g) {
         toolkit.theme.drawScrollbar(g, state);
     }
 
+    @Override
     boolean isPrepainter() {
         return true;
     }
@@ -629,15 +649,18 @@
         doRepaint(new Rectangle(new Point(), getSize()));
     }
 
+    @Override
     void setEnabledImpl(boolean value) {
         super.setEnabledImpl(value);
         doRepaint();
     }
 
+    @Override
     ComponentBehavior createBehavior() {
         return new HWBehavior(this);
     }
 
+    @Override
     void validateImpl() {
         super.validateImpl();
         toolkit.theme.calculateScrollbar(state);
@@ -655,10 +678,12 @@
                 getValueIsAdjusting()));
     }
 
+    @Override
     Dimension getDefaultMinimumSize() {
         return state.getDefaultMinimumSize();
     }
 
+    @Override
     void resetDefaultSize() {
         state.reset();
     }
@@ -687,6 +712,7 @@
         }
     }
 
+    @Override
     AccessibleContext createAccessibleContext() {
         return new AccessibleAWTScrollBar();
     }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/SystemColor.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/SystemColor.java?view=diff&rev=441863&r1=441862&r2=441863
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/SystemColor.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/SystemColor.java Sat Sep  9 14:56:46 2006
@@ -142,10 +142,12 @@
     private final transient Toolkit toolkit = Toolkit.getDefaultToolkit();
 
     private final int index;
+    @Override
     public String toString() {
         return getClass().getName() + "[index=" + index + "]";
     }
 
+    @Override
     public int getRGB() {
         return value = getARGB();
     }
@@ -160,6 +162,7 @@
         return toolkit.getWTK().getSystemProperties().getSystemColorARGB(index);
     }
 
+    @Override
     public PaintContext createContext(ColorModel cm, Rectangle r, Rectangle2D r2d, AffineTransform at, RenderingHints rh) {
         return new Color.ColorPaintContext(getRGB());
     }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/TextArea.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/TextArea.java?view=diff&rev=441863&r1=441862&r2=441863
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/TextArea.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/TextArea.java Sat Sep  9 14:56:46 2006
@@ -45,6 +45,7 @@
 
         private static final long serialVersionUID = 3472827823632144419L;
 
+        @Override
         public AccessibleStateSet getAccessibleStateSet() {
             AccessibleStateSet set = super.getAccessibleStateSet();
             set.add(AccessibleState.MULTI_LINE);
@@ -406,6 +407,7 @@
 //        }
     }
 
+    @Override
     public void addNotify() {
         toolkit.lockAWT();
         try {
@@ -418,10 +420,12 @@
     /**
      * @deprecated
      */
+    @Deprecated
     public void appendText(String str) {
         append(str);
     }
 
+    @Override
     public AccessibleContext getAccessibleContext() {
         toolkit.lockAWT();
         try {
@@ -440,6 +444,7 @@
         }
     }
 
+    @Override
     public Dimension getMinimumSize() {
         toolkit.lockAWT();
         try {
@@ -467,6 +472,7 @@
         }
     }
 
+    @Override
     public Dimension getPreferredSize() {
         toolkit.lockAWT();
         try {
@@ -497,6 +503,7 @@
     /**
      * @deprecated
      */
+    @Deprecated
     public void insertText(String str, int pos) {
         insert(str, pos);
     }
@@ -504,6 +511,9 @@
     /**
      * @deprecated
      */
+    @SuppressWarnings("deprecation")
+    @Deprecated
+    @Override
     public Dimension minimumSize() {
         toolkit.lockAWT();
         try {
@@ -520,6 +530,8 @@
     /**
      * @deprecated
      */
+    @SuppressWarnings("deprecation")
+    @Deprecated
     public Dimension minimumSize(int rows, int columns) {
         toolkit.lockAWT();
         try {
@@ -533,6 +545,7 @@
         }
     }
 
+    @Override
     protected String paramString() {
         /* The format is based on 1.5 release behavior 
          * which can be revealed by the following code:
@@ -567,6 +580,9 @@
     /**
      * @deprecated
      */
+    @SuppressWarnings("deprecation")
+    @Deprecated
+    @Override
     public Dimension preferredSize() {
         toolkit.lockAWT();
         try {
@@ -584,6 +600,8 @@
     /**
      * @deprecated
      */
+    @SuppressWarnings("deprecation")
+    @Deprecated
     public Dimension preferredSize(int rows, int columns) {
         toolkit.lockAWT();
         try {
@@ -626,6 +644,7 @@
     /**
      * @deprecated
      */
+    @Deprecated
     public void replaceText(String str, int start, int end) {
         replaceRange(str, start, end);
     }
@@ -654,14 +673,17 @@
         }
     }
 
+    @Override
     boolean isPrepainter() {
         return true;
     }
 
+    @Override
     Dimension getDefaultMinimumSize() {
         return calcSize(10, 60);
     }
 
+    @Override
     Dimension getDefaultPreferredSize() {
         if (getFont() == null) {
             return null;
@@ -692,6 +714,7 @@
      * x scroll coordinate of point is changed to 0
      * before setting the position.
      */
+    @Override
     void setViewPosition(Point point) {
         if (noHorizontalScroll()) {
             point.x = 0; // don't allow horizontal scrolling
@@ -704,6 +727,7 @@
      * Also updates necessary scrollbar values.
      * @see TextComponent.scrollRectToVisible(Rectangle)
      */
+    @Override
     void scrollRectToVisible(Rectangle r) {
         super.scrollRectToVisible(r);
         // update scrollbar positions:
@@ -715,6 +739,7 @@
         }
     }
 
+    @Override
     AccessibleContext createAccessibleContext() {
         return new AccessibleAWTTextArea();
     }
@@ -744,6 +769,7 @@
         vAdjustable.addAWTAdjustmentListener(stateController);
     }
 
+    @Override
     void prepaint(Graphics g) {
         super.prepaint(g);
         Shape oldClip = g.getClip();
@@ -764,6 +790,7 @@
     /**
      * Adds scrollbar area to default insets
      */
+    @Override
     Insets getInsets() {
         Insets ins = super.getInsets();
         if (scrollable == null) {
@@ -783,6 +810,7 @@
      * Re-calculates internal layout of TextArea:
      * lays out scrollbars and sets their values
      */
+    @Override
     void revalidate() {
         stateController.layoutScrollbars();
         super.revalidate();
@@ -793,6 +821,7 @@
      * visible part(which is component's bounds),
      * relative to TextArea origin
      */
+    @Override
     Rectangle getModelRect() {
         Rectangle mRect = super.getModelRect();
         if (noHorizontalScroll()) {
@@ -813,6 +842,7 @@
         return filter;
     }
 
+    @Override
     MouseMotionListener getMotionHandler() {
         if (filter == null) {
             filter = createFilter();
@@ -820,6 +850,7 @@
         return filter;
     }
 
+    @Override
     MouseListener getMouseHandler() {
         if (filter == null) {
             filter = createFilter();
@@ -827,6 +858,7 @@
         return filter;
     }
     
+    @Override
     String autoName() {        
         return ("text" + toolkit.autoNumber.nextTextArea++);
     }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/TextComponent.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/TextComponent.java?view=diff&rev=441863&r1=441862&r2=441863
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/TextComponent.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/TextComponent.java Sat Sep  9 14:56:46 2006
@@ -21,6 +21,7 @@
 
 import java.awt.event.FocusEvent;
 import java.awt.event.FocusListener;
+import java.awt.event.InputEvent;
 import java.awt.event.KeyEvent;
 import java.awt.event.KeyListener;
 import java.awt.event.MouseEvent;
@@ -53,6 +54,7 @@
 
 import org.apache.harmony.awt.state.TextComponentState;
 import org.apache.harmony.awt.text.AWTTextAction;
+import org.apache.harmony.awt.text.ActionNames;
 import org.apache.harmony.awt.text.ActionSet;
 import org.apache.harmony.awt.text.RootViewContext;
 import org.apache.harmony.awt.text.TextCaret;
@@ -68,56 +70,56 @@
      */
     static class KeyMap {
 
-        private static final HashMap actions = new HashMap();
+        private static final HashMap<AWTKeyStroke, Object> actions = new HashMap<AWTKeyStroke, Object>();
 
         static {
-            add(KeyEvent.VK_ENTER, 0, ActionSet.insertBreakAction);
-            add(KeyEvent.VK_TAB, 0, ActionSet.insertTabAction);
-            add(KeyEvent.VK_DELETE, 0, ActionSet.deleteNextCharAction);
-            add(KeyEvent.VK_BACK_SPACE, 0, ActionSet.deletePrevCharAction);
-
-            add(KeyEvent.VK_LEFT, 0, ActionSet.backwardAction);
-            add(KeyEvent.VK_RIGHT, 0, ActionSet.forwardAction);
-            add(KeyEvent.VK_UP, 0, ActionSet.upAction);
-            add(KeyEvent.VK_DOWN, 0, ActionSet.downAction);
-
-            add(KeyEvent.VK_HOME, 0, ActionSet.beginLineAction);
-            add(KeyEvent.VK_END, 0, ActionSet.endLineAction);
-            add(KeyEvent.VK_PAGE_UP, 0, ActionSet.pageUpAction);
-            add(KeyEvent.VK_PAGE_DOWN, 0, ActionSet.pageDownAction);
-
-            add(KeyEvent.VK_RIGHT, KeyEvent.CTRL_MASK, ActionSet.nextWordAction);
-            add(KeyEvent.VK_LEFT, KeyEvent.CTRL_MASK, ActionSet.previousWordAction);
-            add(KeyEvent.VK_PAGE_UP, KeyEvent.CTRL_MASK, ActionSet.beginAction);
-            add(KeyEvent.VK_PAGE_DOWN, KeyEvent.CTRL_MASK, ActionSet.endAction);
-            add(KeyEvent.VK_HOME, KeyEvent.CTRL_MASK, ActionSet.beginAction);
-            add(KeyEvent.VK_END, KeyEvent.CTRL_MASK, ActionSet.endAction);
-
-            add(KeyEvent.VK_LEFT, KeyEvent.SHIFT_MASK, ActionSet.selectionBackwardAction);
-            add(KeyEvent.VK_RIGHT, KeyEvent.SHIFT_MASK, ActionSet.selectionForwardAction);
-            add(KeyEvent.VK_UP, KeyEvent.SHIFT_MASK, ActionSet.selectionUpAction);
-            add(KeyEvent.VK_DOWN, KeyEvent.SHIFT_MASK, ActionSet.selectionDownAction);
-
-            add(KeyEvent.VK_HOME, KeyEvent.SHIFT_MASK, ActionSet.selectionBeginLineAction);
-            add(KeyEvent.VK_END, KeyEvent.SHIFT_MASK, ActionSet.selectionEndLineAction);
-            add(KeyEvent.VK_PAGE_UP, KeyEvent.SHIFT_MASK, ActionSet.selectionPageUpAction);
-            add(KeyEvent.VK_PAGE_DOWN, KeyEvent.SHIFT_MASK, ActionSet.selectionPageDownAction);
-
-            add(KeyEvent.VK_LEFT, KeyEvent.CTRL_MASK|KeyEvent.SHIFT_MASK,
-                    ActionSet.selectionPreviousWordAction);
-            add(KeyEvent.VK_RIGHT, KeyEvent.CTRL_MASK|KeyEvent.SHIFT_MASK,
-                    ActionSet.selectionNextWordAction);
-            add(KeyEvent.VK_PAGE_UP, KeyEvent.CTRL_MASK|KeyEvent.SHIFT_MASK,
-                    ActionSet.selectionBeginAction);
-            add(KeyEvent.VK_PAGE_DOWN, KeyEvent.CTRL_MASK|KeyEvent.SHIFT_MASK,
-                    ActionSet.selectionEndAction);
-            add(KeyEvent.VK_A, KeyEvent.CTRL_MASK, ActionSet.selectAllAction);
-
-            add(KeyEvent.VK_INSERT, KeyEvent.SHIFT_MASK, ActionSet.pasteAction);
-            add(KeyEvent.VK_V, KeyEvent.CTRL_MASK, ActionSet.pasteAction);
-            add(KeyEvent.VK_INSERT, KeyEvent.CTRL_MASK, ActionSet.copyAction);
-            add(KeyEvent.VK_C, KeyEvent.CTRL_MASK, ActionSet.copyAction);
-            add(KeyEvent.VK_X, KeyEvent.CTRL_MASK, ActionSet.cutAction);
+            add(KeyEvent.VK_ENTER, 0, ActionNames.insertBreakAction);
+            add(KeyEvent.VK_TAB, 0, ActionNames.insertTabAction);
+            add(KeyEvent.VK_DELETE, 0, ActionNames.deleteNextCharAction);
+            add(KeyEvent.VK_BACK_SPACE, 0, ActionNames.deletePrevCharAction);
+
+            add(KeyEvent.VK_LEFT, 0, ActionNames.backwardAction);
+            add(KeyEvent.VK_RIGHT, 0, ActionNames.forwardAction);
+            add(KeyEvent.VK_UP, 0, ActionNames.upAction);
+            add(KeyEvent.VK_DOWN, 0, ActionNames.downAction);
+
+            add(KeyEvent.VK_HOME, 0, ActionNames.beginLineAction);
+            add(KeyEvent.VK_END, 0, ActionNames.endLineAction);
+            add(KeyEvent.VK_PAGE_UP, 0, ActionNames.pageUpAction);
+            add(KeyEvent.VK_PAGE_DOWN, 0, ActionNames.pageDownAction);
+
+            add(KeyEvent.VK_RIGHT, InputEvent.CTRL_MASK, ActionNames.nextWordAction);
+            add(KeyEvent.VK_LEFT, InputEvent.CTRL_MASK, ActionNames.previousWordAction);
+            add(KeyEvent.VK_PAGE_UP, InputEvent.CTRL_MASK, ActionNames.beginAction);
+            add(KeyEvent.VK_PAGE_DOWN, InputEvent.CTRL_MASK, ActionNames.endAction);
+            add(KeyEvent.VK_HOME, InputEvent.CTRL_MASK, ActionNames.beginAction);
+            add(KeyEvent.VK_END, InputEvent.CTRL_MASK, ActionNames.endAction);
+
+            add(KeyEvent.VK_LEFT, InputEvent.SHIFT_MASK, ActionNames.selectionBackwardAction);
+            add(KeyEvent.VK_RIGHT, InputEvent.SHIFT_MASK, ActionNames.selectionForwardAction);
+            add(KeyEvent.VK_UP, InputEvent.SHIFT_MASK, ActionNames.selectionUpAction);
+            add(KeyEvent.VK_DOWN, InputEvent.SHIFT_MASK, ActionNames.selectionDownAction);
+
+            add(KeyEvent.VK_HOME, InputEvent.SHIFT_MASK, ActionNames.selectionBeginLineAction);
+            add(KeyEvent.VK_END, InputEvent.SHIFT_MASK, ActionNames.selectionEndLineAction);
+            add(KeyEvent.VK_PAGE_UP, InputEvent.SHIFT_MASK, ActionNames.selectionPageUpAction);
+            add(KeyEvent.VK_PAGE_DOWN, InputEvent.SHIFT_MASK, ActionNames.selectionPageDownAction);
+
+            add(KeyEvent.VK_LEFT, InputEvent.CTRL_MASK|InputEvent.SHIFT_MASK,
+                    ActionNames.selectionPreviousWordAction);
+            add(KeyEvent.VK_RIGHT, InputEvent.CTRL_MASK|InputEvent.SHIFT_MASK,
+                    ActionNames.selectionNextWordAction);
+            add(KeyEvent.VK_PAGE_UP, InputEvent.CTRL_MASK|InputEvent.SHIFT_MASK,
+                    ActionNames.selectionBeginAction);
+            add(KeyEvent.VK_PAGE_DOWN, InputEvent.CTRL_MASK|InputEvent.SHIFT_MASK,
+                    ActionNames.selectionEndAction);
+            add(KeyEvent.VK_A, InputEvent.CTRL_MASK, ActionNames.selectAllAction);
+
+            add(KeyEvent.VK_INSERT, InputEvent.SHIFT_MASK, ActionNames.pasteAction);
+            add(KeyEvent.VK_V, InputEvent.CTRL_MASK, ActionNames.pasteAction);
+            add(KeyEvent.VK_INSERT, InputEvent.CTRL_MASK, ActionNames.copyAction);
+            add(KeyEvent.VK_C, InputEvent.CTRL_MASK, ActionNames.copyAction);
+            add(KeyEvent.VK_X, InputEvent.CTRL_MASK, ActionNames.cutAction);
 
         }
 
@@ -141,10 +143,12 @@
             TextComponent.this.addTextListener(this);
         }
 
+        @Override
         public AccessibleRole getAccessibleRole() {
             return AccessibleRole.TEXT;
         }
 
+        @Override
         public AccessibleStateSet getAccessibleStateSet() {
             AccessibleStateSet result = super.getAccessibleStateSet();
             if (isEditable()) {
@@ -153,6 +157,7 @@
             return result;
         }
 
+        @Override
         public AccessibleText getAccessibleText() {
             return this;
         }
@@ -499,6 +504,7 @@
             textSize.setSize(size);
         }
 
+        @Override
         public boolean isEnabled() {
             return super.isEnabled() && isEditable();
         }
@@ -617,10 +623,12 @@
         return c;
     }
 
+    @Override
     ComponentBehavior createBehavior() {
         return new HWBehavior(this);
     }
 
+    @Override
     public void addNotify() {
 //        toolkit.lockAWT();
 //        try {
@@ -637,6 +645,7 @@
         }
     }
 
+    @Override
     public AccessibleContext getAccessibleContext() {
         toolkit.lockAWT();
         try {
@@ -657,6 +666,7 @@
         }
     }
 
+    @Override
     protected String paramString() {
         /* The format is based on 1.5 release behavior 
          * which can be revealed by the following code:
@@ -674,6 +684,7 @@
         }
     }
 
+    @Override
     public void enableInputMethods(boolean enable) {
         toolkit.lockAWT();
         try {
@@ -684,6 +695,7 @@
         }
     }
 
+    @Override
     public Color getBackground() {
         toolkit.lockAWT();
         try {
@@ -746,6 +758,7 @@
         }
     }
 
+    @Override
     public void removeNotify() {
         toolkit.lockAWT();
         try {
@@ -774,6 +787,7 @@
         }
     }
 
+    @Override
     public void setBackground(Color c) {
         toolkit.lockAWT();
         try {
@@ -863,12 +877,12 @@
         }
     }
 
-    public EventListener[] getListeners(Class listenerType) {
+    @Override
+    public EventListener[] getListeners(Class<?> listenerType) {
         if (TextListener.class.isAssignableFrom(listenerType)) {
             return getTextListeners();
-        } else {
-            return super.getListeners(listenerType);
         }
+        return super.getListeners(listenerType);
     }
 
     public void addTextListener(TextListener l) {
@@ -888,6 +902,7 @@
         return (TextListener[]) textListeners.getUserListeners(new TextListener[0]);
     }
 
+    @Override
     protected void processEvent(AWTEvent e) {
         if (toolkit.eventTypeLookup.getEventMask(e) == AWTEvent.TEXT_EVENT_MASK) {
             processTextEvent((TextEvent) e);
@@ -897,7 +912,7 @@
     }
 
     protected void processTextEvent(TextEvent e) {
-        for (Iterator i = textListeners.getUserIterator(); i.hasNext();) {
+        for (Iterator<?> i = textListeners.getUserIterator(); i.hasNext();) {
             TextListener listener = (TextListener) i.next();
 
             switch (e.getID()) {
@@ -1014,6 +1029,7 @@
         postEvent(new TextEvent(this, TextEvent.TEXT_VALUE_CHANGED));
     }
 
+    @Override
     void prepaint(Graphics g) {
 
         toolkit.theme.drawTextComponentBackground(g, state);
@@ -1033,15 +1049,18 @@
         g.setClip(oldClip);
     }
 
+    @Override
     Insets getNativeInsets() {
         return (Insets) BORDER.clone();
     }
 
+    @Override
     Insets getInsets() {
         // to be overridden by TextArea
         return getNativeInsets();
     }
 
+    @Override
     AccessibleContext createAccessibleContext() {
         return new AccessibleAWTTextComponent();
     }
@@ -1123,6 +1142,7 @@
         throw new BadLocationException(s, i);
     }
 
+    @Override
     void setEnabledImpl(boolean value) {        
         super.setEnabledImpl(value);
         if (isShowing()) {
@@ -1130,6 +1150,7 @@
         }
     }
     
+    @Override
     void postprocessEvent(AWTEvent e, long eventMask) {
         // have to call system listeners without AWT lock
         // to avoid deadlocks in code common with UI text

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/TextField.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/TextField.java?view=diff&rev=441863&r1=441862&r2=441863
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/TextField.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/TextField.java Sat Sep  9 14:56:46 2006
@@ -36,11 +36,11 @@
 import javax.swing.text.View;
 
 import org.apache.harmony.awt.text.AWTTextAction;
+import org.apache.harmony.awt.text.ActionNames;
 import org.apache.harmony.awt.text.ActionSet;
 import org.apache.harmony.awt.text.PropertyNames;
 import org.apache.harmony.awt.text.TextFactory;
 import org.apache.harmony.awt.text.TextFieldKit;
-import org.apache.harmony.awt.text.TextKit;
 
 
 public class TextField extends TextComponent {
@@ -49,6 +49,7 @@
 
         private static final long serialVersionUID = 6219164359235943158L;
 
+        @Override
         public AccessibleStateSet getAccessibleStateSet() {
             AccessibleStateSet set = super.getAccessibleStateSet();
             set.add(AccessibleState.SINGLE_LINE);
@@ -153,6 +154,7 @@
             setTextFieldKit(new TextFieldKitImpl());            
             this.columns = Math.max(0, columns);
             addAWTKeyListener(new KeyAdapter() {
+                @Override
                 public void keyPressed(KeyEvent e) {
                     if ((e.getKeyCode() == KeyEvent.VK_ENTER) &&
                         !e.isAltDown() && !e.isControlDown()) {
@@ -166,6 +168,7 @@
         setText(text);
     }
 
+    @Override
     public void addNotify() {
         document.putProperty(PropertyNames.FILTER_NEW_LINES, Boolean.TRUE);
         setText(getText()); // remove all new lines in already existing text
@@ -177,6 +180,7 @@
         }
     }
 
+    @Override
     public AccessibleContext getAccessibleContext() {
         toolkit.lockAWT();
         try {
@@ -195,6 +199,7 @@
         }
     }
 
+    @Override
     public Dimension getMinimumSize() {
         toolkit.lockAWT();
         try {
@@ -213,6 +218,7 @@
         }
     }
 
+    @Override
     public Dimension getPreferredSize() {
         toolkit.lockAWT();
         try {
@@ -234,6 +240,8 @@
     /**
      * @deprecated
      */
+    @SuppressWarnings("deprecation")
+    @Deprecated
     public Dimension minimumSize(int columns) {
         toolkit.lockAWT();
         try {
@@ -262,6 +270,9 @@
     /**
      * @deprecated
      */
+    @SuppressWarnings("deprecation")
+    @Deprecated
+    @Override
     public Dimension minimumSize() {
         toolkit.lockAWT();
         try {
@@ -275,6 +286,7 @@
         }
     }
 
+    @Override
     protected String paramString() {
         /* The format is based on 1.5 release behavior 
          * which can be revealed by the following code:
@@ -299,6 +311,8 @@
     /**
      * @deprecated
      */
+    @SuppressWarnings("deprecation")
+    @Deprecated
     public Dimension preferredSize(int columns) {
         toolkit.lockAWT();
         try {
@@ -315,6 +329,9 @@
     /**
      * @deprecated
      */
+    @SuppressWarnings("deprecation")
+    @Deprecated
+    @Override
     public Dimension preferredSize() {
         toolkit.lockAWT();
         try {
@@ -340,6 +357,7 @@
         }
     }
 
+    @Override
     public void setText(String text) {
         super.setText(text); // no AWT lock here!
     }
@@ -379,12 +397,12 @@
         repaint();
     }
 
+    @Override
     public EventListener[] getListeners(Class listenerType) {
         if (ActionListener.class.isAssignableFrom(listenerType)) {
             return getActionListeners();
-        } else {
-            return super.getListeners(listenerType);
         }
+        return super.getListeners(listenerType);
     }
 
     public void addActionListener(ActionListener l) {
@@ -399,6 +417,7 @@
         return (ActionListener[]) actionListeners.getUserListeners(new ActionListener[0]);
     }
 
+    @Override
     protected void processEvent(AWTEvent e) {
         if (toolkit.eventTypeLookup.getEventMask(e) == AWTEvent.ACTION_EVENT_MASK) {
             processActionEvent((ActionEvent) e);
@@ -419,6 +438,7 @@
         }
     }
 
+    @Override
     boolean isPrepainter() {
         return true;
     }
@@ -427,16 +447,19 @@
      * Creates password view instead of default plain view.
      * Necessary to be able to set echo character.
      */
+    @Override
     View createView() {
         TextFactory factory = TextFactory.getTextFactory();
         View v = factory.createPasswordView(document.getDefaultRootElement());
         return v;
     }
 
+    @Override
     Dimension getDefaultMinimumSize() {
         return calcSize(getText().length());
     }
 
+    @Override
     Dimension getDefaultPreferredSize() {
         if (getFont() == null) {
             return null;
@@ -456,6 +479,7 @@
      * visible. Uses bounded range model value for
      * scrolling. Repaints TextField.
      */
+    @Override
     void scrollRectToVisible(Rectangle r) {
         int x = r.x;
         Insets insets = getTextFieldKit().getInsets();
@@ -478,6 +502,7 @@
      * Returns just the same rectangle as getClient().
      * Bounded range model takes care of actual text size.
      */
+    @Override
     Rectangle getModelRect() {
         return getClient();
     }
@@ -496,10 +521,12 @@
         return (diff >= 0) ? diff + 1 : 0;
     }
 
+    @Override
     AccessibleContext createAccessibleContext() {
         return new AccessibleAWTTextField();
     }
     
+    @Override
     String autoName() {        
         return ("textfield" + toolkit.autoNumber.nextTextField++);
     }
@@ -508,8 +535,9 @@
      * Handles text actions.
      * Ignores new line insertion into text.
      */
+    @Override
     void performTextAction(AWTTextAction action) {
-        if (action != ActionSet.actionMap.get(ActionSet.insertBreakAction)) {
+        if (action != ActionSet.actionMap.get(ActionNames.insertBreakAction)) {
             super.performTextAction(action);
         }
     }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/TexturePaint.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/TexturePaint.java?view=diff&rev=441863&r1=441862&r2=441863
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/TexturePaint.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/TexturePaint.java Sat Sep  9 14:56:46 2006
@@ -68,27 +68,24 @@
             {
                 if (bilinear) {
                     return new TexturePaintContext.IntBilinear(img, anchor, t);
-                } else {
-                    return new TexturePaintContext.IntSimple(img, anchor, t);
                 }
+                return new TexturePaintContext.IntSimple(img, anchor, t);
             }
         } else
         if (buf instanceof DataBufferByte) {
             if (type == BufferedImage.TYPE_BYTE_GRAY) {
                 if (bilinear) {
                     return new TexturePaintContext.ByteBilinear(img, anchor, t);
-                } else {
-                    return new TexturePaintContext.ByteSimple(img, anchor, t);
                 }
+                return new TexturePaintContext.ByteSimple(img, anchor, t);
             }
         } else
         if (buf instanceof DataBufferUShort) {
             if (type == BufferedImage.TYPE_USHORT_GRAY) {
                 if (bilinear) {
                     return new TexturePaintContext.ShortBilinear(img, anchor, t);
-                } else {
-                    return new TexturePaintContext.ShortSimple(img, anchor, t);
                 }
+                return new TexturePaintContext.ShortSimple(img, anchor, t);
             }
         }
         if (bilinear) {
@@ -169,7 +166,7 @@
     int srcHeight;
     
     /**
-     * The tempopary pre-calculated tempopary values
+     * The temporary pre-calculated temporary values
      */
     int sx, sy, hx, hy, vx, vy;
     int m00, m01, m10, m11;
@@ -182,7 +179,7 @@
     int[] weight = new int[4];
     
     /**
-     * The tempopary values  
+     * The temporary values  
      */
     int[] value = new int[4];
 
@@ -199,6 +196,7 @@
             super(img, anchor, t);
         }
 
+        @Override
         public Raster getRaster(int dstX, int dstY, int dstWidth, int dstHeight) {
             prepare(dstX, dstY, dstWidth, dstHeight);
             int[] src = access.getDataInt(srcBuf);
@@ -231,6 +229,7 @@
             super(img, anchor, t);
         }
 
+        @Override
         public Raster getRaster(int dstX, int dstY, int dstWidth, int dstHeight) {
             prepare(dstX, dstY, dstWidth, dstHeight);
             byte[] src = access.getDataByte(srcBuf);
@@ -263,6 +262,7 @@
             super(img, anchor, t);
         }
 
+        @Override
         public Raster getRaster(int dstX, int dstY, int dstWidth, int dstHeight) {
             prepare(dstX, dstY, dstWidth, dstHeight);
             short[] src = access.getDataUShort(srcBuf);
@@ -294,6 +294,7 @@
             super(img, anchor, t);
         }
 
+        @Override
         public Raster getRaster(int dstX, int dstY, int dstWidth, int dstHeight) {
             prepare(dstX, dstY, dstWidth, dstHeight);
             for(int j = 0; j < dstHeight; j++) {
@@ -323,6 +324,7 @@
             super(img, anchor, t);
         }
 
+        @Override
         public Raster getRaster(int dstX, int dstY, int dstWidth, int dstHeight) {
             prepare(dstX, dstY, dstWidth, dstHeight);
             int[] src = access.getDataInt(srcBuf);
@@ -388,6 +390,7 @@
             super(img, anchor, t);
         }
 
+        @Override
         public Raster getRaster(int dstX, int dstY, int dstWidth, int dstHeight) {
             prepare(dstX, dstY, dstWidth, dstHeight);
             byte[] src = access.getDataByte(srcBuf);
@@ -448,6 +451,7 @@
             super(img, anchor, t);
         }
 
+        @Override
         public Raster getRaster(int dstX, int dstY, int dstWidth, int dstHeight) {
             prepare(dstX, dstY, dstWidth, dstHeight);
             short[] src = access.getDataUShort(srcBuf);
@@ -512,6 +516,7 @@
             super(img, anchor, t);
         }
 
+        @Override
         public Raster getRaster(int dstX, int dstY, int dstWidth, int dstHeight) {
             prepare(dstX, dstY, dstWidth, dstHeight);
             for(int j = 0; j < dstHeight; j++) {
@@ -609,7 +614,7 @@
     }
 
     /**
-     * Checks point overrunning of texture anchor 
+     * Checks point overrun of texture anchor 
      */
     int check(int value, int max) {
         if (value >= max) {
@@ -619,7 +624,7 @@
     }
 
     /**
-     * Checks point overrunning of texture anchor 
+     * Checks point overrun of texture anchor 
      */
     int check2(int value, int max) {
         value = value % max;



Mime
View raw message