]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Moved the interfaces into the Constants class on a trial basis (we may still
authorGlen Mazza <gmazza@apache.org>
Sat, 17 Jan 2004 19:29:46 +0000 (19:29 +0000)
committerGlen Mazza <gmazza@apache.org>
Sat, 17 Jan 2004 19:29:46 +0000 (19:29 +0000)
choose to remove them in favor of strictly using Constants.)  Two interfaces
(span and position) were removed because of conflicts with other class names.

The interface generation was moved into Constants.xsl, which is run manually
via the XsltToJava ant task and its output is then checked in.  As a result,
no more autogeneration of these interfaces at build time will be done.

git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@197213 13f79535-47bb-0310-9956-ffa450edef68

39 files changed:
build.xml
src/codegen/constants.xsl
src/codegen/prop-val-enum-interfaces.xsl [deleted file]
src/codegen/properties.xsl
src/java/org/apache/fop/area/CTM.java
src/java/org/apache/fop/area/PageViewport.java
src/java/org/apache/fop/area/inline/Leader.java
src/java/org/apache/fop/fo/Constants.java
src/java/org/apache/fop/fo/FOText.java
src/java/org/apache/fop/fo/PropertyList.java
src/java/org/apache/fop/fo/PropertyManager.java
src/java/org/apache/fop/fo/TextInfo.java
src/java/org/apache/fop/fo/flow/ExternalGraphic.java
src/java/org/apache/fop/fo/flow/Inline.java
src/java/org/apache/fop/fo/flow/InstreamForeignObject.java
src/java/org/apache/fop/fo/flow/Leader.java
src/java/org/apache/fop/fo/flow/Table.java
src/java/org/apache/fop/fo/flow/TableCell.java
src/java/org/apache/fop/fo/pagination/ConditionalPageMasterReference.java
src/java/org/apache/fop/fo/pagination/RegionAfter.java
src/java/org/apache/fop/fo/pagination/RegionBA.java
src/java/org/apache/fop/fo/pagination/RegionBefore.java
src/java/org/apache/fop/fo/pagination/RegionBody.java
src/java/org/apache/fop/fo/pagination/RegionEnd.java
src/java/org/apache/fop/fo/pagination/RegionSE.java
src/java/org/apache/fop/fo/pagination/RegionStart.java
src/java/org/apache/fop/layoutmgr/AbstractLayoutManager.java
src/java/org/apache/fop/layoutmgr/AddLMVisitor.java
src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java
src/java/org/apache/fop/layoutmgr/LeafNodeLayoutManager.java
src/java/org/apache/fop/layoutmgr/LineLayoutManager.java
src/java/org/apache/fop/layoutmgr/PageLayoutManager.java
src/java/org/apache/fop/render/AbstractRenderer.java
src/java/org/apache/fop/render/awt/AWTRenderer.java
src/java/org/apache/fop/render/pdf/PDFRenderer.java
src/java/org/apache/fop/render/ps/PSRenderer.java
src/java/org/apache/fop/render/svg/SVGRenderer.java
src/java/org/apache/fop/render/xml/XMLRenderer.java
src/java/org/apache/fop/tools/AreaTreeBuilder.java

index 5b308014e913cd79a1a4e74bbcd06420ae37ee0e..dfdc506573844e26f1d5e1c666f52a5db20c94c4 100644 (file)
--- a/build.xml
+++ b/build.xml
@@ -350,12 +350,15 @@ list of possible build targets.
       <targetfilelist dir="${basedir}" files="${build.gensrc}/${replacestring}/fo/properties/fo_${ignore_this},${build.gensrc}/${replacestring}/fo/properties/FOPropertyMapping.java,${build.gensrc}/${replacestring}/fo/properties/foenums_${ignore_this}"/>
     </dependset>
 
+
+    <!-- ${ignore_this} used for out attribute because XSL stylesheet has commands to 
+        write out to (many) files other than the one specified -->
     <style in="${foproperties.xml}" style="${properties.xsl}"
         out="${build.gensrc}/${replacestring}/fo/properties/fo_${ignore_this}"/>
     <style in="${foproperties.xml}" style="${build.codegen}/fo-property-mapping.xsl"
         out="${build.gensrc}/${replacestring}/fo/properties/FOPropertyMapping.java"/>
-    <style in="${foproperties.xml}" style="${build.codegen}/prop-val-enum-interfaces.xsl"
-        out="${build.gensrc}/${replacestring}/fo/properties/foenums_${ignore_this}"/>
+    <!--style in="${foproperties.xml}" style="${build.codegen}/prop-val-enum-interfaces.xsl"
+        out="${build.gensrc}/${replacestring}/fo/properties/propertyListing.java"/-->
     <style in="${encodings.xml}" style="${charlist.xsl}"
         out="${build.gensrc}/${replacestring}/fonts//CodePointMapping.java"/>
     <!--
index 1a2097d1045e81f677b0e54410f2c1eb0ff3ed29..871c79202505e486939e8fd60c128b2ba5945f3c 100644 (file)
@@ -46,7 +46,7 @@ This software consists of voluntary contributions made by many individuals
 on behalf of the Apache Software Foundation and was originally created by
 James Tauber <jtauber@jtauber.com>. For more information on the Apache
 Software Foundation, please see <http://www.apache.org/>.
---> 
+-->
 <xsl:stylesheet version="1.0"
                 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 
@@ -86,7 +86,6 @@ Software Foundation, please see <http://www.apache.org/>.
   </xsl:for-each>
 </xsl:variable>
 
-
 <xsl:variable name="elementlist">
   <xsl:for-each select="document(elementfile)//element">
     <xsl:sort select="name"/>
@@ -100,7 +99,15 @@ Software Foundation, please see <http://www.apache.org/>.
 
 <xsl:text>
 
