You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by ac...@apache.org on 2007/12/05 18:35:32 UTC

svn commit: r601437 - /xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/fonts/CharacterSetOrientation.java

Author: acumiskey
Date: Wed Dec  5 09:35:31 2007
New Revision: 601437

URL: http://svn.apache.org/viewvc?rev=601437&view=rev
Log:
Checkstyle fixes

Modified:
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/fonts/CharacterSetOrientation.java

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/fonts/CharacterSetOrientation.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/fonts/CharacterSetOrientation.java?rev=601437&r1=601436&r2=601437&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/fonts/CharacterSetOrientation.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/fonts/CharacterSetOrientation.java Wed Dec  5 09:35:31 2007
@@ -19,7 +19,6 @@
 
 package org.apache.fop.render.afp.fonts;
 
-
 /**
  * The IBM Font Object Content Architecture (FOCA) supports presentation
  * of character shapes by defining their characteristics, which include
@@ -31,10 +30,10 @@
  * that you communicate this information clearly to rotate and position
  * characters correctly on the physical or logical page.
  *
- * This class proivdes font metric information for a particular font
+ * This class provides font metric information for a particular font
  * as by the orientation.
  *
- * This informtaion is obtained directly from the AFP font files which must
+ * This information is obtained directly from the AFP font files which must
  * be installed in the classpath under in the location specified by the path
  * attribute in the afp-font.xml file.
  * <p/>
@@ -44,53 +43,53 @@
     /**
      * The code page to which the character set relates
      */
-    private String _codePage;
+    private String codePage;
 
     /**
      * The encoding used for the code page
      */
-    private String _encoding;
+    private String encoding;
 
     /**
      * The ascender height for the character set
      */
-    private int _ascender;
+    private int ascender;
 
     /**
      * The descender depth for the character set
      */
-    private int _descender;
+    private int descender;
 
     /**
      * The height of capital letters
      */
-    private int _capHeight;
+    private int capHeight;
 
     /**
      * The characters in the charcater set
      */
-    private int[] _characters = new int[256];
+    private int[] chars = new int[256];
 
     /**
      * The height of lowercase letters
      */
-    private int _xHeight;
+    private int xHeight;
 
     /**
      * The first character
      */
-    private int _firstCharacter;
+    private int firstChar;
 
     /**
      * The last character
      */
-    private int _lastCharacter;
+    private int lastChar;
 
 
     /**
      * The character set orientation
      */
-    private int _orientation = 0;
+    private int orientation = 0;
 
     /**
      * Constructor for the CharacterSetOrientation, the orientation is
@@ -98,9 +97,7 @@
      * @param orientation the character set orientation
      */
     public CharacterSetOrientation(int orientation) {
-
-        _orientation = orientation;
-
+        this.orientation = orientation;
     }
 
     /**
@@ -116,7 +113,7 @@
      * @return the ascender value in millipoints
      */
     public int getAscender() {
-        return _ascender;
+        return ascender;
     }
 
     /**
@@ -126,7 +123,7 @@
      * @return the cap height value in millipoints
      */
     public int getCapHeight() {
-        return _capHeight;
+        return capHeight;
     }
 
     /**
@@ -136,7 +133,7 @@
      * @return the descender value in millipoints
      */
     public int getDescender() {
-        return _descender;
+        return descender;
     }
 
     /**
@@ -144,7 +141,7 @@
      * @return the first character
      */
     public int getFirstChar() {
-        return _firstCharacter;
+        return firstChar;
     }
 
     /**
@@ -152,7 +149,7 @@
      * @return the last character
      */
     public int getLastChar() {
-        return _lastCharacter;
+        return lastChar;
     }
 
     /**
@@ -160,7 +157,7 @@
      * @return the orientation
      */
     public int getOrientation() {
-        return _orientation;
+        return orientation;
     }
 
     /**
@@ -169,11 +166,9 @@
      * @return the widths of all characters
      */
     public int[] getWidths() {
-
         int arr[] = new int[(getLastChar() - getFirstChar()) + 1];
-        System.arraycopy(_characters, getFirstChar(), arr, 0, (getLastChar() - getFirstChar()) + 1);
+        System.arraycopy(chars, getFirstChar(), arr, 0, (getLastChar() - getFirstChar()) + 1);
         return arr;
-
     }
 
     /**
@@ -182,7 +177,7 @@
      * @return heightX the typical height of characters
      */
     public int getXHeight() {
-        return _xHeight;
+        return xHeight;
     }
 
     /**
@@ -192,7 +187,7 @@
      * @return the widths of the character
      */
     public int width(int character) {
-        return _characters[character];
+        return chars[character];
     }
 
     /**
@@ -208,7 +203,7 @@
      * @param ascender the ascender to set
      */
     public void setAscender(int ascender) {
-        _ascender = ascender;
+        this.ascender = ascender;
     }
 
     /**
@@ -218,7 +213,7 @@
      * @param capHeight the cap height to set
      */
     public void setCapHeight(int capHeight) {
-        _capHeight = capHeight;
+        this.capHeight = capHeight;
     }
 
     /**
@@ -228,23 +223,23 @@
      * @param descender the descender value in millipoints
      */
     public void setDescender(int descender) {
-        _descender = descender;
+        this.descender = descender;
     }
 
     /**
      * The first character in the character set
-     * @param firstCharacter the first character
+     * @param firstChar the first character
      */
-    public void setFirstChar(int firstCharacter) {
-        _firstCharacter = firstCharacter;
+    public void setFirstChar(int firstChar) {
+        this.firstChar = firstChar;
     }
 
     /**
      * The last character in the character set
-     * @param lastCharacter the last character
+     * @param lastChar the last character
      */
-    public void setLastChar(int lastCharacter) {
-        _lastCharacter = lastCharacter;
+    public void setLastChar(int lastChar) {
+        this.lastChar = lastChar;
     }
 
     /**
@@ -255,13 +250,13 @@
      */
     public void setWidth(int character, int width) {
 
-        if (character >= _characters.length) {
+        if (character >= chars.length) {
             // Increase the size of the array if necessary
-            int arr[] = new int[(character - _firstCharacter) + 1];
-            System.arraycopy(_characters, 0, arr, 0, _characters.length);
-            _characters = arr;
+            int arr[] = new int[(character - firstChar) + 1];
+            System.arraycopy(chars, 0, arr, 0, chars.length);
+            chars = arr;
         }
-        _characters[character] = width;
+        chars[character] = width;
 
     }
 
@@ -271,6 +266,6 @@
      * @param xHeight the typical height of characters
      */
     public void setXHeight(int xHeight) {
-        _xHeight = xHeight;
+        this.xHeight = xHeight;
     }
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org