Author: vhennebert
Date: Tue Nov 16 12:25:06 2010
New Revision: 1035611

URL: http://svn.apache.org/viewvc?rev=1035611&view=rev
Log:
Re-ordered class members

Modified:
    
xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java

Modified: 
xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java?rev=1035611&r1=1035610&r2=1035611&view=diff
==============================================================================
--- 
xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java
 (original)
+++ 
xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java
 Tue Nov 16 12:25:06 2010
@@ -82,6 +82,14 @@ public class LineLayoutManager extends I
                                implements BlockLevelLayoutManager {
 
     /**
+     * this constant is used to create elements when text-align is center:
+     * every TextLM descendant of LineLM must use the same value,
+     * otherwise the line breaking algorithm does not find the right
+     * break point
+     */
+    public static final int DEFAULT_SPACE_WIDTH = 3336;
+
+    /**
      * logging instance
      */
     private static Log log = LogFactory.getLog(LineLayoutManager.class);
@@ -89,29 +97,6 @@ public class LineLayoutManager extends I
     private Block fobj;
     private boolean isFirstInBlock;
 
-    /** {...@inheritdoc} */
-    public void initialize() {
-        textAlignment = fobj.getTextAlign();
-        textAlignmentLast = fobj.getTextAlignLast();
-        textIndent = fobj.getTextIndent();
-        lastLineEndIndent = fobj.getLastLineEndIndent();
-        hyphenationProperties = fobj.getCommonHyphenation();
-        hyphenationLadderCount = fobj.getHyphenationLadderCount();
-        wrapOption = fobj.getWrapOption();
-        whiteSpaceTreament = fobj.getWhitespaceTreatment();
-        //
-        effectiveAlignment = getEffectiveAlignment(textAlignment, 
textAlignmentLast);
-        isFirstInBlock = (this == getParent().getChildLMs().get(0));
-    }
-
-    private int getEffectiveAlignment(int alignment, int alignmentLast) {
-        if (textAlignment != EN_JUSTIFY && textAlignmentLast == EN_JUSTIFY) {
-            return 0;
-        } else {
-            return textAlignment;
-        }
-    }
-
     /**
      * Private class to store information about inline breaks.
      * Each value holds the start and end indexes into a List of
@@ -183,15 +168,6 @@ public class LineLayoutManager extends I
     private boolean hyphenationPerformed;
 
     /**
-     * this constant is used to create elements when text-align is center:
-     * every TextLM descendant of LineLM must use the same value,
-     * otherwise the line breaking algorithm does not find the right
-     * break point
-     */
-    public static final int DEFAULT_SPACE_WIDTH = 3336;
-
-
-    /**
      * This class is used to remember
      * which was the first element in the paragraph
      * returned by each LM.
@@ -558,6 +534,29 @@ public class LineLayoutManager extends I
     }
 
     /** {...@inheritdoc} */
+    public void initialize() {
+        textAlignment = fobj.getTextAlign();
+        textAlignmentLast = fobj.getTextAlignLast();
+        textIndent = fobj.getTextIndent();
+        lastLineEndIndent = fobj.getLastLineEndIndent();
+        hyphenationProperties = fobj.getCommonHyphenation();
+        hyphenationLadderCount = fobj.getHyphenationLadderCount();
+        wrapOption = fobj.getWrapOption();
+        whiteSpaceTreament = fobj.getWhitespaceTreatment();
+        //
+        effectiveAlignment = getEffectiveAlignment(textAlignment, 
textAlignmentLast);
+        isFirstInBlock = (this == getParent().getChildLMs().get(0));
+    }
+
+    private int getEffectiveAlignment(int alignment, int alignmentLast) {
+        if (textAlignment != EN_JUSTIFY && textAlignmentLast == EN_JUSTIFY) {
+            return 0;
+        } else {
+            return textAlignment;
+        }
+    }
+
+    /** {...@inheritdoc} */
     public List getNextKnuthElements(LayoutContext context, int alignment) {
         if (alignmentContext == null) {
             FontInfo fi = fobj.getFOEventHandler().getFontInfo();



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to