harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ndbe...@apache.org
Subject svn commit: r465981 [2/3] - in /incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java: common/org/apache/harmony/awt/im/ common/org/apache/harmony/awt/nativebridge/ common/org/apache/harmony/awt/state/ common/org/apache/harmony/awt/text/ ...
Date Fri, 20 Oct 2006 04:23:24 GMT
Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/font/NativeFont.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/font/NativeFont.java?view=diff&rev=465981&r1=465980&r2=465981
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/font/NativeFont.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/font/NativeFont.java Thu Oct 19 21:23:21 2006
@@ -21,11 +21,9 @@
 package org.apache.harmony.awt.gl.font;
 
 import java.awt.Font;
-
-import java.util.*;
-
-import org.apache.harmony.awt.gl.font.FontManager;
-import org.apache.harmony.awt.gl.font.Glyph;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.util.Hashtable;
 
 public class NativeFont {
 
@@ -33,33 +31,33 @@
      * List of family indexes in families array corresponding to the faces 
      * indexing.
      */
-    public static int[] famIndices = null;
+    public static int[] famIndices;
     /**
      * List of font styles of system fonts initialized using GDI
      * corresponding to faces indexing.
      */
-    public static int[] fontStyles = null;
+    public static int[] fontStyles;
 
     /**
      * List of font types of system fonts initialized using GDI 
      * corresponding to the faces indexing.
      */
-    public static int[] fontTypes = null;
+    public static int[] fontTypes;
 
     /**
      * List of font types of system fonts initialized using GDI.
      */
-    public static String[] faces =  null;
+    public static String[] faces;
 
     /**
      * The number of different fonts installed onto the system.
      */
-    public static int fontsCount = 0;
+    public static int fontsCount;
 
     /**
      * List of all families installed onto the system.
      */
-    public static String[] families= null;
+    public static String[] families;
 
     /**
      * Native method returns list of all families installed onto the system.
@@ -67,7 +65,7 @@
     public static native String[] getFontFamiliesNames();
 
     /** 
-     * Adds font resourse from file to the system. Returns true if font was added
+     * Adds font resource from file to the system. Returns true if font was added
      * successfully, false otherwise.
      *  
      * @param absolutePath String that represent absolute path to the font resource. 
@@ -75,7 +73,7 @@
     public static native boolean embedFontNative(String absolutePath);
 
     /** 
-     * Initiailze native GDI font object and return font handle, also sets font 
+     * Initialize native GDI font object and return font handle, also sets font 
      * type and unicode ranges to the font peer parameter.
      * 
      * @param winFont Windows font peer
@@ -265,7 +263,7 @@
     
     /**
      * Draws string at the specified coordinates using GDI+ objects defined in graphics info.
-     * This method is applicable for drawing without affine transformes.
+     * This method is applicable for drawing without affine transforms.
      */
     public static native int gdiPlusDrawText(long graphicsInfo, String text, int length, long font,
             float xOffset, float yOffset);
@@ -332,7 +330,7 @@
     /**
      * Initializes LCID table
      */
-    public static void initLCIDsTable(Hashtable ht){
+    public static void initLCIDsTable(Hashtable<String, Short> ht){
         int count = nativeInitLCIDsTable(null, null);
 
         if (count != 0){
@@ -438,10 +436,10 @@
     }
 
     /**
-     * Returns font family name that corresposnds to the face name with 
+     * Returns font family name that corresponds to the face name with 
      * specified index.
      *   
-     * @param faceIndex index of the font face name wich family name 
+     * @param faceIndex index of the font face name which family name 
      * is to be returned 
      */
     public static String getFamily(int faceIndex){
@@ -449,10 +447,10 @@
     }
 
     /**
-     * Returns font family style that corresposnds to the face name with 
+     * Returns font family style that corresponds to the face name with 
      * specified index.
      *   
-     * @param faceIndex index of the font face name wich style is to be returned 
+     * @param faceIndex index of the font face name which style is to be returned 
      */
     public static int getFontStyle(int faceIndex){
         return fontStyles[faceIndex];
@@ -527,9 +525,9 @@
 
     static void loadLibrary() {
         if(!isLibLoaded) {
-            java.security.AccessController.doPrivileged(
-                  new java.security.PrivilegedAction() {
-                    public Object run() {
+            AccessController.doPrivileged(
+                  new PrivilegedAction<Void>() {
+                    public Void run() {
                         System.loadLibrary("fontlib");
                         return null;
                     }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/font/WinFontManager.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/font/WinFontManager.java?view=diff&rev=465981&r1=465980&r2=465981
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/font/WinFontManager.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/font/WinFontManager.java Thu Oct 19 21:23:21 2006
@@ -54,7 +54,7 @@
             "EASTEUROPE_CHARSET", "RUSSIAN_CHARSET", "MAC_CHARSET", "BALTIC_CHARSET"
     };
 
-    /** WinFontManager singleton instanse */
+    /** WinFontManager singleton instance */
     public static final WinFontManager inst = new WinFontManager();
 
     private WinFontManager() {
@@ -62,6 +62,7 @@
         initFontProperties();
     }
 
+    @Override
     public void initLCIDTable(){
         NativeFont.initLCIDsTable(this.tableLCID);
     }
@@ -71,7 +72,7 @@
      * property file.
      * 
      * @return true is success, false if font property doesn't exist or doesn't
-     * contain roperties. 
+     * contain properties. 
      */
     public boolean initFontProperties(){
         File fpFile = getFontPropertyFile();
@@ -84,9 +85,9 @@
             return false;
         }
 
-        for (int i=0; i < LOGICAL_FONT_NAMES.length; i++){
+        for (String element : LOGICAL_FONT_NAMES) {
             for (int j=0; j < STYLE_NAMES.length; j++){
-                Vector propsVector = new Vector();
+                Vector<FontProperty> propsVector = new Vector<FontProperty>();
 
                 // Number of entries for a logical font
                 int numComp = 0;
@@ -96,12 +97,12 @@
 
                 while(moreEntries){
                     // Component Font Mappings property name
-                    String property = FONT_MAPPING_KEYS[0].replaceAll("LogicalFontName", LOGICAL_FONT_NAMES[i]).replaceAll("StyleName", STYLE_NAMES[j]).replaceAll("ComponentIndex", String.valueOf(numComp));
+                    String property = FONT_MAPPING_KEYS[0].replaceAll("LogicalFontName", element).replaceAll("StyleName", STYLE_NAMES[j]).replaceAll("ComponentIndex", String.valueOf(numComp));
                     value = props.getProperty(property);
 
                     // If the StyleName is omitted, it's assumed to be plain
                     if ((j == 0) && (value == null)){
-                        property = FONT_MAPPING_KEYS[1].replaceAll("LogicalFontName", LOGICAL_FONT_NAMES[i]).replaceAll("ComponentIndex", String.valueOf(numComp));
+                        property = FONT_MAPPING_KEYS[1].replaceAll("LogicalFontName", element).replaceAll("ComponentIndex", String.valueOf(numComp));
                         value = props.getProperty(property);
                     }
 
@@ -125,11 +126,11 @@
                         String fileName = props.getProperty(FONT_FILE_NAME.replaceAll("PlatformFontName", fontName).replaceAll(" ", "_"));
 
                         // Exclusion Ranges property value
-                        String exclString = props.getProperty(EXCLUSION_RANGES.replaceAll("LogicalFontName", LOGICAL_FONT_NAMES[i]).replaceAll("ComponentIndex", String.valueOf(numComp)));
+                        String exclString = props.getProperty(EXCLUSION_RANGES.replaceAll("LogicalFontName", element).replaceAll("ComponentIndex", String.valueOf(numComp)));
                         int[] exclRange = parseIntervals(exclString);
 
                         // Component Font Character Encodings property value
-                        String encoding = props.getProperty(FONT_CHARACTER_ENCODING.replaceAll("LogicalFontName", LOGICAL_FONT_NAMES[i]).replaceAll("ComponentIndex", String.valueOf(numComp)));
+                        String encoding = props.getProperty(FONT_CHARACTER_ENCODING.replaceAll("LogicalFontName", element).replaceAll("ComponentIndex", String.valueOf(numComp)));
 
                         FontProperty fp = new WinFontProperty(fileName, fontName, charset, j, exclRange, encoding);
                         propsVector.add(fp);
@@ -138,7 +139,7 @@
                         moreEntries = false;
                     }
                 }
-                fProperties.put(LOGICAL_FONT_NAMES[i] + "." + j, propsVector);
+                fProperties.put(element + "." + j, propsVector);
             }
         }
 
@@ -146,14 +147,17 @@
 
     }
     
+    @Override
     public int getFaceIndex(String faceName){
         for (int i=0; i<NativeFont.faces.length; i++ ){
-            if (NativeFont.faces[i].equalsIgnoreCase(faceName))
+            if (NativeFont.faces[i].equalsIgnoreCase(faceName)) {
                 return i;
+            }
         }
         return -1;
     }
 
+    @Override
     public Font[] getAllFonts() {
         String faces[] = NativeFont.getAvailableFaces();
         int count = faces.length;
@@ -166,6 +170,7 @@
         return fonts;
     }
 
+    @Override
     public String[] getAllFamilies() {
         if (allFamilies == null){
             allFamilies = NativeFont.getFamilies();
@@ -173,6 +178,7 @@
         return allFamilies;
     }
 
+    @Override
     public FontPeer createPhysicalFontPeer(String name, int style, int size) {
         WindowsFont peer;
         if (isFamilyExist(name)){
@@ -192,6 +198,7 @@
         return null;
     }
 
+    @Override
     public FontPeer createDefaultFont(int style, int size) {
         return new WindowsFont(DEFAULT_NAME, style, size);
     }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/font/WinFontProperty.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/font/WinFontProperty.java?view=diff&rev=465981&r1=465980&r2=465981
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/font/WinFontProperty.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/font/WinFontProperty.java Thu Oct 19 21:23:21 2006
@@ -28,7 +28,7 @@
 public class WinFontProperty extends FontProperty {
     
     /** charset name that is applicable for windows font.properties */ 
-    String charset = null;
+    String charset;
 
     public WinFontProperty(String _fileName, String _name, String _charset, int _style, int[] exclusionRange, String _encoding){
         this.name = _name;
@@ -39,18 +39,19 @@
         this.encoding = _encoding;
     }
 
+    @Override
     public String getEncoding(){
         return this.encoding;
     }
+    @Override
     public String toString(){
-        return new String(this.getClass().getName() +
+        return this.getClass().getName() +
                 "[name=" + this.name +
                 ",fileName="+ this.fileName +
                 ",style=" + this.style +
                 ",Charset=" + this.charset +
                 ",exclRange=" + this.exclRange +
-                ",encoding=" + this.encoding + "]");
-
+                ",encoding=" + this.encoding + "]";
     }
 
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/font/WinGlyph.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/font/WinGlyph.java?view=diff&rev=465981&r1=465980&r2=465981
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/font/WinGlyph.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/font/WinGlyph.java Thu Oct 19 21:23:21 2006
@@ -46,7 +46,7 @@
  */
 public class WinGlyph extends Glyph{
     
-    // Win32 instanse 
+    // Win32 instance 
     private static final Win32 win32 = Win32.getInstance();
 
     // offset to the POINTFX array
@@ -121,6 +121,7 @@
     }
 
 
+    @Override
     public byte[] getBitmap(){
         if (this.bitmap == null){
             bitmap = NativeFont.NativeInitGlyphImage(this);
@@ -135,6 +136,7 @@
         return this.bitmap;
     }
 
+    @Override
     public BufferedImage getImage(){
         if ((this.getWidth()==0) || (this.getHeight()==0)){
             return null;
@@ -151,7 +153,7 @@
              *
              * Because of inability to create IndexedColorModel with data, represented as DataBuffer.TYPE_INT
              * Raster with additional width is created to cover all bits, which are extending meaningful bits
-             * to the DWORD-aligning. When we want to take an image of the glyhp - we have to copy only rectangle
+             * to the DWORD-aligning. When we want to take an image of the glyph - we have to copy only rectangle
              * that encloses the Glyph from the whole raster.
              *
              * */
@@ -170,6 +172,7 @@
         return this.image;
     }
 
+    @Override
     public Shape initOutline(char c){
         if ((this.getWidth()==0) || (this.getHeight()==0)){
             return new GeneralPath();
@@ -180,7 +183,7 @@
         long buffer = 0; // pointer for TTPolygonHeader structure
         int bufSize = 0; // size of buffer
 
-        /* gettins size of buffer */
+        /* getting size of buffer */
         bufSize = NativeFont.getGlyphOutline(this.pFont, c, buffer, bufSize);
 
         if (bufSize == 0){
@@ -307,5 +310,3 @@
      */
     public static native float[] getPoints(long addr, int count);
 }
-
-

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/font/WindowsFont.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/font/WindowsFont.java?view=diff&rev=465981&r1=465980&r2=465981
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/font/WindowsFont.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/font/WindowsFont.java Thu Oct 19 21:23:21 2006
@@ -43,7 +43,7 @@
 public class WindowsFont extends FontPeerImpl{
     
     // table with loaded cached Glyphs
-    private Hashtable glyphs = new Hashtable();
+    private final Hashtable<Integer, WinGlyph> glyphs = new Hashtable<Integer, WinGlyph>();
 
     // Pairs of [begin, end],[..].. unicode ranges values 
     private int[] fontUnicodeRanges;
@@ -92,6 +92,7 @@
      * WindowsFont. 
      * @param chr the specified character
      */
+    @Override
     public boolean canDisplay(char chr) {
         return isGlyphExists(chr);
     }
@@ -127,7 +128,7 @@
         isEscape = ((uChar == '\t') || (uChar == '\n') || (uChar == '\r'));
 
         if (isEscape || this.isGlyphExists(uChar)) {
-                glyphs.put(new Integer(uChar), new WinGlyph(this.pFont,
+                glyphs.put(Integer.valueOf(uChar), new WinGlyph(this.pFont,
                         this.getSize(), uChar, NativeFont.getGlyphCodeNative(
                         this.pFont, uChar)));
                 result = true;
@@ -143,8 +144,9 @@
     public boolean isGlyphExists(char uIndex) {
         for (int i = 0; i < fontUnicodeRanges.length - 1; i += 2) {
             if (uIndex <= fontUnicodeRanges[i + 1]) {
-                if (uIndex >= fontUnicodeRanges[i])
+                if (uIndex >= fontUnicodeRanges[i]) {
                     return true;
+                }
                 return false;
             }
         }
@@ -180,14 +182,15 @@
      * doesn't exist in the WindowsFont  
      * @param index the specified character
      */
+    @Override
     public Glyph getGlyph(char index) {
         Glyph result = null;
-        Object key = new Integer(index);
+        Integer key = Integer.valueOf(index);
         if (glyphs.containsKey(key)) {
-            result = (Glyph) glyphs.get(key);
+            result = glyphs.get(key);
         } else {
             if (this.addGlyph(index)) {
-                result = (Glyph) glyphs.get(key);
+                result = glyphs.get(key);
             } else {
                 result = this.getDefaultGlyph();
             }
@@ -198,21 +201,22 @@
     /**
      * Returns default Glyph object of this WindowsFont.
      */
+    @Override
     public Glyph getDefaultGlyph() {
         Glyph result;
-        Object defaultKey = new Integer(defaultChar);
+        Integer defaultKey = Integer.valueOf(defaultChar);
 
         if (glyphs.containsKey(defaultKey)) {
-            result = (Glyph) glyphs.get(defaultKey);
+            result = glyphs.get(defaultKey);
         } else {
             if (this.fontType == FontManager.FONT_TYPE_T1){
                 // XXX: !! Type1 has no default glyphs
                 glyphs.put(defaultKey, new WinGlyph(defaultChar, defaultChar));
-                result = (Glyph) glyphs.get(defaultKey);
+                result = glyphs.get(defaultKey);
             } else {
                 glyphs.put(defaultKey, new WinGlyph(this.pFont,
                         this.getSize(), defaultChar, NativeFont.getGlyphCodeNative(this.pFont, defaultChar)));
-                result = (Glyph) glyphs.get(defaultKey);
+                result = glyphs.get(defaultKey);
             }
         }
 
@@ -241,8 +245,8 @@
         width = Math.max(-(int) gls[0].getGlyphPointMetrics().getLSB(), 0);
         baseXOffset = Math.max(-(int) gls[0].getGlyphPointMetrics().getLSB(), 0);
 
-        for (int i = 0; i < gls.length; i++) {
-            width += gls[i].getGlyphPointMetrics().getAdvanceX();
+        for (Glyph element : gls) {
+            width += element.getGlyphPointMetrics().getAdvanceX();
         }
 
         width += Math
@@ -251,8 +255,7 @@
         WritableRaster wr = Raster.createPackedRaster(DataBuffer.TYPE_BYTE,
                 width, height, 1, 1, null);
 
-        for (int i = 0; i < gls.length; i++) {
-            Glyph curGlyph = gls[i];
+        for (Glyph curGlyph : gls) {
             drawYOffset = this.ascent
                     + (int) Math.ceil(curGlyph.getGlyphPointMetrics().getBounds2D()
                             .getY()) - 1;
@@ -279,6 +282,7 @@
     /**
      * Returns locale dependent family name of this WindowsFont. 
      */
+    @Override
     public String getFamily(Locale l) {
         if (this.fontType == FontManager.FONT_TYPE_T1){
             return this.name;
@@ -291,6 +295,7 @@
     /**
      * Returns locale dependent face name of this WindowsFont.
      */
+    @Override
     public String getFontName(Locale l) {
         if (this.fontType == FontManager.FONT_TYPE_T1){
             return this.name;
@@ -319,6 +324,7 @@
      * Returns a LineMetrics object that contains text metrics of this 
      * WindowsFont.
      */
+    @Override
     public LineMetrics getLineMetrics(String str, FontRenderContext frc, AffineTransform at) {
         LineMetricsImpl lm = getDefaultLineMetrics();
         lm.setNumChars(str.length());
@@ -341,6 +347,7 @@
      * Dispose all native resources and deleting temporary font file
      * if this WindowsFont object was created from stream.
      */
+    @Override
     public void dispose(){
         if (pFont != 0){
             NativeFont.pFontFree(pFont);
@@ -356,6 +363,7 @@
     /**
      * Returns postscript name of this WindowsFont.
      */
+    @Override
     public String getPSName(){
         if (psName == null){
             // TODO: implement method
@@ -364,6 +372,7 @@
         return psName;
     }
 
+    @Override
     public int getMissingGlyphCode(){
         return getDefaultGlyph().getGlyphCode();
     }
@@ -373,6 +382,7 @@
      * @param ind the char which width is to be returned
      * @return the advance width of the specified char of this WindowsFont 
      */
+    @Override
     public int charWidth(int ind) {
         return charWidth((char)ind);
     }
@@ -380,12 +390,14 @@
     /**
      * Returns face name of this WindowsFont.
      */
+    @Override
     public String getFontName() {
         if (faceName == null){
-            if (this.fontType == FontManager.FONT_TYPE_T1)
+            if (this.fontType == FontManager.FONT_TYPE_T1) {
                 faceName = getFamily();
-            else
+            } else {
                 faceName = NativeFont.getFontNameNative(this.pFont);
+            }
         }
 
         return faceName;
@@ -394,6 +406,7 @@
     /**
      * Returns initiated FontExtraMetrics instance of this WindowsFont.
      */
+    @Override
     public FontExtraMetrics getExtraMetrics(){
         if (extraMetrix == null){
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/BitmapSurface.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/BitmapSurface.java?view=diff&rev=465981&r1=465980&r2=465981
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/BitmapSurface.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/BitmapSurface.java Thu Oct 19 21:23:21 2006
@@ -36,6 +36,7 @@
         this.height = height;
     }
 
+    @Override
     public void dispose() {
         dispose(surfaceDataPtr);
         surfaceDataPtr = 0L;
@@ -45,25 +46,31 @@
 
     private native void dispose(long structPtr);
 
+    @Override
     public long lock() {
         return 0;
     }
 
+    @Override
     public void unlock() {
     }
 
+    @Override
     public ColorModel getColorModel() {
         return null;
     }
 
+    @Override
     public WritableRaster getRaster() {
         return null;
     }
 
+    @Override
     public int getSurfaceType() {
         return 0;
     }
 
+    @Override
     public Surface getImageSurface() {
         return this;
     }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/GDIBlitter.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/GDIBlitter.java?view=diff&rev=465981&r1=465980&r2=465981
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/GDIBlitter.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/GDIBlitter.java Thu Oct 19 21:23:21 2006
@@ -57,8 +57,8 @@
         }else{
             double scaleX = xform.getScaleX();
             double scaleY = xform.getScaleY();
-            double scaledX = (double)dstX / scaleX;
-            double scaledY = (double)dstY / scaleY;
+            double scaledX = dstX / scaleX;
+            double scaledY = dstY / scaleY;
             AffineTransform at = new AffineTransform();
             at.setToTranslation(scaledX, scaledY);
             xform.concatenate(at);
@@ -97,7 +97,9 @@
             }
 
             int numVertex = clipRects[0] - 1;
-            if(numVertex == 0) return;
+            if(numVertex == 0) {
+                return;
+            }
 
             if(comp instanceof AlphaComposite){
                 AlphaComposite ac = (AlphaComposite) comp;

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/GDIPTextRenderer.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/GDIPTextRenderer.java?view=diff&rev=465981&r1=465980&r2=465981
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/GDIPTextRenderer.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/GDIPTextRenderer.java Thu Oct 19 21:23:21 2006
@@ -47,7 +47,7 @@
     // GDI Pen object handle 
     long curPen;
     
-    // curPen's ñolor 
+    // curPen's �olor 
     int curPenColor;
     
     // Print debug output or not
@@ -57,6 +57,8 @@
 
     private GDIPTextRenderer() {}
 
+    @SuppressWarnings("deprecation")
+    @Override
     public void drawGlyphVector(Graphics2D g, GlyphVector gv, float x, 
             float y) {
         FontPeerImpl fnt = (FontPeerImpl)gv.getFont().getPeer();
@@ -76,6 +78,7 @@
      * @param x starting X coordinate to draw at
      * @param y starting Y coordinate to draw at
      */
+    @SuppressWarnings("deprecation")
     public void gdipDrawNormalGlyphVector(Graphics2D g, GlyphVector gv, 
             float x, float y) {
         int len = gv.getNumGlyphs();
@@ -111,8 +114,9 @@
 
                 Glyph gl = ((CommonGlyphVector)gv).vector[i];
 
-                if (gl.getPointWidth()==0)
+                if (gl.getPointWidth()==0) {
                     continue;
+                }
 
                 char chr = gl.getChar();
 
@@ -196,8 +200,9 @@
             for (int i=0; i < len ; i++){
                 Glyph gl = ((CommonGlyphVector)gv).vector[i];
                 
-                if (gl.getPointWidth()==0)
+                if (gl.getPointWidth()==0) {
                     continue;
+                }
 
                 chars[count] = gl.getChar();
                 int index = i * 2;
@@ -232,6 +237,7 @@
      * @param x starting X coordinate to draw at
      * @param y starting Y coordinate to draw at
      */
+    @SuppressWarnings("deprecation")
     public void gdipDrawCompositeGlyphVector(Graphics2D g, GlyphVector gv, 
             float x, float y) {
         int status = 0;
@@ -361,6 +367,8 @@
 
     }
 
+    @SuppressWarnings("deprecation")
+    @Override
     public void drawString(Graphics2D g, String str, float x, float y) {
         int len = str.length();
         if (len == 0){
@@ -384,6 +392,7 @@
      * @param x starting X coordinate to draw at
      * @param y starting Y coordinate to draw at
      */
+    @SuppressWarnings("deprecation")
     public void gdipDrawNormalString(Graphics2D g, String str, float x, float y) {
         long graphicsInfo = ((WinGDIPGraphics2D)g).getGraphicsInfo();
 
@@ -445,6 +454,7 @@
      * @param x starting X coordinate to draw at
      * @param y starting Y coordinate to draw at
      */
+    @SuppressWarnings("deprecation")
     public void gdipDrawNormalChars(Graphics2D g, Font fnt, char str[], 
             int len, float x, float y) {
         long graphicsInfo = ((WinGDIPGraphics2D)g).getGraphicsInfo();
@@ -507,6 +517,7 @@
      * @param x starting X coordinate to draw at
      * @param y starting Y coordinate to draw at
      */
+    @SuppressWarnings("deprecation")
     public void gdipDrawCompositeString(Graphics2D g, String str, float x, 
             float y) {
         int len = str.length();

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/GDISurface.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/GDISurface.java?view=diff&rev=465981&r1=465980&r2=465981
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/GDISurface.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/GDISurface.java Thu Oct 19 21:23:21 2006
@@ -37,18 +37,22 @@
     public GDISurface(long gi){
         surfaceDataPtr = createSurfData(gi);
     }
+    @Override
     public void dispose() {
-        if (surfaceDataPtr == 0)
+        if (surfaceDataPtr == 0) {
             return;
+        }
         
         dispose(surfaceDataPtr);
         surfaceDataPtr = 0;
     }
 
+    @Override
     public long lock() {
         return 0;
     }
 
+    @Override
     public void unlock() {
 
     }
@@ -57,18 +61,22 @@
 
     private native void dispose(long structPtr);
 
+    @Override
     public ColorModel getColorModel() {
         return null;
     }
 
+    @Override
     public WritableRaster getRaster() {
         return null;
     }
 
+    @Override
     public int getSurfaceType() {
         return 0;
     }
 
+    @Override
     public Surface getImageSurface() {
         return this;
     }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/GDITextRenderer.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/GDITextRenderer.java?view=diff&rev=465981&r1=465980&r2=465981
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/GDITextRenderer.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/GDITextRenderer.java Thu Oct 19 21:23:21 2006
@@ -46,16 +46,16 @@
     // GDI Pen object handle 
     long curPen;
 
-    // curPen's ñolor 
+    // curPen's color 
     int curPenColor;
     
     // GDI clipped region 
     long hOldGDIRgn = 0;
     
-    // Win32 instanse
+    // Win32 instance
     private final Win32 win32 = Win32.getInstance();
     
-    /** GDITextRenderer singleton instanse */
+    /** GDITextRenderer singleton instance */
     public static final GDITextRenderer inst = new GDITextRenderer();
 
     private GDITextRenderer() {}
@@ -66,6 +66,8 @@
         (argbPix & 0x0000FF00) | ((argbPix & 0x000000FF) << 16);
     }
 
+    @SuppressWarnings("deprecation")
+    @Override
     public void drawGlyphVector(Graphics2D g, GlyphVector gv, float x, 
             float y) {
         FontPeerImpl fnt = (FontPeerImpl)gv.getFont().getPeer();
@@ -85,6 +87,7 @@
      * @param x starting X coordinate to draw at
      * @param y starting Y coordinate to draw at
      */
+    @SuppressWarnings("deprecation")
     public void drawNormalGlyphVector(Graphics2D g, GlyphVector gv, float x, 
             float y) {
         AffineTransform trans = ((WinGDIPGraphics2D)g).getTransform();
@@ -106,8 +109,9 @@
             Glyph gl = ((CommonGlyphVector)gv).vector[i];
             char chr = gl.getChar();
 
-            if (gl.getPointWidth()==0)
+            if (gl.getPointWidth()==0) {
                 continue;
+            }
 
             String sChar = String.valueOf(chr);
 
@@ -128,6 +132,7 @@
      * @param x starting X coordinate to draw at
      * @param y starting Y coordinate to draw at
      */
+    @SuppressWarnings("deprecation")
     public void drawCompositeGlyphVector(Graphics2D g, GlyphVector gv, float x, 
             float y) {
         AffineTransform trans = ((WinGDIPGraphics2D)g).getTransform();
@@ -149,8 +154,9 @@
             Glyph gl = ((CommonGlyphVector)gv).vector[i];
             char chr = gl.getChar();
 
-            if (gl.getPointWidth()==0)
+            if (gl.getPointWidth()==0) {
                 continue;
+            }
 
             String sChar = String.valueOf(chr);
 
@@ -166,6 +172,8 @@
         }
     }
 
+    @SuppressWarnings("deprecation")
+    @Override
     public void drawString(Graphics2D g, String str, float x, float y) {
         FontPeerImpl fnt = (FontPeerImpl)g.getFont().getPeer();
         if (fnt.getClass() == CompositeFont.class){
@@ -184,6 +192,7 @@
      * @param x starting X coordinate to draw at
      * @param y starting Y coordinate to draw at
      */
+    @SuppressWarnings("deprecation")
     public void drawNormalString(Graphics2D g, String str, int x, int y) {
         AffineTransform trans = ((WinGDIPGraphics2D)g).getTransform();
 
@@ -241,6 +250,7 @@
      * @param x starting X coordinate to draw at
      * @param y starting Y coordinate to draw at
      */
+    @SuppressWarnings("deprecation")
     public void drawCompositeString(Graphics2D g, String str, int x, int y) {
 
         int len = str.length();

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/WinGDIPGraphics2D.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/WinGDIPGraphics2D.java?view=diff&rev=465981&r1=465980&r2=465981
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/WinGDIPGraphics2D.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/WinGDIPGraphics2D.java Thu Oct 19 21:23:21 2006
@@ -111,8 +111,9 @@
 
         dstSurf = new GDISurface(gi);
         blitter = GDIBlitter.getInstance();
-        if (debugOutput)
+        if (debugOutput) {
             System.err.println("WinGDIPGraphics2D("+nw+", "+tx+", "+ty+", "+width+", "+height+")");
+        }
         setTransform(getTransform());
 
     }
@@ -125,10 +126,11 @@
         super();
         size = new Dimension(width, height);
         this.img = img;
-        if (ogi != 0)
+        if (ogi != 0) {
             this.gi = copyImageInfo(ogi);
-        else
+        } else {
             this.gi = copyImageInfo(img.gi);
+        }
         setTransformedClip(this.clip);
         dstSurf = img.getImageSurface();
         blitter = GDIBlitter.getInstance();
@@ -136,22 +138,27 @@
         setTransform(getTransform());
     }
 
+    @Override
     public void addRenderingHints(Map<?,?> hints) {
         super.addRenderingHints(hints);
         Object value = this.getRenderingHint(RenderingHints.KEY_ANTIALIASING);
-        if (value == RenderingHints.VALUE_ANTIALIAS_ON) 
+        if (value == RenderingHints.VALUE_ANTIALIAS_ON) {
             NativeFont.setAntialiasing(gi,true);
-        else
+        } else {
             NativeFont.setAntialiasing(gi,false);
+        }
     }
     
+    @Override
     public void copyArea(int x, int y, int width, int height, int dx, int dy) {
         copyArea(gi, x, y, width, height, dx, dy);
     }
 
+    @Override
     public Graphics create() {
-        if (debugOutput)
+        if (debugOutput) {
             System.err.println("WinGDIPGraphics2D.create()");
+        }
 
         WinGDIPGraphics2D res = null;
         if (img == null) {
@@ -163,6 +170,7 @@
         return res;
     }
 
+    @Override
     public GraphicsConfiguration getDeviceConfiguration() {
         if (config == null) {
             if (img == null) {
@@ -175,11 +183,13 @@
         return config;
     }
 
+    @Override
     protected void fillMultiRectAreaPaint(MultiRectArea mra) {
-        if (nativeBrush)
+        if (nativeBrush) {
             fillRects(gi, mra.rect, mra.rect[0]-1);
-        else
+        } else {
             super.fillMultiRectAreaPaint(mra);
+        }
     }
 
 
@@ -191,9 +201,11 @@
      *
      ***************************************************************************/
 
+    @Override
     public void setColor(Color color) {
-        if (color == null)
+        if (color == null) {
             return;
+        }
         super.setColor(color);
         setSolidBrush(gi, color.getRed(), color.getGreen(), color.getBlue(), color.getAlpha());
         nativeBrush = true;
@@ -203,6 +215,7 @@
 
     //REMARK: It seems that transfrom affects paints too
     //REMARK: Think how to implement this
+    @Override
     public void setPaint(Paint paint) {
         if (paint instanceof Color) {
             setColor((Color)paint);
@@ -211,8 +224,9 @@
             nativeBrush = false;
             if (paint instanceof GradientPaint) {
                 GradientPaint p = (GradientPaint)paint;
-                if (!p.isCyclic())
+                if (!p.isCyclic()) {
                     return;
+                }
                 Color c1 = p.getColor1();
                 Color c2 = p.getColor2();
                 Point2D p1 = transform.transform(p.getPoint1(), null);
@@ -225,22 +239,28 @@
         }
     }
 
+    @Override
     public void dispose() {
-        if (gi == 0)
+        if (gi == 0) {
             return;
-        if (dstSurf instanceof GDISurface)
+        }
+        if (dstSurf instanceof GDISurface) {
             dstSurf.dispose();
+        }
         disposeGraphicsInfo(gi);
         gi = 0;
         super.dispose();
-        if (debugOutput)
+        if (debugOutput) {
             System.err.println("WinGDIPGraphics2D.dispose()");
+        }
     }
 
+    @Override
     public void drawGlyphVector(GlyphVector gv, float x, float y) {
         jtr.drawGlyphVector(this, gv, x, y);
     }
 
+    @Override
     public void drawString(String str, float x, float y) {
 //        XXX: GDITextRenderer provide faster text drawing,
 //             but there still conflict between GDI and GDI+ hdc usage.
@@ -270,6 +290,7 @@
         jtr.drawString(this, str, x, y);
     }
 
+    @Override
     public void setStroke(Stroke stroke) {
         super.setStroke(stroke);
         nativePen = nativeBrush && stroke instanceof BasicStroke;
@@ -284,6 +305,7 @@
                 dash, (dash != null)?dash.length:0, bs.getDashPhase());
     }
 
+    @Override
     public void draw(Shape s) {
         if (!nativePen) {
             super.draw(s);
@@ -295,6 +317,7 @@
         drawShape(gi, pathArray, len, pi.getWindingRule());
     }
 
+    @Override
     public void drawLine(int x1, int y1, int x2, int y2) {
         if (!nativePen) {
             super.drawLine(x1, y1, x2, y2);
@@ -304,6 +327,7 @@
         drawLine(gi, x1, y1, x2, y2);
     }
 
+    @Override
     public void drawRect(int x, int y, int width, int height) {
         if (!nativePen) {
             super.drawRect(x, y, width, height);
@@ -313,6 +337,7 @@
         drawRect(gi, x, y, width, height);
     }
 
+    @Override
     public void fill(Shape s) {
         if (!nativeBrush) {
             super.fill(s);
@@ -324,6 +349,7 @@
         fillShape(gi, pathArray, len, pi.getWindingRule());
     }
 
+    @Override
     public void fillRect(int x, int y, int width, int height) {
         if (!nativeBrush) {
             super.fillRect(x, y, width, height);
@@ -338,14 +364,17 @@
      * 
      * @param clip Transformed clip to set
      */
+    @Override
     protected void setTransformedClip(MultiRectArea clip) {
         super.setTransformedClip(clip);
-        if (gi == 0)
+        if (gi == 0) {
             return;
-        if (clip == null)
+        }
+        if (clip == null) {
             resetClip(gi);
-        else
+        } else {
             setClip(gi, clip.rect, clip.rect[0]-1);
+        }
     }
 
     /***************************************************************************
@@ -354,50 +383,59 @@
     *
     ***************************************************************************/
 
+    @Override
     public void setTransform(AffineTransform transform) {
         super.setTransform(transform);
-        if (gi == 0)
+        if (gi == 0) {
             return;
+        }
 
         setNativeTransform(gi, matrix);
     }
 
+    @Override
     public void rotate(double theta) {
         super.rotate(theta);
 
         setNativeTransform(gi, matrix);
     }
 
+    @Override
     public void rotate(double theta, double x, double y) {
         super.rotate(theta, x, y);
 
         setNativeTransform(gi, matrix);
     }
 
+    @Override
     public void scale(double sx, double sy) {
         super.scale(sx, sy);
 
         setNativeTransform(gi, matrix);
     }
 
+    @Override
     public void shear(double shx, double shy) {
         super.shear(shx, shy);
 
         setNativeTransform(gi, matrix);
     }
 
+    @Override
     public void transform(AffineTransform at) {
         super.transform(at);
 
         setNativeTransform(gi, matrix);
     }
 
+    @Override
     public void translate(double tx, double ty) {
         super.translate(tx, ty);
 
         setNativeTransform(gi, matrix);
     }
 
+    @Override
     public void translate(int tx, int ty) {
         super.translate(tx, ty);
 
@@ -414,8 +452,9 @@
      * Returns handle to underlying device context
      */
     public long getDC() {
-        if (hdc == 0)
+        if (hdc == 0) {
             hdc = getDC(gi);
+        }
         return hdc;
     }
 
@@ -511,22 +550,26 @@
     // Fill native primitives
     private native void fillRect(long gi, int x, int y, int width, int height);
 
+    @Override
     public void setRenderingHint(RenderingHints.Key key, Object value) {
         super.setRenderingHint(key,value);
         Object val = this.getRenderingHint(RenderingHints.KEY_ANTIALIASING);
-        if (val == RenderingHints.VALUE_ANTIALIAS_ON) 
+        if (val == RenderingHints.VALUE_ANTIALIAS_ON) {
             NativeFont.setAntialiasing(gi,true);
-        else
+        } else {
             NativeFont.setAntialiasing(gi,false);
+        }
     }
 
+    @Override
     public void setRenderingHints(Map<?,?> hints) {
         super.setRenderingHints(hints);
         Object value = this.getRenderingHint(RenderingHints.KEY_ANTIALIASING);
-        if (value == RenderingHints.VALUE_ANTIALIAS_ON) 
+        if (value == RenderingHints.VALUE_ANTIALIAS_ON) {
             NativeFont.setAntialiasing(gi,true);
-        else
+        } else {
             NativeFont.setAntialiasing(gi,false);
+        }
     }
 
 
@@ -548,6 +591,7 @@
      * We need to shutdown GDI+ before exit.
      */
     private static class GDIPShutdown extends Thread {
+        @Override
         public void run() {
             WinGDIPGraphics2D.gdiPlusShutdown(WinGDIPGraphics2D.gdipToken);
         }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/WinGraphics2DFactory.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/WinGraphics2DFactory.java?view=diff&rev=465981&r1=465980&r2=465981
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/WinGraphics2DFactory.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/WinGraphics2DFactory.java Thu Oct 19 21:23:21 2006
@@ -40,6 +40,8 @@
         inst = new WinGraphics2DFactory();
     }
 
+    @SuppressWarnings("deprecation")
+    @Deprecated
     public Graphics2D getGraphics2D(NativeWindow nw, int tx, int ty, MultiRectArea clip) {
         Insets ins = nw.getInsets();
         return new WinGDIPGraphics2D(nw, tx - ins.left, ty - ins.top, clip);
@@ -58,6 +60,7 @@
         return WinFontManager.inst;
     }
 
+    @Override
     public Font embedFont(String fontFilePath) {
         return WindowsFont.embedFont(fontFilePath);
     }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/WinGraphicsConfiguration.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/WinGraphicsConfiguration.java?view=diff&rev=465981&r1=465980&r2=465981
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/WinGraphicsConfiguration.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/WinGraphicsConfiguration.java Thu Oct 19 21:23:21 2006
@@ -117,46 +117,57 @@
         cm = new DirectColorModel(bits, rmask, gmask, bmask, amask);
     }
 
+    @Override
     public GraphicsDevice getDevice() {
         return device;
     }
 
+    @Override
     public Rectangle getBounds() {
         return device.getBounds();
     }
 
+    @Override
     public AffineTransform getDefaultTransform() {
         return new AffineTransform();
     }
 
+    @Override
     public AffineTransform getNormalizingTransform() {
         return new AffineTransform();
     }
 
+    @Override
     public BufferedImage createCompatibleImage(int width, int height) {
         return new BufferedImage(cm, cm.createCompatibleWritableRaster(width, height), false, null);
     }
 
+    @Override
     public BufferedImage createCompatibleImage(int width, int height, int transparency) {
         ColorModel cmt = getColorModel(transparency);
-        if (cmt == null)
+        if (cmt == null) {
             throw new IllegalArgumentException("Transparency is not supported.");
+        }
 
         return new BufferedImage(cmt, cmt.createCompatibleWritableRaster(width, height), false, null);
     }
 
+    @Override
     public ColorModel getColorModel() {
         return cm;
     }
 
+    @Override
     public ColorModel getColorModel(int transparency) {
         return cm;
     }
 
+    @Override
     public VolatileImage createCompatibleVolatileImage(int width, int height) {
         return new WinVolatileImage(this, width, height);
     }
 
+    @Override
     public VolatileImage createCompatibleVolatileImage(int width, int height, int transparency) {
         return createCompatibleVolatileImage(width, height);
     }
@@ -165,9 +176,11 @@
         return flags;
     }
 
+    @Override
     public boolean equals(Object obj) {
-        if (!(obj instanceof WinGraphicsConfiguration))
+        if (!(obj instanceof WinGraphicsConfiguration)) {
             return false;
+        }
 
         WinGraphicsConfiguration gc = (WinGraphicsConfiguration)obj;
 
@@ -176,35 +189,45 @@
         //if (flags != gc.flags)
         //  return false;
 
-        if (pixelType != gc.pixelType)
+        if (pixelType != gc.pixelType) {
             return false;
+        }
 
-        if (bits != gc.bits)
+        if (bits != gc.bits) {
             return false;
+        }
 
-        if (redBits != gc.redBits)
+        if (redBits != gc.redBits) {
             return false;
+        }
 
-        if (redShift != gc.redShift)
+        if (redShift != gc.redShift) {
             return false;
+        }
 
-        if (greenBits != gc.greenBits)
+        if (greenBits != gc.greenBits) {
             return false;
+        }
 
-        if (greenShift != gc.greenShift)
+        if (greenShift != gc.greenShift) {
             return false;
+        }
 
-        if (blueBits != gc.blueBits)
+        if (blueBits != gc.blueBits) {
             return false;
+        }
 
-        if (blueShift != gc.blueShift)
+        if (blueShift != gc.blueShift) {
             return false;
+        }
 
-        if (alphaBits != gc.alphaBits)
+        if (alphaBits != gc.alphaBits) {
             return false;
+        }
 
-        if (alphaShift != gc.alphaShift)
+        if (alphaShift != gc.alphaShift) {
             return false;
+        }
 
         return true;
     }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/WinGraphicsDevice.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/WinGraphicsDevice.java?view=diff&rev=465981&r1=465980&r2=465981
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/WinGraphicsDevice.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/WinGraphicsDevice.java Thu Oct 19 21:23:21 2006
@@ -65,13 +65,14 @@
         long hmon = win32.MonitorFromWindow(hwnd, WindowsDefs.MONITOR_DEFAULTTOPRIMARY);
         Win32.MONITORINFOEXW mi = win32.createMONITORINFOEXW(false);
         mi.get_MONITORINFO().set_cbSize(mi.size());
-        if (win32.GetMonitorInfoW(hmon, mi.shortLockPointer()) == 0)
+        if (win32.GetMonitorInfoW(hmon, mi.shortLockPointer()) == 0) {
             throw new RuntimeException("Can not get monitor info");
+        }
         Win32.RECT rect = mi.get_MONITORINFO().get_rcMonitor();
-        int x = (int)rect.get_left();
-        int y = (int)rect.get_top();
-        int width = (int)rect.get_right() - x;
-        int height = (int)rect.get_bottom() - y;
+        int x = rect.get_left();
+        int y = rect.get_top();
+        int width = rect.get_right() - x;
+        int height = rect.get_bottom() - y;
         bounds = new Rectangle(x, y, width, height);
         displayMode = new DisplayMode(bounds.width, bounds.height, DisplayMode.BIT_DEPTH_MULTI, DisplayMode.REFRESH_RATE_UNKNOWN);
         id = mi.get_szDevice().getString();
@@ -80,15 +81,18 @@
         mi.free();
     }
 
+    @Override
     public int getType() {
         return type;
     }
 
+    @Override
     public GraphicsConfiguration getDefaultConfiguration() {
         if (defaultConfig == null) {
             long hdc = win32.CreateDCW(null, id, null, null);
-            if (hdc == 0)
+            if (hdc == 0) {
                 throw new RuntimeException("Can not create DC for device");
+            }
 
             int dci = win32.GetPixelFormat(hdc);
             Win32.PIXELFORMATDESCRIPTOR pfd = win32.createPIXELFORMATDESCRIPTOR(false);
@@ -103,11 +107,13 @@
         return defaultConfig;
     }
 
+    @Override
     public GraphicsConfiguration[] getConfigurations() {
         if (configs == null) {
             long hdc = win32.CreateDCW(null, id, null, null);
-            if (hdc == 0)
+            if (hdc == 0) {
                 throw new RuntimeException("Can not create DC for device");
+            }
 
             // If we created DC why do not ask it about resolution?
             if (resolution == null) {
@@ -118,19 +124,21 @@
 
             Win32.PIXELFORMATDESCRIPTOR pfd = win32.createPIXELFORMATDESCRIPTOR(false);
             int pfnum = win32.DescribePixelFormat(hdc, 1, pfd.size(), pfd);
-            if (pfnum == 0)
+            if (pfnum == 0) {
                 return null;
+            }
 
             // Choose default configuration
             int dci = win32.GetPixelFormat(hdc);
 
-            Vector gcv = new Vector(100);
+            Vector<WinGraphicsConfiguration> gcv = new Vector<WinGraphicsConfiguration>(100);
             int i = 1;
             while (win32.DescribePixelFormat(hdc, i, pfd.size(), pfd) > 0) {
                 WinGraphicsConfiguration gc = new WinGraphicsConfiguration(this, i, pfd);
 
-                if (!gcv.contains(gc))
+                if (!gcv.contains(gc)) {
                     gcv.add(gc);
+                }
 
                 // Is default PixelFormat?
                 if (dci == i) {
@@ -151,13 +159,15 @@
             // If we can not find default PixelFormat
             // let's use first one
             // Probably not best idea...
-            if (defaultConfig == null)
+            if (defaultConfig == null) {
                 defaultConfig = configs[0];
+            }
         }
 
         return configs;
     }
 
+    @Override
     public String getIDstring() {
         return id;
     }
@@ -170,6 +180,7 @@
         return bounds;
     }
 
+    @Override
     public String toString() {
         return getClass().getName()+"[Bounds: "+bounds+", ID: "+id+", primary: "+primary+"]";
     }
@@ -182,20 +193,24 @@
         return idBytes;
     }
 
+    @Override
     public DisplayMode getDisplayMode() {
         return displayMode;
     }
 
+    @Override
     public DisplayMode[] getDisplayModes() {
         DisplayMode []dms = {displayMode};
         return  dms;
     }
 
+    @Override
     public Dimension getResolution() {
         if (resolution == null) {
             long hdc = win32.CreateDCW(null, id, null, null);
-            if (hdc == 0)
+            if (hdc == 0) {
                 throw new RuntimeException("Can not create DC for device");
+            }
 
             if (resolution == null) {
                 int width = win32.GetDeviceCaps(hdc, WindowsDefs.LOGPIXELSY);

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/WinGraphicsEnvironment.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/WinGraphicsEnvironment.java?view=diff&rev=465981&r1=465980&r2=465981
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/WinGraphicsEnvironment.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/WinGraphicsEnvironment.java Thu Oct 19 21:23:21 2006
@@ -42,19 +42,22 @@
     public WinGraphicsEnvironment(WindowFactory wf) {
     }
 
+    @Override
     public GraphicsDevice getDefaultScreenDevice() throws HeadlessException {
         if (defaultDevice == null) {
             WinGraphicsDevice []dvcs = (WinGraphicsDevice [])getScreenDevices();
-            for (int i = 0; i < dvcs.length; i++)
-                if (dvcs[i].isDefaultDevice()) {
-                    defaultDevice = dvcs[i];
+            for (WinGraphicsDevice element : dvcs) {
+                if (element.isDefaultDevice()) {
+                    defaultDevice = element;
                     break;
                 }
+            }
         }
 
         return defaultDevice;
     }
 
+    @Override
     public GraphicsDevice[] getScreenDevices() throws HeadlessException {
         if (devices == null) {
             devices = enumerateDisplayDevices();

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/WinVolatileImage.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/WinVolatileImage.java?view=diff&rev=465981&r1=465980&r2=465981
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/WinVolatileImage.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/WinVolatileImage.java Thu Oct 19 21:23:21 2006
@@ -51,8 +51,9 @@
     *
     ***************************************************************************/
     public WinVolatileImage(NativeWindow nw, int width, int height) {
-        if (width <= 0 || height <= 0)
+        if (width <= 0 || height <= 0) {
             throw new IllegalArgumentException("Illegal size of volatile image.");
+        }
         hwnd = nw.getId();
         this.width = width;
         this.height = height;
@@ -61,8 +62,9 @@
     }
 
     public WinVolatileImage(WinGraphicsConfiguration gc, int width, int height) {
-        if (width <= 0 || height <= 0)
+        if (width <= 0 || height <= 0) {
             throw new IllegalArgumentException("Illegal size of volatile image.");
+        }
         
         hwnd = 0;
         this.gc = gc;
@@ -72,10 +74,12 @@
         surface = new BitmapSurface(gi , width, height);
     }
 
+    @Override
     public boolean contentsLost() {
         return gi == 0;
     }
 
+    @Override
     public Graphics2D createGraphics() {
         if (gi == 0) {
             if (hwnd != 0 && gc == null) {
@@ -87,51 +91,63 @@
         return new WinGDIPGraphics2D(this, width, height);
     }
 
+    @Override
     public ImageCapabilities getCapabilities() {
         return new ImageCapabilities(false);
     }
 
+    @Override
     public int getHeight() {
         return height;
     }
 
+    @Override
     public BufferedImage getSnapshot() {
         return null;
     }
 
+    @Override
     public int getWidth() {
         return width;
     }
 
+    @Override
     public int validate(GraphicsConfiguration gc) {
-        if (gi != 0)
+        if (gi != 0) {
             return IMAGE_OK;
+        }
         
         gi = WinGDIPGraphics2D.createCompatibleImageInfo(((WinGraphicsDevice)gc.getDevice()).getIDBytes(), width, height);        
         return IMAGE_RESTORED;
     }
 
+    @Override
     public Object getProperty(String name, ImageObserver observer) {
         return UndefinedProperty;
     }
 
+    @Override
     public int getWidth(ImageObserver observer) {
         return width;
     }
 
+    @Override
     public int getHeight(ImageObserver observer) {
         return height;
     }
 
+    @Override
     protected void finalize() throws Throwable {
         flush();
         super.finalize();
     }
 
+    @Override
     public Surface getImageSurface(){
         return surface;
     }
 
+    @Override
     public void flush() {
         if (gi != 0) {
             WinGDIPGraphics2D.disposeGraphicsInfo(gi);

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/nativebridge/windows/Win32.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/nativebridge/windows/Win32.java?view=diff&rev=465981&r1=465980&r2=465981
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/nativebridge/windows/Win32.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/nativebridge/windows/Win32.java Thu Oct 19 21:23:21 2006
@@ -91,6 +91,7 @@
         public final int get_bottom() {
             return byteBase.getInt32(12);
         }
+        @Override
         public int size() {
             return sizeof;
         }
@@ -167,6 +168,7 @@
         public final POINT get_pt() {
             return instance.createPOINT(getElementPointer(NativeBridge.is64 ? 36 : 20));
         }
+        @Override
         public int size() {
             return sizeof;
         }
@@ -208,6 +210,7 @@
         public final int get_y() {
             return byteBase.getInt32(4);
         }
+        @Override
         public int size() {
             return sizeof;
         }
@@ -391,6 +394,7 @@
         public final int get_FlagsEx() {
             return byteBase.getInt32(NativeBridge.is64 ? 148 : 84);
         }
+        @Override
         public int size() {
             return sizeof;
         }
@@ -536,6 +540,7 @@
         public final Int8Pointer get_lfFaceName() {
             return nb.createInt8Pointer(getElementPointer(28));
         }
+        @Override
         public int size() {
             return sizeof;
         }
@@ -844,6 +849,7 @@
         public final int get_dmPanningHeight() {
             return byteBase.getInt32(216);
         }
+        @Override
         public int size() {
             return sizeof;
         }
@@ -885,6 +891,7 @@
         public final int get_y() {
             return byteBase.getInt32(4);
         }
+        @Override
         public int size() {
             return sizeof;
         }
@@ -976,6 +983,7 @@
         public final long get_hbmColor() {
             return byteBase.getAddress(NativeBridge.is64 ? 24 : 16);
         }
+        @Override
         public int size() {
             return sizeof;
         }
@@ -1027,6 +1035,7 @@
         public final Int8Pointer get_Buffer() {
             return nb.createInt8Pointer(getElementPointer(32));
         }
+        @Override
         public int size() {
             return sizeof;
         }
@@ -1092,6 +1101,7 @@
         public final float get_eDy() {
             return byteBase.getFloat(20);
         }
+        @Override
         public int size() {
             return sizeof;
         }
@@ -1148,6 +1158,7 @@
         public final Win32.RECT get_rcBound() {
             return Win32.instance.createRECT(getElementPointer(16));
         }
+        @Override
         public int size() {
             return sizeof;
         }
@@ -1225,6 +1236,7 @@
         public final int get_dwHoverTime() {
             return byteBase.getInt32(NativeBridge.is64 ? 16 : 12);
         }
+        @Override
         public int size() {
             return sizeof;
         }
@@ -1391,6 +1403,7 @@
         public final int get_fRestFlags() {
             return byteBase.getInt32(52);
         }
+        @Override
         public int size() {
             return sizeof;
         }
@@ -1482,6 +1495,7 @@
         public final int get_dwFlags() {
             return byteBase.getInt32(36);
         }
+        @Override
         public int size() {
             return sizeof;
         }
@@ -1567,6 +1581,7 @@
         public final Int16Pointer get_szTypeName() {
             return nb.createInt16Pointer(getElementPointer(NativeBridge.is64 ? 536 : 532));
         }
+        @Override
         public int size() {
             return sizeof;
         }
@@ -1778,6 +1793,7 @@
         public final int get_dwDamageMask() {
             return byteBase.getInt32(36);
         }
+        @Override
         public int size() {
             return sizeof;
         }
@@ -1878,6 +1894,7 @@
         public final Win32.RECT get_rcNormalPosition() {
             return Win32.instance.createRECT(getElementPointer(28));
         }
+        @Override
         public int size() {
             return sizeof;
         }
@@ -1966,6 +1983,7 @@
         public final Int8Pointer get_Data4() {
             return nb.createInt8Pointer(getElementPointer(8));
         }
+        @Override
         public int size() {
             return sizeof;
         }
@@ -1998,6 +2016,7 @@
         public final SHITEMID get_mkid() {
             return instance.createSHITEMID(getElementPointer(0));
         }
+        @Override
         public int size() {
             return sizeof;
         }
@@ -2036,6 +2055,7 @@
         public final Int8Pointer get_abID() {
             return nb.createInt8Pointer(getElementPointer(2));
         }
+        @Override
         public int size() {
             return sizeof;
         }
@@ -2144,6 +2164,7 @@
         public final int SetNameOf(long hwnd, Win32.ITEMIDLIST pidl, Int16Pointer pszName, int uFlags, PointerPointer ppidlOut) {
             return vtbl.SetNameOf(this, hwnd, pidl, pszName, uFlags, ppidlOut);
         }
+        @Override
         public int size() {
             return sizeof;
         }
@@ -2188,6 +2209,7 @@
         public final Int8Pointer get_cStr() {
             return nb.createInt8Pointer(getElementPointer(NativeBridge.is64 ? 8 : 4));
         }
+        @Override
         public int size() {
             return sizeof;
         }
@@ -2255,6 +2277,7 @@
         public final int RevokeObjectParam(Int16Pointer pszKey) {
             return vtbl.RevokeObjectParam(this, pszKey);
         }
+        @Override
         public int size() {
             return sizeof;
         }
@@ -2606,6 +2629,7 @@
             }
             return tmp_ret;
         }
+        @Override
         public int size() {
             return sizeof;
         }
@@ -2643,6 +2667,7 @@
         public final int Release() {
             return vtbl.Release(this);
         }
+        @Override
         public int size() {
             return sizeof;
         }
@@ -2690,6 +2715,7 @@
         public final int get_dwTickCountDeadline() {
             return byteBase.getInt32(12);
         }
+        @Override
         public int size() {
             return sizeof;
         }
@@ -2953,6 +2979,7 @@
             }
             return tmp_ret;
         }
+        @Override
         public int size() {
             return sizeof;
         }
@@ -3032,6 +3059,7 @@
             }
             return tmp_ret;
         }
+        @Override
         public int size() {
             return sizeof;
         }
@@ -3138,6 +3166,7 @@
         public final Int8Pointer get_bmiColors() {
             return nb.createInt8Pointer(getElementPointer(40));
         }
+        @Override
         public int size() {
             return sizeof;
         }
@@ -3233,6 +3262,7 @@
         public final int get_biClrImportant() {
             return byteBase.getInt32(36);
         }
+        @Override
         public int size() {
             return sizeof;
         }
@@ -3312,6 +3342,7 @@
         public final Win32.RECT get_rcArea() {
             return Win32.instance.createRECT(getElementPointer(12));
         }
+        @Override
         public int size() {
             return sizeof;
         }
@@ -3366,6 +3397,7 @@
         public final HARDWAREINPUT get_hi() {
             return instance.createHARDWAREINPUT(getElementPointer(NativeBridge.is64 ? 8 : 4));
         }
+        @Override
         public int size() {
             return sizeof;
         }
@@ -3431,6 +3463,7 @@
         public final long get_dwExtraInfo() {
             return byteBase.getCLong(NativeBridge.is64 ? 24 : 20);
         }
+        @Override
         public int size() {
             return sizeof;
         }
@@ -3478,6 +3511,7 @@
         public final short get_wParamH() {
             return byteBase.getInt16(6);
         }
+        @Override
         public int size() {
             return sizeof;
         }
@@ -3537,6 +3571,7 @@
         public final long get_dwExtraInfo() {
             return byteBase.getCLong(NativeBridge.is64 ? 16 : 12);
         }
+        @Override
         public int size() {
             return sizeof;
         }
@@ -3664,6 +3699,7 @@
         public final long get_hIconSm() {
             return byteBase.getAddress(NativeBridge.is64 ? 72 : 44);
         }
+        @Override
         public int size() {
             return sizeof;
         }
@@ -3810,6 +3846,7 @@
         public final long get_lbHatch() {
             return byteBase.getCLong(8);
         }
+        @Override
         public int size() {
             return sizeof;
         }
@@ -4117,6 +4154,7 @@
         public final Int16Pointer get_DeviceKey() {
             return nb.createInt16Pointer(getElementPointer(584));
         }
+        @Override
         public int size() {
             return sizeof;
         }
@@ -4665,6 +4703,7 @@
         public final int EvaluateMode(int param_1, Int32Pointer param_2) {
             return vtbl.EvaluateMode(this, param_1, param_2);
         }
+        @Override
         public int size() {
             return sizeof;
         }
@@ -4756,6 +4795,7 @@
         public final int WaitForVerticalBlank(int param_1, VoidPointer param_2) {
             return vtbl.WaitForVerticalBlank(this, param_1, param_2);
         }
+        @Override
         public int size() {
             return sizeof;
         }
@@ -4799,6 +4839,7 @@
         public final int Clone(PointerPointer ppenum) {
             return vtbl.Clone(this, ppenum);
         }
+        @Override
         public int size() {
             return sizeof;
         }
@@ -4848,6 +4889,7 @@
         public final int SetHWnd(int param_1, long param_2) {
             return vtbl.SetHWnd(this, param_1, param_2);
         }
+        @Override
         public int size() {
             return sizeof;
         }
@@ -4891,6 +4933,7 @@
         public final int SetEntries(int param_1, int param_2, int param_3, PALETTEENTRY param_4) {
             return vtbl.SetEntries(this, param_1, param_2, param_3, param_4);
         }
+        @Override
         public int size() {
             return sizeof;
         }
@@ -5040,6 +5083,7 @@
             }
             return tmp_ret;
         }
+        @Override
         public int size() {
             return sizeof;
         }
@@ -5625,6 +5669,7 @@
             }
             return tmp_ret;
         }
+        @Override
         public int size() {
             return sizeof;
         }
@@ -5816,6 +5861,7 @@
             }
             return tmp_ret;
         }
+        @Override
         public int size() {
             return sizeof;
         }
@@ -5875,6 +5921,7 @@
         public final int get_dwVolumeDepth() {
             return byteBase.getInt32(12);
         }
+        @Override
         public int size() {
             return sizeof;
         }
@@ -6000,6 +6047,7 @@
         public final DDSCAPS get_ddsCaps() {
             return instance.createDDSCAPS(getElementPointer(NativeBridge.is64 ? 112 : 104));
         }
+        @Override
         public int size() {
             return sizeof;
         }
@@ -6032,6 +6080,7 @@
         public final IDirectDrawSurfaceVtbl get_lpVtbl() {
             return instance.createIDirectDrawSurfaceVtbl(byteBase.getAddress(0));
         }
+        @Override
         public int size() {
             return sizeof;
         }
@@ -6491,6 +6540,7 @@
             }
             return tmp_ret;
         }
+        @Override
         public int size() {
             return sizeof;
         }
@@ -6638,6 +6688,7 @@
             }
             return tmp_ret;
         }
+        @Override
         public int size() {
             return sizeof;
         }
@@ -6679,6 +6730,7 @@
         public final int get_cy() {
             return byteBase.getInt32(4);
         }
+        @Override
         public int size() {
             return sizeof;
         }
@@ -6732,6 +6784,7 @@
         public final byte get_peFlags() {
             return byteBase.get(3);
         }
+        @Override
         public int size() {
             return sizeof;
         }
@@ -7082,6 +7135,7 @@
         public final Win32.DDSCAPS2 get_ddsCaps() {
             return Win32.instance.createDDSCAPS2(getElementPointer(224));
         }
+        @Override
         public int size() {
             return sizeof;
         }
@@ -7231,6 +7285,7 @@
         public final int get_dwTextureStage() {
             return byteBase.getInt32(NativeBridge.is64 ? 128 : 120);
         }
+        @Override
         public int size() {
             return sizeof;
         }
@@ -7406,6 +7461,7 @@
         public final int GetLOD(Int32Pointer param_1) {
             return vtbl.GetLOD(this, param_1);
         }
+        @Override
         public int size() {
             return sizeof;
         }
@@ -7471,6 +7527,7 @@
         public final int get_dwWHQLLevel() {
             return byteBase.getInt32(1064);
         }
+        @Override
         public int size() {
             return sizeof;
         }
@@ -7572,6 +7629,7 @@
         public final int get_dwFlags() {
             return byteBase.getInt32(NativeBridge.is64 ? 68 : 52);
         }
+        @Override
         public int size() {
             return sizeof;
         }
@@ -7760,6 +7818,7 @@
         public final DDCOLORKEY get_ddckSrcColorkey() {
             return instance.createDDCOLORKEY(getElementPointer(NativeBridge.is64 ? 120 : 92));
         }
+        @Override
         public int size() {
             return sizeof;
         }
@@ -7975,6 +8034,7 @@
         public final int get_dwYUVZBitMask() {
             return byteBase.getInt32(28);
         }
+        @Override
         public int size() {
             return sizeof;
         }
@@ -8894,6 +8954,7 @@
             }
             return tmp_ret;
         }
+        @Override
         public int size() {
             return sizeof;
         }
@@ -8935,6 +8996,7 @@
         public final int get_dwColorSpaceHighValue() {
             return byteBase.getInt32(4);
         }
+        @Override
         public int size() {
             return sizeof;
         }
@@ -8982,6 +9044,7 @@
         public final Win32.DDBLTFX get_lpDDBltFx() {
             return Win32.instance.createDDBLTFX(byteBase.getAddress(NativeBridge.is64 ? 32 : 16));
         }
+        @Override
         public int size() {
             return sizeof;
         }
@@ -9017,6 +9080,7 @@
         public final int get_dwCaps() {
             return byteBase.getInt32(0);
         }
+        @Override
         public int size() {
             return sizeof;
         }
@@ -9076,6 +9140,7 @@
         public final long get_QuadPart() {
             return byteBase.getInt64(0);
         }
+        @Override
         public int size() {
             return sizeof;
         }
@@ -9769,6 +9834,7 @@
             }
             return tmp_ret;
         }
+        @Override
         public int size() {
             return sizeof;
         }
@@ -10040,6 +10106,7 @@
         public final Int16Pointer get_lfFaceName() {
             return nb.createInt16Pointer(getElementPointer(28));
         }
+        @Override
         public int size() {
             return sizeof;
         }
@@ -10087,6 +10154,7 @@
         public final Int8Pointer get_lpszDefaultScheme() {
             return nb.createInt8Pointer(byteBase.getAddress(8));
         }
+        @Override
         public int size() {
             return sizeof;
         }
@@ -10134,6 +10202,7 @@
         public final VoidPointer get_pidl() {
             return nb.createInt8Pointer(byteBase.getAddress(NativeBridge.is64 ? 40 : 20));
         }
+        @Override
         public int size() {
             return sizeof;
         }
@@ -10190,6 +10259,7 @@
         public final Win32.LOGFONTW get_lfFont() {
             return Win32.instance.createLOGFONTW(getElementPointer(16));
         }
+        @Override
         public int size() {
             return sizeof;
         }
@@ -10234,6 +10304,7 @@
         public final POINTFX get_pfxStart() {
             return instance.createPOINTFX(getElementPointer(8));
         }
+        @Override
         public int size() {
             return sizeof;
         }
@@ -10338,6 +10409,7 @@
         public final Win32.LOGFONTW get_lfMessageFont() {
             return Win32.instance.createLOGFONTW(getElementPointer(408));
         }
+        @Override
         public int size() {
             return sizeof;
         }
@@ -10382,6 +10454,7 @@
         public final Win32.POINT get_ptMaxTrackSize() {
             return Win32.instance.createPOINT(getElementPointer(32));
         }
+        @Override
         public int size() {
             return sizeof;
         }
@@ -10420,6 +10493,7 @@
         public final Win32.GUID get_clsid() {
             return Win32.instance.createGUID(getElementPointer(4));
         }
+        @Override
         public int size() {
             return sizeof;
         }
@@ -10461,6 +10535,7 @@
         public final int get_styleNew() {
             return byteBase.getInt32(4);
         }
+        @Override
         public int size() {
             return sizeof;
         }
@@ -10505,6 +10580,7 @@
         public final Int8Pointer get_apfx() {
             return nb.createInt8Pointer(getElementPointer(4));
         }
+        @Override
         public int size() {
             return sizeof;
         }
@@ -10540,6 +10616,7 @@
         public final Int16Pointer get_szDevice() {
             return nb.createInt16Pointer(getElementPointer(40));
         }
+        @Override
         public int size() {
             return sizeof;
         }
@@ -10611,6 +10688,7 @@
         public final int get_flags() {
             return byteBase.getInt32(NativeBridge.is64 ? 32 : 24);
         }
+        @Override
         public int size() {
             return sizeof;
         }
@@ -10658,6 +10736,7 @@
         public final int get_code() {
             return byteBase.getInt32(NativeBridge.is64 ? 16 : 8);
         }
+        @Override
         public int size() {
             return sizeof;
         }
@@ -10693,6 +10772,7 @@
         public final FIXED get_y() {
             return instance.createFIXED(getElementPointer(4));
         }
+        @Override
         public int size() {
             return sizeof;
         }
@@ -10734,6 +10814,7 @@
         public final short get_value() {
             return byteBase.getInt16(2);
         }
+        @Override
         public int size() {
             return sizeof;
         }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/nativebridge/windows/WinDataTransfer.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/nativebridge/windows/WinDataTransfer.java?view=diff&rev=465981&r1=465980&r2=465981
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/nativebridge/windows/WinDataTransfer.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/nativebridge/windows/WinDataTransfer.java Thu Oct 19 21:23:21 2006
@@ -89,12 +89,13 @@
             return isDataObjectFormatAvailable(pointer, nativeFormat);
         }
         
-        public byte[] getSerializedObject(Class clazz) {
+        public byte[] getSerializedObject(Class<?> clazz) {
             String nativeFormat = SystemFlavorMap.encodeDataFlavor(
                     new DataFlavor(clazz, null));
             return getDataObjectSerialized(pointer, nativeFormat);
         }
 
+        @Override
         public boolean equals(Object obj) {
             if (obj instanceof IDataObject) {
                 return pointer == ((IDataObject)obj).pointer;
@@ -102,6 +103,7 @@
             return false;
         }
         
+        @Override
         public int hashCode() {
             return (int)pointer;
         }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/theme/windows/WinCheckbox.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/theme/windows/WinCheckbox.java?view=diff&rev=465981&r1=465980&r2=465981
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/theme/windows/WinCheckbox.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/theme/windows/WinCheckbox.java Thu Oct 19 21:23:21 2006
@@ -77,15 +77,14 @@
                 return WindowsConsts.CBS_CHECKEDDISABLED;
             }
             return WindowsConsts.CBS_CHECKEDNORMAL;
-        } else {
-            if (s.isPressed()) {
-                return WindowsConsts.CBS_UNCHECKEDPRESSED;
-            }
-            if (!s.isEnabled()) {
-                return WindowsConsts.CBS_UNCHECKEDDISABLED;
-            }
-            return WindowsConsts.CBS_UNCHECKEDNORMAL;
         }
+        if (s.isPressed()) {
+            return WindowsConsts.CBS_UNCHECKEDPRESSED;
+        }
+        if (!s.isEnabled()) {
+            return WindowsConsts.CBS_UNCHECKEDDISABLED;
+        }
+        return WindowsConsts.CBS_UNCHECKEDNORMAL;
     }
 
     private static int getClassicState(CheckboxState s) {

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/theme/windows/WinFileDialog.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/theme/windows/WinFileDialog.java?view=diff&rev=465981&r1=465980&r2=465981
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/theme/windows/WinFileDialog.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/theme/windows/WinFileDialog.java Thu Oct 19 21:23:21 2006
@@ -51,7 +51,7 @@
     private static class OFNHookHandler implements Handler {
         
         public long windowProc(long hwnd, int msg, long wParam, long lParam) {
-            FileDialog fd = (FileDialog) thread2fd.get(Thread.currentThread());
+            FileDialog fd = thread2fd.get(Thread.currentThread());
             if (fd == null) {
                 return 0l;
             }
@@ -104,21 +104,21 @@
         
     }
     
-    private static Win32 win32 = Win32.getInstance();
-    private static NativeBridge nb = NativeBridge.getInstance();
-    private static ComponentInternals ci = ComponentInternals.
+    private static final Win32 win32 = Win32.getInstance();
+    private static final NativeBridge nb = NativeBridge.getInstance();
+    private static final ComponentInternals ci = ComponentInternals.
     getComponentInternals();
-    private static Map thread2fd = new HashMap();
-    private static Map fd2win = new HashMap();
-    private static OFNHookHandler handler = new OFNHookHandler();
-    private static long ofnHookPtr = Callback.registerCallbackOFN(handler);
+    private static final Map<Thread, FileDialog> thread2fd = new HashMap<Thread, FileDialog>();
+    private static final Map<FileDialog, WinFileDialog> fd2win = new HashMap<FileDialog, WinFileDialog>();
+    private static final OFNHookHandler handler = new OFNHookHandler();
+    private static final long ofnHookPtr = Callback.registerCallbackOFN(handler);
     private final FileDialog fileDialog;
     private final boolean modal;
     private final Win32.OPENFILENAMEW ofn;
     private long hwnd;
     
     public static WinFileDialog getInstance(FileDialog fd) {
-        return (WinFileDialog) fd2win.get(fd);
+        return fd2win.get(fd);
     }
     
     public WinFileDialog(FileDialog fd) {
@@ -244,6 +244,7 @@
                 // need to continue dispatching events
                 // so start inner modal loop:
                 new Thread() {
+                    @Override
                     public void run() {
                         show(fileDialog.getMode());
                         ci.endModalLoop(fileDialog);
@@ -258,6 +259,7 @@
             // start new thread here and
             // return immediately(return value is useless)
             new Thread() {
+                @Override
                 public void run() {
                     show(fileDialog.getMode());
                 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/theme/windows/WinTheme.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/theme/windows/WinTheme.java?view=diff&rev=465981&r1=465980&r2=465981
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/theme/windows/WinTheme.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/theme/windows/WinTheme.java Thu Oct 19 21:23:21 2006
@@ -58,6 +58,7 @@
         return getThemeMap().isEnabled();
     }
 
+    @Override
     protected void drawButtonBackground(Graphics g, ButtonState s) {
 
         if (! s.isBackgroundSet()) {
@@ -67,6 +68,7 @@
         }
     }
 
+    @Override
     protected void drawCheckboxBackground(Graphics g, CheckboxState s,
             Rectangle focusRect) {
         if (! s.isBackgroundSet()) {
@@ -76,19 +78,23 @@
         }
     }
 
+    @Override
     public void drawScrollbar(Graphics g, ScrollbarState s) {
         WinScrollbar.draw(g, s, this);
     }
 
 
+    @Override
     protected void drawChoiceBackground(Graphics g, ChoiceState s) {
         WinChoice.drawBackground(g, s, this);
     }
 
+    @Override
     public void drawTextComponentBackground(Graphics g, TextComponentState s) {
         WinTextComponent.drawBackground(g, s, this);
     }
 
+    @Override
     public boolean showFileDialog(FileDialog fd) {
         WinFileDialog dlg = WinFileDialog.getInstance(fd);
         if (dlg == null) {
@@ -97,6 +103,7 @@
         return dlg.show();
     }
 
+    @Override
     public boolean hideFileDialog(FileDialog fd) {
         WinFileDialog dlg = WinFileDialog.getInstance(fd);
         if (dlg != null) {

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/wtk/windows/WinCursor.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/wtk/windows/WinCursor.java?view=diff&rev=465981&r1=465980&r2=465981
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/wtk/windows/WinCursor.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/wtk/windows/WinCursor.java Thu Oct 19 21:23:21 2006
@@ -46,6 +46,7 @@
      */
     public void setCursor(long winID) {
         WinEventQueue.Task task = new WinEventQueue.Task() {
+            @Override
             public void perform() {
                 WinEventQueue.win32.SetCursor(hCursor);
             }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/wtk/windows/WinCursorFactory.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/wtk/windows/WinCursorFactory.java?view=diff&rev=465981&r1=465980&r2=465981
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/wtk/windows/WinCursorFactory.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/wtk/windows/WinCursorFactory.java Thu Oct 19 21:23:21 2006
@@ -67,6 +67,7 @@
     /**
      * @see org.apache.harmony.awt.wtk.CursorFactory#createCursor(int)
      */
+    @Override
     public NativeCursor createCursor(int type) {
         if (type >= 0 && type < predefined.length) {
             long hCursor = win32.LoadCursorW(0l, predefined[type]);
@@ -78,6 +79,7 @@
     /**
      * @see org.apache.harmony.awt.wtk.CursorFactory#createCustomCursor(java.awt.Image, int, int)
      */
+    @Override
     public NativeCursor createCustomCursor(Image img, int xHotSpot, int yHotSpot) {
         long hCursor = WinIcons.createIcon(false, img, xHotSpot, yHotSpot);
         return new WinCursor(eventQueue, hCursor, false);
@@ -86,6 +88,7 @@
     /**
      * @see org.apache.harmony.awt.wtk.CursorFactory#getBestCursorSize(int, int)
      */
+    @Override
     public Dimension getBestCursorSize(int prefWidth, int prefHeight) {
         return new Dimension(win32.GetSystemMetrics(WindowsDefs.SM_CXCURSOR),
                 win32.GetSystemMetrics(WindowsDefs.SM_CYCURSOR));
@@ -94,6 +97,7 @@
     /**
      * @see org.apache.harmony.awt.wtk.CursorFactory#getMaximumCursorColors()
      */
+    @Override
     public int getMaximumCursorColors() {
         long screenDC = win32.GetDC(0);
         int nColors = win32.GetDeviceCaps(screenDC, WindowsDefs.NUMCOLORS);



Mime
View raw message