harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ndbe...@apache.org
Subject svn commit: r823776 - in /harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/font/fontlib: FLFontManager.java FLGlyph.java
Date Sat, 10 Oct 2009 03:34:12 GMT
Author: ndbeyer
Date: Sat Oct 10 03:34:11 2009
New Revision: 823776

URL: http://svn.apache.org/viewvc?rev=823776&view=rev
Log:
cleanup unnecessary comments, unnecessary else statements, missing override annotations

Modified:
    harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/font/fontlib/FLFontManager.java
    harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/font/fontlib/FLGlyph.java

Modified: harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/font/fontlib/FLFontManager.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/font/fontlib/FLFontManager.java?rev=823776&r1=823775&r2=823776&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/font/fontlib/FLFontManager.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/font/fontlib/FLFontManager.java
Sat Oct 10 03:34:11 2009
@@ -27,7 +27,7 @@
 import java.util.ArrayList;
 import java.util.Enumeration;
 import java.util.Hashtable;
-import java.util.Iterator;
+import java.util.List;
 
 import org.apache.harmony.awt.gl.font.CompositeFont;
 import org.apache.harmony.awt.gl.font.FontManager;
@@ -36,7 +36,7 @@
 
 public class FLFontManager extends FontManager {
     
-    private ArrayList<Font> allFonts = new ArrayList<Font>(); 
+    private List<Font> allFonts = new ArrayList<Font>(); 
     
     static {
         org.apache.harmony.awt.Utils.loadLibrary("FL");
@@ -53,6 +53,7 @@
         initManager();
         
         addPath(new File(org.apache.harmony.awt.Utils.getSystemProperty("java.home") + "/lib/fonts/"));
+        // TODO this doesn't seem very portable - perhaps we should check WINDIR
         addPath(new File("C:\\WINNT\\Fonts"));
         addPath(new File("/usr/X11R6/lib/X11/fonts/Type1/"));
         addPath(new File("/usr/X11R6/lib/X11/fonts/truetype/"));
@@ -390,9 +391,8 @@
             if ((new File(path)).canRead()) {
                 //awt.9B=Can't create font - bad font data
                 throw new FontFormatException ( Messages.getString("awt.9B") ); //$NON-NLS-1$
                       
-            } else {
-                throw new IOException();
             }
+            throw new IOException();
         }
         
         allFonts.add(newFont);
@@ -425,6 +425,7 @@
      * @return platform dependent FontPeer implementation created from 
      * the specified parameters
      */
+    @Override
     public FontPeer getFontPeer(String fontName, int _fontStyle, int size) {
         
         //updateFontsTable();
@@ -471,6 +472,7 @@
      * @param style style of the font
      * @param size size of the font
      */
+    @Override
     public FontPeer getDefaultFont(int style, int size){
         
         FontPeer peer = null;

Modified: harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/font/fontlib/FLGlyph.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/font/fontlib/FLGlyph.java?rev=823776&r1=823775&r2=823776&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/font/fontlib/FLGlyph.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/font/fontlib/FLGlyph.java
Sat Oct 10 03:34:11 2009
@@ -38,8 +38,6 @@
     */
 
     FLGlyph(char c, long fontPeerPointer, int size) {
-//        System.out.println("create glyph char " + (new Integer(c)).intValue() + " " + c
+ " size " + size + " pfont " + fontPeerPointer);
-        
         glChar = c;
         glyphPointer = initGlyph(c, size, fontPeerPointer);
     }
@@ -95,18 +93,15 @@
     }
 
     @Override
-    public Shape initOutline(char arg0) {        
+    public Shape initOutline(char arg0) {
         return initOutline();
     }
     
+    @Override
     public GlyphMetrics getGlyphMetrics(){
         if (glMetrics == null) {
-            //System.out.println("getGlyphMetrics");
             float[] metrics = getGlyphMetrics(glyphPointer);
             
-//            System.out.println("x = " + metrics[0] + ", y = " + metrics[1]);
-//            System.out.println("after x = " + Math.round(metrics[0]) + ", y = " + Math.round(metrics[1]));
-            
             this.glMetrics = new GlyphMetrics(
                     true, 
                     Math.round(metrics[0]),//metrics[0], 
@@ -114,18 +109,13 @@
                     //new Rectangle2D.Double(initOutline().getBounds2D().getMinX(), initOutline().getBounds2D().getMinY(),
initOutline().getBounds2D().getMaxX() + 5, initOutline().getBounds2D().getMaxY()),       
            
                     initOutline().getBounds2D(),//new Rectangle2D.Float(metrics[2], -metrics[5]-1,metrics[4]-
metrics[2] + 1, metrics[5] - metrics[3] + 1),
                     GlyphMetrics.STANDARD);
-            
-            /*System.out.println("GlyphMetrics length " + metrics.length + " glyph " + new
Integer(glChar));
-            for (int i = 0; i < metrics.length; i ++) {
-                System.out.println(metrics[i]);
-            }*/
         }
         
         return glMetrics;
     }
     
+    @Override
     public GlyphMetrics getGlyphPointMetrics(){ 
-        //System.out.println("getGlyphPointMetrics");
         return glPointMetrics = getGlyphMetrics();
     }
     



Mime
View raw message