-package org.apache.fop.fo.properties;
+package org.apache.fop.fo;
+
+import org.apache.fop.fo.properties.GenericBoolean;
+import org.apache.fop.fo.properties.GenericBorderStyle;
+import org.apache.fop.fo.properties.GenericBreak;
+import org.apache.fop.fo.properties.GenericCondBorderWidth;
+import org.apache.fop.fo.properties.GenericCondPadding;
+import org.apache.fop.fo.properties.GenericKeep;
+import org.apache.fop.fo.properties.GenericSpace;
 
 public interface Constants {</xsl:text>
 
@@ -114,7 +121,8 @@ public interface Constants {</xsl:text>
     int COMPOUND_SHIFT = 9;
     int PROPERTY_MASK = (1 &lt;&lt; COMPOUND_SHIFT)-1;
     int COMPOUND_MASK = ~PROPERTY_MASK;
-
+    int COMPOUND_COUNT = 11;
+    
     // property constants
 <xsl:call-template name="sortconsts">
   <xsl:with-param name="consts" select="$propertylist"/>
@@ -132,11 +140,59 @@ public interface Constants {</xsl:text>
   <xsl:with-param name="consts" select="$constlist"/>
 </xsl:call-template>
 
+   // Enumeration Interfaces
+<xsl:apply-templates select="document(propfile)//property[not(@type='generic')]"/>
+
 <xsl:text>
 }
 </xsl:text>
 </xsl:template>
 
+<xsl:template match="property">
+  <xsl:variable name="classname">
+    <xsl:choose>
+      <xsl:when test="class-name">
+        <xsl:value-of select="class-name"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:call-template name="makeClassName">
+          <xsl:with-param name="propstr" select="name"/>
+        </xsl:call-template>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+  <xsl:variable name="bEnum">
+    <xsl:call-template name="hasEnum"/>
+  </xsl:variable>
+  <xsl:variable name="bSubpropEnum">
+    <xsl:call-template name="hasSubpropEnum"/>
+  </xsl:variable>
+
+  <xsl:if test="$bEnum='true' or contains($bSubpropEnum, 'true')">
+    <!--redirect:write select="concat($classname, '.java')"-->
+      <!-- Handle enumeration values -->
+      <xsl:text>
+    public interface </xsl:text>
+      <xsl:value-of select="$classname"/>
+      <xsl:if test="use-generic">
+        <xsl:text> extends </xsl:text>
+        <xsl:value-of select="use-generic"/>
+        <xsl:text>.Enums</xsl:text>
+      </xsl:if>
+      <xsl:text> {</xsl:text>
+      <xsl:for-each select="enumeration/value">
+        <xsl:text>
+        int </xsl:text>
+        <xsl:value-of select="@const"/>
+        <xsl:text> = Constants.</xsl:text>
+        <xsl:value-of select="@const"/>
+        <xsl:text>;</xsl:text>
+      </xsl:for-each>
+      <xsl:text> }
+</xsl:text>
+  </xsl:if>
+</xsl:template>
+
 <xsl:template name="sortconsts">
 <xsl:param name="consts"/>
 <xsl:param name="prevconst"/>
diff --git a/src/codegen/prop-val-enum-interfaces.xsl b/src/codegen/prop-val-enum-interfaces.xsl
deleted file mode 100644 (file)
index 4832334..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
-<!--
-$Id$
-============================================================================
-                   The Apache Software License, Version 1.1
-============================================================================
-
-Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modifica-
-tion, are permitted provided that the following conditions are met:
-
-1. Redistributions of source code must retain the above copyright notice,
-   this list of conditions and the following disclaimer.
-
-2. Redistributions in binary form must reproduce the above copyright notice,
-   this list of conditions and the following disclaimer in the documentation
-   and/or other materials provided with the distribution.
-
-3. The end-user documentation included with the redistribution, if any, must
-   include the following acknowledgment: "This product includes software
-   developed by the Apache Software Foundation (http://www.apache.org/)."
-   Alternately, this acknowledgment may appear in the software itself, if
-   and wherever such third-party acknowledgments normally appear.
-
-4. The names "FOP" and "Apache Software Foundation" must not be used to
-   endorse or promote products derived from this software without prior
-   written permission. For written permission, please contact
-   apache@apache.org.
-
-5. Products derived from this software may not be called "Apache", nor may
-   "Apache" appear in their name, without prior written permission of the
-   Apache Software Foundation.
-
-THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
-INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
-DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-============================================================================
-
-This software consists of voluntary contributions made by many individuals
-on behalf of the Apache Software Foundation and was originally created by
-James Tauber <jtauber@jtauber.com>. For more information on the Apache
-Software Foundation, please see <http://www.apache.org/>.
---> 
-<xsl:stylesheet version="1.0"
-                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:lxslt="http://xml.apache.org/xslt"
-                xmlns:redirect="org.apache.xalan.xslt.extensions.Redirect"
-                extension-element-prefixes="redirect">
-
-<xsl:include href="./propinc.xsl"/>
-
-<xsl:output method="text" />
-
-<!-- zap text content -->
-<xsl:template match="text()"/>
-
-<xsl:template match="property[not(@type='generic')]">
-  <xsl:variable name="classname">
-    <xsl:choose>
-      <xsl:when test="class-name">
-        <xsl:value-of select="class-name"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:call-template name="makeClassName">
-          <xsl:with-param name="propstr" select="name"/>
-        </xsl:call-template>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-  <xsl:variable name="bEnum">
-    <xsl:call-template name="hasEnum"/>
-  </xsl:variable>
-  <xsl:variable name="bSubpropEnum">
-    <xsl:call-template name="hasSubpropEnum"/>
-  </xsl:variable>
-
-  <xsl:if test="$bEnum='true' or contains($bSubpropEnum, 'true')">
-    <redirect:write select="concat($classname, '.java')">
-      <xsl:text>package org.apache.fop.fo.properties;
-
-import org.apache.fop.fo.Constants;
-
-</xsl:text>
-      <!-- Handle enumeration values -->
-      <xsl:text>
-    public interface </xsl:text>
-      <xsl:value-of select="$classname"/>
-      <xsl:if test="use-generic">
-        <xsl:text> extends </xsl:text>
-        <xsl:value-of select="use-generic"/>
-        <xsl:text>.Enums</xsl:text>
-      </xsl:if>
-      <xsl:text> {</xsl:text>
-      <xsl:for-each select="enumeration/value">
-        <xsl:text>
-        int </xsl:text>
-        <xsl:value-of select="@const"/>
-        <xsl:text> = Constants.</xsl:text>
-        <xsl:value-of select="@const"/>
-        <xsl:text>;</xsl:text>
-      </xsl:for-each>
-      <xsl:text> }
-</xsl:text>
-    </redirect:write>
-  </xsl:if>
-</xsl:template>
-
-</xsl:stylesheet>
index c2e00f1a546c2d60c023e3347cce27beaf5504f9..bf37f9ea63541df023b3a74d8a6cf66afa3429fd 100644 (file)
@@ -306,7 +306,7 @@ Software Foundation, please see <http://www.apache.org/>.
     <!-- Is this property an Enum or derived from a generic Enum -->
     <xsl:variable name="enumconst">
       <xsl:if test="enumeration/value and not(@type='generic')">
-        <xsl:text> implements </xsl:text><xsl:value-of select="$eclassname"/></xsl:if>
+        <xsl:text> implements Constants</xsl:text></xsl:if>
     </xsl:variable>
 
     <redirect:write select="concat($classname, '.java')">
@@ -758,7 +758,7 @@ public class </xsl:text>
             int correspondingValue = correspondingProperty.getEnum();</xsl:text>
         <xsl:for-each select="derive/if">
           <xsl:text>
-            if (correspondingValue == </xsl:text>
+            if (correspondingValue == Constants.</xsl:text>
           <xsl:value-of select="@match"/>
           <xsl:text>)
                 computedProperty = new EnumProperty(</xsl:text>
index d8e68db3644d04eddd5535b7c835913f9384124d..56cda6b19caff684e5cb46e021d7e539d8dac65e 100644 (file)
@@ -55,7 +55,7 @@ import java.awt.geom.Rectangle2D;
 import java.io.Serializable;
 
 import org.apache.fop.datatypes.FODimension;
-import org.apache.fop.fo.properties.WritingMode;
+import org.apache.fop.fo.Constants;
 
 /**
  * Describe a PDF or PostScript style coordinate transformation matrix (CTM).
@@ -145,15 +145,15 @@ public class CTM implements Serializable {
     public static CTM getWMctm(int wm, int ipd, int bpd) {
         CTM wmctm;
         switch (wm) {
-            case WritingMode.LR_TB:
+            case Constants.WritingMode.LR_TB:
                 return new CTM(CTM_LRTB);
-            case WritingMode.RL_TB: {
+            case Constants.WritingMode.RL_TB: {
                     wmctm = new CTM(CTM_RLTB);
                     wmctm.e = ipd;
                     return wmctm;
                 }
                 //return  CTM_RLTB.translate(ipd, 0);
-            case WritingMode.TB_RL: { // CJK
+            case Constants.WritingMode.TB_RL: { // CJK
                     wmctm = new CTM(CTM_TBRL);
                     wmctm.e = bpd;
                     return wmctm;
@@ -331,7 +331,7 @@ public class CTM implements Serializable {
          * can set ipd and bpd appropriately based on the writing mode.
          */
 
-        if (writingMode == WritingMode.LR_TB || writingMode == WritingMode.RL_TB) {
+        if (writingMode == Constants.WritingMode.LR_TB || writingMode == Constants.WritingMode.RL_TB) {
             reldims.ipd = width;
             reldims.bpd = height;
         } else {
index df8c4bed0768a8e61b69d47694b913bfe2e4bb42..c06715fff891212cbd3b94e2f06f7aca7cf73f2b 100644 (file)
@@ -59,7 +59,7 @@ import java.util.Map;
 import java.util.HashMap;
 import java.util.Iterator;
 
-import org.apache.fop.fo.properties.RetrievePosition;
+import org.apache.fop.fo.Constants;
 
 /**
  * Page viewport that specifies the viewport area and holds the page contents.
@@ -307,7 +307,7 @@ public class PageViewport implements Resolveable, Cloneable {
     public Object getMarker(String name, int pos) {
         Object mark = null;
         switch (pos) {
-            case RetrievePosition.FSWP:
+            case Constants.RetrievePosition.FSWP:
                 if (markerFirstStart != null) {
                     mark = markerFirstStart.get(name);
                 }
@@ -315,12 +315,12 @@ public class PageViewport implements Resolveable, Cloneable {
                     mark = markerFirstAny.get(name);
                 }
             break;
-            case RetrievePosition.FIC:
+            case Constants.RetrievePosition.FIC:
                 if (markerFirstAny != null) {
                     mark = markerFirstAny.get(name);
                 }
             break;
-            case RetrievePosition.LSWP:
+            case Constants.RetrievePosition.LSWP:
                 if (markerLastStart != null) {
                     mark = markerLastStart.get(name);
                 }
@@ -328,7 +328,7 @@ public class PageViewport implements Resolveable, Cloneable {
                     mark = markerLastAny.get(name);
                 }
             break;
-            case RetrievePosition.LEWP:
+            case Constants.RetrievePosition.LEWP:
                 if (markerLastEnd != null) {
                     mark = markerLastEnd.get(name);
                 }
index dd503bcd8c67b7bfb5dfbed46c03267d7b9ceda1..d535fc99b7bc0b5e625c25258330f1465bd298da 100644 (file)
@@ -50,7 +50,7 @@
  */
 package org.apache.fop.area.inline;
 
-import org.apache.fop.fo.properties.RuleStyle;
+import org.apache.fop.fo.Constants;
 
 /**
  * This is a leader inline area.
@@ -63,7 +63,7 @@ public class Leader extends InlineArea {
     // if space replaced with a space
     // otherwise this is a holder for a line
 
-    private int ruleStyle = RuleStyle.SOLID;
+    private int ruleStyle = Constants.RuleStyle.SOLID;
     private int ruleThickness = 1000;
 
     /**
index ac3d8ad1533a9e2d40fd53cde1428b86852a254b..52be6267fd068eb81a72d48ca2fe6ea4beb45330 100644 (file)
@@ -1,4 +1,5 @@
-/* $Id$
+/*
+ * $Id$
  * ============================================================================
  *                    The Apache Software License, Version 1.1
  * ============================================================================
  * on behalf of the Apache Software Foundation and was originally created by
  * James Tauber <jtauber@jtauber.com>. For more information on the Apache
  * Software Foundation, please see <http://www.apache.org/>.
-*/
+ */
+
 package org.apache.fop.fo;
 
+import org.apache.fop.fo.properties.GenericBoolean;
+import org.apache.fop.fo.properties.GenericBorderStyle;
+import org.apache.fop.fo.properties.GenericBreak;
+import org.apache.fop.fo.properties.GenericCondBorderWidth;
+import org.apache.fop.fo.properties.GenericCondPadding;
+import org.apache.fop.fo.properties.GenericKeep;
+import org.apache.fop.fo.properties.GenericSpace;
+
 public interface Constants {
 
     // element constants
+
     int FO_BASIC_LINK = 1;
     int FO_BIDI_OVERRIDE = 2;
     int FO_BLOCK = 3;
@@ -110,12 +121,15 @@ public interface Constants {
     int FO_WRAPPER = 56;
     int ELEMENT_COUNT = 56;
     
+
     // Masks
     int COMPOUND_SHIFT = 9;
     int PROPERTY_MASK = (1 << COMPOUND_SHIFT)-1;
     int COMPOUND_MASK = ~PROPERTY_MASK;
-
+    int COMPOUND_COUNT = 11;
+    
     // property constants
+
     int PR_ABSOLUTE_POSITION = 1;
     int PR_ACTIVE_STATE = 2;
     int PR_ALIGNMENT_ADJUST = 3;
@@ -365,7 +379,9 @@ public interface Constants {
     int PR_Z_INDEX = 247;
     int PROPERTY_COUNT = 247;
     
+
     // compound property constants
+
     int CP_BLOCK_PROGRESSION_DIRECTION = 1 << COMPOUND_SHIFT;
     int CP_CONDITIONALITY = 2 << COMPOUND_SHIFT;
     int CP_INLINE_PROGRESSION_DIRECTION = 3 << COMPOUND_SHIFT;
@@ -379,6 +395,7 @@ public interface Constants {
     int CP_WITHIN_PAGE = 11 << COMPOUND_SHIFT;
 
     // Enumeration constants
+
     int ABSOLUTE = 1;
     int ABSOLUTE_COLORMETRIC = 2;
     int AFTER = 3;
@@ -486,4 +503,269 @@ public interface Constants {
     int VISIBLE = 105;
     int WRAP = 106;
 
+   // Enumeration Interfaces
+
+    public interface AbsolutePosition {
+        int AUTO = Constants.AUTO;
+        int FIXED = Constants.FIXED;
+        int ABSOLUTE = Constants.ABSOLUTE; }
+
+    public interface BackgroundRepeat {
+        int REPEAT = Constants.REPEAT;
+        int REPEATX = Constants.REPEATX;
+        int REPEATY = Constants.REPEATY;
+        int NOREPEAT = Constants.NOREPEAT; }
+
+    public interface BorderBeforeStyle extends GenericBorderStyle.Enums { }
+
+    public interface BorderBeforeWidth extends GenericCondBorderWidth.Enums { }
+
+    public interface BorderAfterStyle extends GenericBorderStyle.Enums { }
+
+    public interface BorderAfterWidth extends GenericCondBorderWidth.Enums { }
+
+    public interface BorderStartStyle extends GenericBorderStyle.Enums { }
+
+    public interface BorderStartWidth extends GenericCondBorderWidth.Enums { }
+
+    public interface BorderEndStyle extends GenericBorderStyle.Enums { }
+
+    public interface BorderEndWidth extends GenericCondBorderWidth.Enums { }
+
+    public interface BorderTopStyle extends GenericBorderStyle.Enums { }
+
+    public interface BorderBottomStyle extends GenericBorderStyle.Enums { }
+
+    public interface BorderLeftStyle extends GenericBorderStyle.Enums { }
+
+    public interface BorderRightStyle extends GenericBorderStyle.Enums { }
+
+    public interface PaddingBefore extends GenericCondPadding.Enums { }
+
+    public interface PaddingAfter extends GenericCondPadding.Enums { }
+
+    public interface PaddingStart extends GenericCondPadding.Enums { }
+
+    public interface PaddingEnd extends GenericCondPadding.Enums { }
+
+    public interface FontVariant {
+        int NORMAL = Constants.NORMAL;
+        int SMALL_CAPS = Constants.SMALL_CAPS; }
+
+    public interface Hyphenate {
+        int TRUE = Constants.TRUE;
+        int FALSE = Constants.FALSE; }
+
+    public interface SpaceBefore extends GenericSpace.Enums { }
+
+    public interface SpaceAfter extends GenericSpace.Enums { }
+
+    public interface SpaceEnd extends GenericSpace.Enums { }
+
+    public interface SpaceStart extends GenericSpace.Enums { }
+
+    public interface BaselineShift {
+        int BASELINE = Constants.BASELINE;
+        int SUB = Constants.SUB;
+        int SUPER = Constants.SUPER; }
+
+    public interface DisplayAlign {
+        int BEFORE = Constants.BEFORE;
+        int AFTER = Constants.AFTER;
+        int CENTER = Constants.CENTER;
+        int AUTO = Constants.AUTO; }
+
+    public interface RelativeAlign {
+        int BEFORE = Constants.BEFORE;
+        int BASELINE = Constants.BASELINE; }
+
+    public interface Scaling {
+        int UNIFORM = Constants.UNIFORM;
+        int NON_UNIFORM = Constants.NON_UNIFORM; }
+
+    public interface LinefeedTreatment {
+        int IGNORE = Constants.IGNORE;
+        int PRESERVE = Constants.PRESERVE;
+        int TREAT_AS_SPACE = Constants.TREAT_AS_SPACE;
+        int TREAT_AS_ZERO_WIDTH_SPACE = Constants.TREAT_AS_ZERO_WIDTH_SPACE; }
+
+    public interface TextAlign {
+        int CENTER = Constants.CENTER;
+        int END = Constants.END;
+        int START = Constants.START;
+        int JUSTIFY = Constants.JUSTIFY; }
+
+    public interface TextAlignLast {
+        int CENTER = Constants.CENTER;
+        int END = Constants.END;
+        int START = Constants.START;
+        int JUSTIFY = Constants.JUSTIFY; }
+
+    public interface WhiteSpaceCollapse extends GenericBoolean.Enums { }
+
+    public interface WrapOption {
+        int WRAP = Constants.WRAP;
+        int NO_WRAP = Constants.NO_WRAP; }
+
+    public interface TextDecoration {
+        int NONE = Constants.NONE;
+        int UNDERLINE = Constants.UNDERLINE;
+        int OVERLINE = Constants.OVERLINE;
+        int LINE_THROUGH = Constants.LINE_THROUGH;
+        int BLINK = Constants.BLINK;
+        int NO_UNDERLINE = Constants.NO_UNDERLINE;
+        int NO_OVERLINE = Constants.NO_OVERLINE;
+        int NO_LINE_THROUGH = Constants.NO_LINE_THROUGH;
+        int NO_BLINK = Constants.NO_BLINK; }
+
+    public interface TextTransform {
+        int NONE = Constants.NONE;
+        int CAPITALIZE = Constants.CAPITALIZE;
+        int UPPERCASE = Constants.UPPERCASE;
+        int LOWERCASE = Constants.LOWERCASE; }
+
+    public interface WordSpacing extends GenericSpace.Enums { }
+
+    public interface RenderingIntent {
+        int AUTO = Constants.AUTO;
+        int PERCEPTUAL = Constants.PERCEPTUAL;
+        int RELATIVE_COLOMETRIC = Constants.RELATIVE_COLOMETRIC;
+        int SATURATION = Constants.SATURATION;
+        int ABSOLUTE_COLORMETRIC = Constants.ABSOLUTE_COLORMETRIC; }
+
+    public interface BreakAfter extends GenericBreak.Enums { }
+
+    public interface BreakBefore extends GenericBreak.Enums { }
+
+    public interface KeepTogether extends GenericKeep.Enums { }
+
+    public interface KeepWithNext extends GenericKeep.Enums { }
+
+    public interface KeepWithPrevious extends GenericKeep.Enums { }
+
+    public interface Overflow {
+        int VISIBLE = Constants.VISIBLE;
+        int HIDDEN = Constants.HIDDEN;
+        int SCROLL = Constants.SCROLL;
+        int ERROR_IF_OVERFLOW = Constants.ERROR_IF_OVERFLOW;
+        int AUTO = Constants.AUTO; }
+
+/*    public interface Span {   conflicts with Area.Span 
+        int NONE = Constants.NONE;
+        int ALL = Constants.ALL; }  */
+
+    public interface LeaderAlignment {
+        int NONE = Constants.NONE;
+        int REFERENCE_AREA = Constants.REFERENCE_AREA;
+        int PAGE = Constants.PAGE; }
+
+    public interface LeaderPattern {
+        int SPACE = Constants.SPACE;
+        int RULE = Constants.RULE;
+        int DOTS = Constants.DOTS;
+        int USECONTENT = Constants.USECONTENT; }
+
+    public interface RuleStyle {
+        int NONE = Constants.NONE;
+        int DOTTED = Constants.DOTTED;
+        int DASHED = Constants.DASHED;
+        int SOLID = Constants.SOLID;
+        int DOUBLE = Constants.DOUBLE;
+        int GROOVE = Constants.GROOVE;
+        int RIDGE = Constants.RIDGE; }
+
+    public interface RetrievePosition {
+        int FSWP = Constants.FSWP;
+        int FIC = Constants.FIC;
+        int LSWP = Constants.LSWP;
+        int LEWP = Constants.LEWP; }
+
+    public interface RetrieveBoundary {
+        int PAGE = Constants.PAGE;
+        int PAGE_SEQUENCE = Constants.PAGE_SEQUENCE;
+        int DOCUMENT = Constants.DOCUMENT; }
+
+    public interface LetterValue {
+        int ALPHABETIC = Constants.ALPHABETIC;
+        int TRADITIONAL = Constants.TRADITIONAL;
+        int AUTO = Constants.AUTO; }
+
+    public interface BlankOrNotBlank {
+        int BLANK = Constants.BLANK;
+        int NOT_BLANK = Constants.NOT_BLANK;
+        int ANY = Constants.ANY; }
+
+    public interface ForcePageCount {
+        int EVEN = Constants.EVEN;
+        int ODD = Constants.ODD;
+        int END_ON_EVEN = Constants.END_ON_EVEN;
+        int END_ON_ODD = Constants.END_ON_ODD;
+        int NO_FORCE = Constants.NO_FORCE;
+        int AUTO = Constants.AUTO; }
+
+    public interface OddOrEven {
+        int ODD = Constants.ODD;
+        int EVEN = Constants.EVEN;
+        int ANY = Constants.ANY; }
+
+    public interface PagePosition {
+        int FIRST = Constants.FIRST;
+        int LAST = Constants.LAST;
+        int REST = Constants.REST;
+        int ANY = Constants.ANY; }
+
+    public interface Precedence {
+        int TRUE = Constants.TRUE;
+        int FALSE = Constants.FALSE; }
+
+    public interface BorderCollapse {
+        int SEPARATE = Constants.SEPARATE;
+        int COLLAPSE = Constants.COLLAPSE; }
+
+    public interface CaptionSide {
+        int BEFORE = Constants.BEFORE;
+        int AFTER = Constants.AFTER;
+        int START = Constants.START;
+        int END = Constants.END;
+        int TOP = Constants.TOP;
+        int BOTTOM = Constants.BOTTOM;
+        int LEFT = Constants.LEFT;
+        int RIGHT = Constants.RIGHT; }
+
+    public interface TableLayout {
+        int AUTO = Constants.AUTO;
+        int FIXED = Constants.FIXED; }
+
+    public interface TableOmitFooterAtBreak extends GenericBoolean.Enums { }
+
+    public interface TableOmitHeaderAtBreak extends GenericBoolean.Enums { }
+
+    public interface WritingMode {
+        int LR_TB = Constants.LR_TB;
+        int RL_TB = Constants.RL_TB;
+        int TB_RL = Constants.TB_RL; }
+
+/*    public interface Position {  conflicts with layoutmgr.Position
+        int STATIC = Constants.STATIC;
+        int RELATIVE = Constants.RELATIVE;
+        int ABSOLUTE = Constants.ABSOLUTE;
+        int FIXED = Constants.FIXED; } */
+
+    public interface VerticalAlign {
+        int BASELINE = Constants.BASELINE;
+        int MIDDLE = Constants.MIDDLE;
+        int SUB = Constants.SUB;
+        int SUPER = Constants.SUPER;
+        int TEXT_TOP = Constants.TEXT_TOP;
+        int TEXT_BOTTOM = Constants.TEXT_BOTTOM;
+        int TOP = Constants.TOP;
+        int BOTTOM = Constants.BOTTOM; }
+
+    public interface WhiteSpaceTreatment {
+        int IGNORE = Constants.IGNORE;
+        int PRESERVE = Constants.PRESERVE;
+        int IGNORE_IF_BEFORE_LINEFEED = Constants.IGNORE_IF_BEFORE_LINEFEED;
+        int IGNORE_IF_AFTER_LINEFEED = Constants.IGNORE_IF_AFTER_LINEFEED;
+        int IGNORE_IF_SURROUNDING_LINEFEED = Constants.IGNORE_IF_SURROUNDING_LINEFEED; }
+
 }
index 91a346e58a18b5cbff6990d293767485304ca43d..5243c0560544382f599f23fe43b45695eff06f3f 100644 (file)
@@ -54,10 +54,8 @@ package org.apache.fop.fo;
 import java.util.NoSuchElementException;
 
 // FOP
-import org.apache.fop.fo.properties.WhiteSpaceCollapse;
 import org.apache.fop.fo.flow.Block;
 import org.apache.fop.fo.pagination.Root;
-import org.apache.fop.fo.properties.TextTransform;
 
 /**
  * A text node in the formatting object tree.
index b0935d42d1541093f84bab561c1ba395e7e21044..03660cc78a3d12533d8d16c9e7296fec445ce102 100644 (file)
@@ -58,7 +58,6 @@ import org.xml.sax.Attributes;
 import org.apache.fop.apps.FOPException;
 import org.apache.fop.fo.Property.Maker;
 import org.apache.fop.fo.properties.FOPropertyMapping;
-import org.apache.fop.fo.properties.WritingMode;
 
 
 /**
@@ -110,15 +109,15 @@ public class PropertyList extends HashMap {
 
     private static final HashMap WRITING_MODE_TABLES = new HashMap(4);
     {
-        WRITING_MODE_TABLES.put(new Integer(WritingMode.LR_TB),    /* lr-tb */
+        WRITING_MODE_TABLES.put(new Integer(Constants.WritingMode.LR_TB),    /* lr-tb */
         new byte[] {
             START, END, BEFORE, AFTER, BLOCKPROGDIM, INLINEPROGDIM
         });
-        WRITING_MODE_TABLES.put(new Integer(WritingMode.RL_TB),    /* rl-tb */
+        WRITING_MODE_TABLES.put(new Integer(Constants.WritingMode.RL_TB),    /* rl-tb */
         new byte[] {
             END, START, BEFORE, AFTER, BLOCKPROGDIM, INLINEPROGDIM
         });
-        WRITING_MODE_TABLES.put(new Integer(WritingMode.TB_RL),    /* tb-rl */
+        WRITING_MODE_TABLES.put(new Integer(Constants.WritingMode.TB_RL),    /* tb-rl */
         new byte[] {
             AFTER, BEFORE, START, END, INLINEPROGDIM, BLOCKPROGDIM
         });
@@ -385,9 +384,9 @@ public class PropertyList extends HashMap {
      */
     public int wmMap(int lrtb, int rltb, int tbrl) {
         switch (writingMode) {
-        case WritingMode.LR_TB: return lrtb;
-        case WritingMode.RL_TB: return rltb;
-        case WritingMode.TB_RL: return tbrl;
+        case Constants.WritingMode.LR_TB: return lrtb;
+        case Constants.WritingMode.RL_TB: return rltb;
+        case Constants.WritingMode.TB_RL: return tbrl;
         }
         return -1;
     }
index aef23a39c7ec5bebf4c701560d9dc95cb5d56ff2..cbb5f98fccbd7c51f32841ebe2c0c3f301d0c632 100644 (file)
@@ -64,7 +64,6 @@ import org.apache.fop.traits.BlockProps;
 import org.apache.fop.traits.InlineProps;
 import org.apache.fop.traits.SpaceVal;
 import org.apache.fop.traits.LayoutProps; // keep, break, span, space?
-import org.apache.fop.fo.properties.Span;
 import org.apache.fop.fonts.FontMetrics;
 import org.apache.fop.fo.properties.CommonHyphenation;
 
@@ -454,7 +453,7 @@ public class PropertyManager implements Constants {
         LayoutProps props = new LayoutProps();
         props.breakBefore = this.propertyList.get(PR_BREAK_BEFORE).getEnum();
         props.breakAfter = this.propertyList.get(PR_BREAK_AFTER).getEnum();
-        props.bIsSpan = (this.propertyList.get(PR_SPAN).getEnum() == Span.ALL);
+        props.bIsSpan = (this.propertyList.get(PR_SPAN).getEnum() == Constants.ALL);
         props.spaceBefore = new SpaceVal(
                               this.propertyList.get(PR_SPACE_BEFORE).getSpace());
         props.spaceAfter = new SpaceVal(
index a84ab6c3c6227e4365cf94d54a9d7e516650fdeb..23b7a57d704fde21ba3e514723e40d6fc82fc5bb 100644 (file)
@@ -54,7 +54,6 @@ package org.apache.fop.fo;
 import org.apache.fop.fonts.Font;
 import org.apache.fop.datatypes.ColorType;
 import org.apache.fop.traits.SpaceVal;
-import org.apache.fop.fo.properties.TextTransform;
 
 /**
  * Collection of properties used in
@@ -75,7 +74,7 @@ public class TextInfo {
     /** fo:line-height property */
     public int lineHeight;
     /** fo:text-transform property */
-    public int textTransform = TextTransform.NONE;
+    public int textTransform = Constants.TextTransform.NONE;
 
     // Props used for calculating inline-progression-dimension
     /** fo:word-spacing property */
index dbead8df8c39f0a193354248247ef56c798214b3..e7e6085b702a370d6e032b5e47d5b11c2ad6366e 100644 (file)
@@ -58,10 +58,6 @@ import org.apache.fop.apps.FOPException;
 import org.apache.fop.fo.FONode;
 import org.apache.fop.fo.FObj;
 import org.apache.fop.fo.FOTreeVisitor;
-import org.apache.fop.fo.properties.TextAlign;
-import org.apache.fop.fo.properties.Overflow;
-import org.apache.fop.fo.properties.DisplayAlign;
-import org.apache.fop.fo.properties.Scaling;
 import org.apache.fop.image.ImageFactory;
 import org.apache.fop.image.FopImage;
 import org.apache.fop.datatypes.Length;
index 071e0255034f0da312f1c798f89389aaaa6e02bb..a49d880a23ba1a5bfe8542bf930bbf78790cc3dd 100644 (file)
@@ -59,7 +59,6 @@ import org.apache.fop.fo.FONode;
 import org.apache.fop.fo.FObjMixed;
 import org.apache.fop.fo.InlineCharIterator;
 import org.apache.fop.fo.FOTreeVisitor;
-import org.apache.fop.fo.properties.TextDecoration;
 import org.apache.fop.fo.properties.CommonAccessibility;
 import org.apache.fop.fo.properties.CommonAural;
 import org.apache.fop.fo.properties.CommonBackground;
index 1987dec139aa1fa4243a7f9a3f86c13ee9cd8676..0a01806d96388ce0b5cad6cb0a3748c7b1c7ea0f 100644 (file)
@@ -53,8 +53,6 @@ package org.apache.fop.fo.flow;
 import org.apache.fop.fo.FONode;
 import org.apache.fop.fo.FOTreeVisitor;
 import org.apache.fop.fo.FObj;
-import org.apache.fop.fo.properties.DisplayAlign;
-import org.apache.fop.fo.properties.TextAlign;
 
 /**
  * The instream-foreign-object flow formatting object.
index 3bb07c739492e49fa03e1525959b7c667d2372e6..55cb47fb6bf2b8256816d4c12ada605cae6b6a1d 100644 (file)
@@ -63,7 +63,6 @@ import org.apache.fop.fo.properties.CommonBorderAndPadding;
 import org.apache.fop.fo.properties.CommonMarginInline;
 import org.apache.fop.fo.properties.CommonRelativePosition;
 import org.apache.fop.fo.properties.FOPropertyMapping;
-import org.apache.fop.fo.properties.LeaderPattern;
 import org.apache.fop.fonts.Font;
 
 /**
index c9da18daccbc37028d86cba265b1c772df807c00..fbe6be4273b5b0fa99ba4d1d8225ad1be11abee1 100644 (file)
@@ -63,9 +63,6 @@ import org.apache.fop.datatypes.LengthRange;
 import org.apache.fop.fo.FONode;
 import org.apache.fop.fo.FObj;
 import org.apache.fop.fo.FOTreeVisitor;
-import org.apache.fop.fo.properties.TableLayout;
-import org.apache.fop.fo.properties.TableOmitFooterAtBreak;
-import org.apache.fop.fo.properties.TableOmitHeaderAtBreak;
 import org.apache.fop.fo.properties.CommonAccessibility;
 import org.apache.fop.fo.properties.CommonAural;
 import org.apache.fop.fo.properties.CommonBackground;
index 461f755c2ad73c27c375e26f2217fc142364892e..781f5342c6aa26bead79c40f16f804725f5112d0 100644 (file)
@@ -59,8 +59,6 @@ import org.apache.fop.datatypes.ColorType;
 import org.apache.fop.fo.FONode;
 import org.apache.fop.fo.FObj;
 import org.apache.fop.fo.FOTreeVisitor;
-import org.apache.fop.fo.properties.BorderCollapse;
-import org.apache.fop.fo.properties.DisplayAlign;
 
 import org.apache.fop.fo.properties.CommonAccessibility;
 import org.apache.fop.fo.properties.CommonAural;
index e1a74743e2a9505d7af4af97934ee5098b41c965..ae64aeaf1c3b218f5e0f730e316eaf7efdc13493 100644 (file)
@@ -57,9 +57,6 @@ import org.xml.sax.Attributes;
 import org.apache.fop.fo.FONode;
 import org.apache.fop.fo.FObj;
 import org.apache.fop.fo.FOTreeVisitor;
-import org.apache.fop.fo.properties.BlankOrNotBlank;
-import org.apache.fop.fo.properties.OddOrEven;
-import org.apache.fop.fo.properties.PagePosition;
 import org.apache.fop.apps.FOPException;
 
 /**
index ef8a4a07c99a6170bd7c97ad6484a56ce167c8f3..a28975643a923beba69fa3907e0e44746610ab3b 100644 (file)
@@ -56,7 +56,6 @@ import java.awt.Rectangle;
 // FOP
 import org.apache.fop.fo.FONode;
 import org.apache.fop.fo.FOTreeVisitor;
-import org.apache.fop.fo.properties.WritingMode;
 import org.apache.fop.datatypes.FODimension;
 
 /**
index e9d985770951f4f54e036566e4f0e989bf9f5355..354d82cbdd077373e224340b7a106715636cfad5 100644 (file)
@@ -55,8 +55,6 @@ import java.awt.Rectangle;
 
 // FOP
 import org.apache.fop.fo.FONode;
-import org.apache.fop.fo.properties.Precedence;
-import org.apache.fop.fo.properties.WritingMode;
 import org.apache.fop.fo.FOTreeVisitor;
 
 /**
index f8df4b06c15343236b6d3056da4fb1eef05deb2d..0cc332b9cb5b1de9baf58593795d17ceb27da2dc 100644 (file)
@@ -52,7 +52,6 @@ package org.apache.fop.fo.pagination;
 
 // FOP
 import org.apache.fop.datatypes.FODimension;
-import org.apache.fop.fo.properties.WritingMode;
 import org.apache.fop.fo.FONode;
 import org.apache.fop.fo.FOTreeVisitor;
 
index 4d10a6df83045a920874e42f081fcf933fe9b18f..b69ac16465b3aed048636c17c71568b65a828d75 100644 (file)
@@ -61,7 +61,6 @@ import org.apache.fop.fo.Property;
 import org.apache.fop.fo.PropertyList;
 import org.apache.fop.fo.properties.CommonMarginBlock;
 import org.apache.fop.fo.properties.FOPropertyMapping;
-import org.apache.fop.fo.properties.WritingMode;
 
 /**
  * The fo:region-body element.
index 32106899cc86c438c83ac81262d31e7e0338320f..f02bea3d2d86b36e711134d8d63be01770fcfbea 100644 (file)
@@ -56,7 +56,6 @@ import java.awt.Rectangle;
 // FOP
 import org.apache.fop.fo.FONode;
 import org.apache.fop.fo.FOTreeVisitor;
-import org.apache.fop.fo.properties.WritingMode;
 import org.apache.fop.datatypes.FODimension;
 
 /**
index 63af9e1eaf67a1c2d7c01d4ddaf403023b18fbcd..79502410dcb1fa64578be5642e54c55f3a055bf7 100644 (file)
@@ -56,7 +56,6 @@ import java.awt.Rectangle;
 // FOP
 import org.apache.fop.fo.FONode;
 import org.apache.fop.fo.FOTreeVisitor;
-import org.apache.fop.fo.properties.WritingMode;
 
 /**
  * Abstract base class for fo:region-start and fo:region-end.
index 45158c3cd6f47256d9dcfd6b6f48338a7a9f6c19..ef045334f3081b7b4576af1d20af34a81ce60c7f 100644 (file)
@@ -56,7 +56,6 @@ import java.awt.Rectangle;
 // FOP
 import org.apache.fop.fo.FONode;
 import org.apache.fop.fo.FOTreeVisitor;
-import org.apache.fop.fo.properties.WritingMode;
 import org.apache.fop.datatypes.FODimension;
 
 /**
index 750b5f87ba95091b7412e6e534ed96b45ae76128..4aff4f56add615523825ec101b2c2eb089f2ad21 100644 (file)
@@ -213,7 +213,7 @@ public abstract class AbstractLayoutManager implements LayoutProcessor, Constant
      * representing a potential break decision.
      * If pos is null, then back up to the first child LM.
      */
-    protected void reset(Position pos) {
+    protected void reset(org.apache.fop.layoutmgr.Position pos) {
         //if (lm == null) return;
         LayoutManager lm = (pos != null) ? pos.getLM() : null;
         if (curChildLM != lm) {
index be4567ce00a7a3692c3b7cc48cf1dac46a269047..dc3ac02acdd0a4b862bbbaf0d99012e3907550fe 100644 (file)
@@ -154,9 +154,6 @@ import org.apache.fop.fo.pagination.StaticContent;
 import org.apache.fop.fo.pagination.Title;
 import org.apache.fop.fo.properties.CommonBackground;
 import org.apache.fop.fo.properties.CommonBorderAndPadding;
-import org.apache.fop.fo.properties.LeaderPattern;
-import org.apache.fop.fo.properties.Overflow;
-import org.apache.fop.fo.properties.Scaling;
 import org.apache.fop.layoutmgr.list.Item;
 import org.apache.fop.layoutmgr.list.ListBlockLayoutManager;
 import org.apache.fop.layoutmgr.list.ListItemLayoutManager;
@@ -370,14 +367,14 @@ public class AddLMVisitor implements FOTreeVisitor {
          node.setup();
          InlineArea leaderArea = null;
 
-         if (node.getLeaderPattern() == LeaderPattern.RULE) {
+         if (node.getLeaderPattern() == Constants.LeaderPattern.RULE) {
              org.apache.fop.area.inline.Leader leader = new org.apache.fop.area.inline.Leader();
              leader.setRuleStyle(node.getRuleStyle());
              leader.setRuleThickness(node.getRuleThickness());
              leaderArea = leader;
-         } else if (node.getLeaderPattern() == LeaderPattern.SPACE) {
+         } else if (node.getLeaderPattern() == Constants.LeaderPattern.SPACE) {
              leaderArea = new Space();
-         } else if (node.getLeaderPattern() == LeaderPattern.DOTS) {
+         } else if (node.getLeaderPattern() == Constants.LeaderPattern.DOTS) {
              TextArea t = new TextArea();
              char dot = '.'; // userAgent.getLeaderDotCharacter();
 
@@ -403,7 +400,7 @@ public class AddLMVisitor implements FOTreeVisitor {
              fa.setHeight(node.getFontState().getAscender());
 
              leaderArea = fa;
-         } else if (node.getLeaderPattern() == LeaderPattern.USECONTENT) {
+         } else if (node.getLeaderPattern() == Constants.LeaderPattern.USECONTENT) {
              if (node.getChildren() == null) {
                  node.getLogger().error("Leader use-content with no content");
                  return null;
@@ -644,7 +641,7 @@ public class AddLMVisitor implements FOTreeVisitor {
              cheight = (int)size.getY() * 1000;
          }
          int scaling = node.propertyList.get(Constants.PR_SCALING).getEnum();
-         if (scaling == Scaling.UNIFORM) {
+         if (scaling == Constants.Scaling.UNIFORM) {
              // adjust the larger
              double rat1 = cwidth / (size.getX() * 1000f);
              double rat2 = cheight / (size.getY() * 1000f);
@@ -666,9 +663,9 @@ public class AddLMVisitor implements FOTreeVisitor {
          boolean clip = false;
          if (cwidth > ipd || cheight > bpd) {
              int overflow = node.propertyList.get(Constants.PR_OVERFLOW).getEnum();
-             if (overflow == Overflow.HIDDEN) {
+             if (overflow == Constants.Overflow.HIDDEN) {
                  clip = true;
-             } else if (overflow == Overflow.ERROR_IF_OVERFLOW) {
+             } else if (overflow == Constants.Overflow.ERROR_IF_OVERFLOW) {
                  node.getLogger().error("Instream foreign object overflows the viewport: clipping");
                  clip = true;
              }
index 86870754a6571c2c2d9dcfffa4e740994417681b..d63f67c6c924288e0093ac5c7be89aaa935fd9d0 100644 (file)
@@ -58,8 +58,6 @@ import org.apache.fop.area.BlockViewport;
 import org.apache.fop.area.Block;
 import org.apache.fop.fo.PropertyManager;
 import org.apache.fop.fo.properties.CommonAbsolutePosition;
-import org.apache.fop.fo.properties.AbsolutePosition;
-import org.apache.fop.fo.properties.Overflow;
 import org.apache.fop.fo.PropertyList;
 import org.apache.fop.area.CTM;
 import org.apache.fop.datatypes.FODimension;
index f035f301726f29ce3a2f59d995fcf8b1e161e43b..b8b3459a4770a518af3a8bc14834cae1b0e14797 100644 (file)
@@ -52,7 +52,6 @@ package org.apache.fop.layoutmgr;
 
 import org.apache.fop.area.Area;
 import org.apache.fop.area.inline.InlineArea;
-import org.apache.fop.fo.properties.VerticalAlign;
 import org.apache.fop.traits.MinOptMax;
 
 /**
index b3d210162aac16e075fe52b72aa0e02947e1e6a9..a9a4a860bccaab4b10edf993bc62f6d187b9be0a 100644 (file)
@@ -58,7 +58,6 @@ import org.apache.fop.layout.hyphenation.Hyphenator;
 import org.apache.fop.traits.BlockProps;
 import org.apache.fop.area.LineArea;
 import org.apache.fop.area.Resolveable;
-import org.apache.fop.fo.properties.TextAlign;
 
 import java.util.ListIterator;
 import java.util.Iterator;
index 6ef51cfc6fcd2c492a15ff5de7ed1148f2d2b553..d4c752cd1c4ad57845b3bd5493efc786c8d7aa91 100644 (file)
@@ -75,13 +75,11 @@ import org.apache.fop.fo.flow.Marker;
 import org.apache.fop.fo.pagination.PageNumberGenerator;
 import org.apache.fop.fo.pagination.PageSequence;
 import org.apache.fop.fo.pagination.Region;
-import org.apache.fop.fo.properties.RetrieveBoundary;
 import org.apache.fop.fo.pagination.SimplePageMaster;
 import org.apache.fop.fo.pagination.StaticContent;
 import org.apache.fop.fo.properties.CommonBackground;
 import org.apache.fop.fo.properties.CommonBorderAndPadding;
 import org.apache.fop.fo.properties.CommonMarginBlock;
-import org.apache.fop.fo.properties.Overflow;
 
 import java.util.ArrayList;
 import java.util.List;
index c15b51e0298d49a84b1ca78648e8a9a421e21869..bdc9248642816141fb71bd26fe22f2e6d80e5c3c 100644 (file)
@@ -93,6 +93,7 @@ import org.apache.fop.area.inline.Viewport;
 import org.apache.fop.area.inline.TextArea;
 import org.apache.fop.area.inline.Character;
 import org.apache.fop.apps.FOUserAgent;
+import org.apache.fop.fo.Constants;
 import org.apache.fop.fo.FOTreeControl;
 import org.apache.fop.fo.pagination.Region;
 
@@ -108,7 +109,7 @@ import org.apache.avalon.framework.configuration.ConfigurationException;
  * handle viewports. This keeps track of the current block and inline position.
  */
 public abstract class AbstractRenderer extends AbstractLogEnabled
-         implements Renderer, Configurable, InlineAreaVisitor {
+         implements Renderer, Configurable, InlineAreaVisitor, Constants {
 
     /**
      * user agent
index e646e9347a0da928786e1951f1169e0e40eea0f2..62ce91054b9d928bd17beb4ad4911cd2b8818b84 100644 (file)
@@ -88,7 +88,6 @@ import org.apache.fop.area.Trait;
 import org.apache.fop.area.inline.TextArea;
 import org.apache.fop.datatypes.ColorType;
 import org.apache.fop.fo.FOTreeControl;
-import org.apache.fop.fo.properties.BackgroundRepeat;
 import org.apache.fop.image.FopImage;
 import org.apache.fop.image.ImageFactory;
 import org.apache.fop.render.AbstractRenderer;
index 83b97f6b74b263f86a3d1cf8c4694ccb9b73efca..6e995d73a11d76396b9471ba79076ea0c9679e20 100644 (file)
@@ -90,8 +90,6 @@ import org.apache.fop.area.inline.Image;
 import org.apache.fop.area.inline.Leader;
 import org.apache.fop.area.inline.InlineParent;
 import org.apache.fop.datatypes.ColorType;
-import org.apache.fop.fo.properties.BackgroundRepeat;
-import org.apache.fop.fo.properties.RuleStyle;
 import org.apache.fop.fonts.Typeface;
 import org.apache.fop.fonts.Font;
 import org.apache.fop.fonts.FontSetup;
index c46959832c5510ed6360644a3d18b68d62fb22b3..1d33d19f8480f9218cef12200491d858b509c9a6 100644 (file)
@@ -59,7 +59,6 @@ import java.util.List;
 // FOP
 import org.apache.avalon.framework.configuration.Configuration;
 import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.fop.fo.properties.BackgroundRepeat;
 import org.apache.fop.area.Area;
 import org.apache.fop.area.RegionViewport;
 import org.apache.fop.apps.FOPException;
index 117f82a5aac4821a5477906bfb63a6f554bffee4..e08a94b1c51e748cd815f924bd14d2d18e63410b 100644 (file)
@@ -59,7 +59,6 @@ import org.apache.fop.area.inline.TextArea;
 import org.apache.fop.svg.SVGUtilities;
 import org.apache.fop.apps.Document;
 import org.apache.fop.apps.FOUserAgent;
-import org.apache.fop.fo.properties.RuleStyle;
 import org.apache.fop.fo.FOTreeControl;
 
 import org.w3c.dom.Node;
index 03c63543b957f4f03035305b90c2c5d9431e220c..31e06437c9320a737cc6ed388db166b6671fba6e 100644 (file)
@@ -93,7 +93,6 @@ import org.apache.fop.area.inline.Space;
 import org.apache.fop.area.inline.Viewport;
 import org.apache.fop.area.inline.TextArea;
 import org.apache.fop.fonts.FontSetup;
-import org.apache.fop.fo.properties.RuleStyle;
 import org.apache.fop.fo.FOTreeControl;
 import org.apache.fop.fo.pagination.Region;
 
index 2259f2f5bfdab20f4fbb30b61f89c326d352e7df..de5e5ec805923effa94024a9d173c2f26471e8ba 100644 (file)
@@ -107,8 +107,8 @@ import org.apache.fop.render.pdf.PDFRenderer;
 import org.apache.fop.render.svg.SVGRenderer;
 import org.apache.fop.render.xml.XMLRenderer;
 import org.apache.fop.apps.FOUserAgent;
+import org.apache.fop.fo.Constants;
 import org.apache.fop.fo.pagination.Region;
-import org.apache.fop.fo.properties.RuleStyle;
 import org.apache.fop.fonts.FontMetrics;
 
 // Avalon
@@ -698,17 +698,17 @@ class TreeLoader extends AbstractLogEnabled {
         Leader leader = new Leader();
         String rs = root.getAttribute("ruleStyle");
         if ("solid".equals(rs)) {
-            leader.setRuleStyle(RuleStyle.SOLID);
+            leader.setRuleStyle(Constants.RuleStyle.SOLID);
         } else if ("dotted".equals(rs)) {
-            leader.setRuleStyle(RuleStyle.DOTTED);
+            leader.setRuleStyle(Constants.RuleStyle.DOTTED);
         } else if ("dashed".equals(rs)) {
-            leader.setRuleStyle(RuleStyle.DASHED);
+            leader.setRuleStyle(Constants.RuleStyle.DASHED);
         } else if ("double".equals(rs)) {
-            leader.setRuleStyle(RuleStyle.DOUBLE);
+            leader.setRuleStyle(Constants.RuleStyle.DOUBLE);
         } else if ("groove".equals(rs)) {
-            leader.setRuleStyle(RuleStyle.GROOVE);
+            leader.setRuleStyle(Constants.RuleStyle.GROOVE);
         } else if ("ridge".equals(rs)) {
-            leader.setRuleStyle(RuleStyle.RIDGE);
+            leader.setRuleStyle(Constants.RuleStyle.RIDGE);
         }
         String rt = root.getAttribute("ruleThickness");
         int thick = Integer.parseInt(rt);