diff options
author | Glen Mazza <gmazza@apache.org> | 2004-11-24 21:07:31 +0000 |
---|---|---|
committer | Glen Mazza <gmazza@apache.org> | 2004-11-24 21:07:31 +0000 |
commit | 632222604a21482c3443b4a7d45589803c72fe20 (patch) | |
tree | e196b62b1883862881596d7b98811178943a6077 /src/java/org/apache/fop/fo/pagination | |
parent | faa67e299ce5bf80b14094acbc26fb7f177c94aa (diff) | |
download | xmlgraphics-fop-632222604a21482c3443b4a7d45589803c72fe20.tar.gz xmlgraphics-fop-632222604a21482c3443b4a7d45589803c72fe20.zip |
PR:
Obtained from:
Submitted by:
Reviewed by:
1.) Removed unneeded enumeration interfaces from fo.Constants.
2.) Appended EN_ to enumeration constants to make them better S&R'able throughout app.
3.) Added an EN_INHERIT enumeration constant (although not currently used in the system.)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@198175 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/fo/pagination')
10 files changed, 22 insertions, 22 deletions
diff --git a/src/java/org/apache/fop/fo/pagination/ConditionalPageMasterReference.java b/src/java/org/apache/fop/fo/pagination/ConditionalPageMasterReference.java index a269fb6ed..f05ac271d 100644 --- a/src/java/org/apache/fop/fo/pagination/ConditionalPageMasterReference.java +++ b/src/java/org/apache/fop/fo/pagination/ConditionalPageMasterReference.java @@ -92,17 +92,17 @@ public class ConditionalPageMasterReference extends FObj { boolean isBlankPage) { // page-position if (isFirstPage) { - if (pagePosition == PagePosition.REST) { + if (pagePosition == EN_REST) { return false; - } else if (pagePosition == PagePosition.LAST) { + } else if (pagePosition == EN_LAST) { // ?? how can one know at this point? getLogger().debug("LAST PagePosition NYI"); return false; } } else { - if (pagePosition == PagePosition.FIRST) { + if (pagePosition == EN_FIRST) { return false; - } else if (pagePosition == PagePosition.LAST) { + } else if (pagePosition == EN_LAST) { // ?? how can one know at this point? getLogger().debug("LAST PagePosition NYI"); // potentially valid, don't return @@ -111,22 +111,22 @@ public class ConditionalPageMasterReference extends FObj { // odd-or-even if (isOddPage) { - if (oddOrEven == OddOrEven.EVEN) { + if (oddOrEven == EN_EVEN) { return false; } } else { - if (oddOrEven == OddOrEven.ODD) { + if (oddOrEven == EN_ODD) { return false; } } // blank-or-not-blank if (isBlankPage) { - if (blankOrNotBlank == BlankOrNotBlank.NOT_BLANK) { + if (blankOrNotBlank == EN_NOT_BLANK) { return false; } } else { - if (blankOrNotBlank == BlankOrNotBlank.BLANK) { + if (blankOrNotBlank == EN_BLANK) { return false; } } diff --git a/src/java/org/apache/fop/fo/pagination/PageSequence.java b/src/java/org/apache/fop/fo/pagination/PageSequence.java index 65ac9b768..1c6f4836e 100644 --- a/src/java/org/apache/fop/fo/pagination/PageSequence.java +++ b/src/java/org/apache/fop/fo/pagination/PageSequence.java @@ -297,7 +297,7 @@ public class PageSequence extends FObj { public void initPageNumber() { this.currentPageNumber = this.root.getRunningPageNumberCounter() + 1; - if (this.pageNumberType == AUTO_ODD) { + if (this.pageNumberType == EN_AUTO_ODD) { // Next page but force odd. May force empty page creation! // Whose master is used for this??? Assume no. // Use force-page-count = auto @@ -305,7 +305,7 @@ public class PageSequence extends FObj { if (currentPageNumber % 2 == 0) { this.currentPageNumber++; } - } else if (pageNumberType == AUTO_EVEN) { + } else if (pageNumberType == EN_AUTO_EVEN) { if (currentPageNumber % 2 == 1) { this.currentPageNumber++; } diff --git a/src/java/org/apache/fop/fo/pagination/RegionAfter.java b/src/java/org/apache/fop/fo/pagination/RegionAfter.java index 6fb6ca623..dc8fafd36 100644 --- a/src/java/org/apache/fop/fo/pagination/RegionAfter.java +++ b/src/java/org/apache/fop/fo/pagination/RegionAfter.java @@ -43,12 +43,12 @@ public class RegionAfter extends RegionBA { public Rectangle getViewportRectangle (FODimension reldims) { // Depends on extent, precedence ans writing mode Rectangle vpRect; - if (getWritingMode() == WritingMode.LR_TB || getWritingMode() == WritingMode.RL_TB) { + if (getWritingMode() == EN_LR_TB || getWritingMode() == EN_RL_TB) { vpRect = new Rectangle(0, reldims.bpd - getExtent().getValue(), reldims.ipd, getExtent().getValue()); } else { vpRect = new Rectangle(0, reldims.bpd - getExtent().getValue(), getExtent().getValue(), reldims.ipd); } - if (getPrecedence() == FALSE) { + if (getPrecedence() == EN_FALSE) { adjustIPD(vpRect, getWritingMode()); } return vpRect; diff --git a/src/java/org/apache/fop/fo/pagination/RegionBA.java b/src/java/org/apache/fop/fo/pagination/RegionBA.java index 227104e34..b06e53138 100644 --- a/src/java/org/apache/fop/fo/pagination/RegionBA.java +++ b/src/java/org/apache/fop/fo/pagination/RegionBA.java @@ -86,7 +86,7 @@ public abstract class RegionBA extends Region { offset += end.getExtent().getValue(); } if (offset > 0) { - if (wm == WritingMode.LR_TB || wm == WritingMode.RL_TB) { + if (wm == EN_LR_TB || wm == EN_RL_TB) { vpRefRect.width -= offset; } else { vpRefRect.height -= offset; diff --git a/src/java/org/apache/fop/fo/pagination/RegionBefore.java b/src/java/org/apache/fop/fo/pagination/RegionBefore.java index 72de90461..19607f9b1 100644 --- a/src/java/org/apache/fop/fo/pagination/RegionBefore.java +++ b/src/java/org/apache/fop/fo/pagination/RegionBefore.java @@ -54,12 +54,12 @@ public class RegionBefore extends RegionBA { // Before is always 0, start depends on extent // ipd depends on precedence, bpd=extent Rectangle vpRect; - if (getWritingMode() == WritingMode.LR_TB || getWritingMode() == WritingMode.RL_TB) { + if (getWritingMode() == EN_LR_TB || getWritingMode() == EN_RL_TB) { vpRect = new Rectangle(0, 0, reldims.ipd, getExtent().getValue()); } else { vpRect = new Rectangle(0, 0, getExtent().getValue(), reldims.ipd); } - if (getPrecedence() == FALSE) { + if (getPrecedence() == EN_FALSE) { adjustIPD(vpRect, getWritingMode()); } return vpRect; diff --git a/src/java/org/apache/fop/fo/pagination/RegionEnd.java b/src/java/org/apache/fop/fo/pagination/RegionEnd.java index 4e1e10b3d..e4aff17e6 100644 --- a/src/java/org/apache/fop/fo/pagination/RegionEnd.java +++ b/src/java/org/apache/fop/fo/pagination/RegionEnd.java @@ -42,7 +42,7 @@ public class RegionEnd extends RegionSE { public Rectangle getViewportRectangle (FODimension reldims) { // Depends on extent, precedence and writing mode Rectangle vpRect; - if (getWritingMode() == WritingMode.LR_TB || getWritingMode() == WritingMode.RL_TB) { + if (getWritingMode() == EN_LR_TB || getWritingMode() == EN_RL_TB) { // Rectangle: x , y (of top left point), width, height vpRect = new Rectangle(reldims.ipd - getExtent().getValue(), 0, getExtent().getValue(), reldims.bpd); diff --git a/src/java/org/apache/fop/fo/pagination/RegionSE.java b/src/java/org/apache/fop/fo/pagination/RegionSE.java index d75db5f68..a47326778 100644 --- a/src/java/org/apache/fop/fo/pagination/RegionSE.java +++ b/src/java/org/apache/fop/fo/pagination/RegionSE.java @@ -69,16 +69,16 @@ public abstract class RegionSE extends Region { protected void adjustIPD(Rectangle vpRefRect, int wm) { int offset = 0; RegionBefore before = (RegionBefore) getSiblingRegion(FO_REGION_BEFORE); - if (before != null && before.getPrecedence() == TRUE) { + if (before != null && before.getPrecedence() == EN_TRUE) { offset = before.getExtent().getValue(); vpRefRect.translate(0, offset); } RegionAfter after = (RegionAfter) getSiblingRegion(FO_REGION_AFTER); - if (after != null && after.getPrecedence() == TRUE) { + if (after != null && after.getPrecedence() == EN_TRUE) { offset += after.getExtent().getValue(); } if (offset > 0) { - if (wm == WritingMode.LR_TB || wm == WritingMode.RL_TB) { + if (wm == EN_LR_TB || wm == EN_RL_TB) { vpRefRect.height -= offset; } else { vpRefRect.width -= offset; diff --git a/src/java/org/apache/fop/fo/pagination/RegionStart.java b/src/java/org/apache/fop/fo/pagination/RegionStart.java index 2b97cb7fe..9668dceeb 100644 --- a/src/java/org/apache/fop/fo/pagination/RegionStart.java +++ b/src/java/org/apache/fop/fo/pagination/RegionStart.java @@ -44,7 +44,7 @@ public class RegionStart extends RegionSE { // This is the rectangle relative to the page-reference area in // writing-mode relative coordinates Rectangle vpRect; - if (getWritingMode() == WritingMode.LR_TB || getWritingMode() == WritingMode.RL_TB) { + if (getWritingMode() == EN_LR_TB || getWritingMode() == EN_RL_TB) { vpRect = new Rectangle(0, 0, getExtent().getValue(), reldims.bpd); } else { vpRect = new Rectangle(0, 0, reldims.bpd, getExtent().getValue()); diff --git a/src/java/org/apache/fop/fo/pagination/RepeatablePageMasterAlternatives.java b/src/java/org/apache/fop/fo/pagination/RepeatablePageMasterAlternatives.java index 566397fce..546107929 100644 --- a/src/java/org/apache/fop/fo/pagination/RepeatablePageMasterAlternatives.java +++ b/src/java/org/apache/fop/fo/pagination/RepeatablePageMasterAlternatives.java @@ -103,7 +103,7 @@ public class RepeatablePageMasterAlternatives extends FObj * Return the "maximum-repeats" property. */ public int getMaximumRepeats() { - if (maximumRepeats.getEnum() == NO_LIMIT) { + if (maximumRepeats.getEnum() == EN_NO_LIMIT) { return INFINITE; } else { int mr = maximumRepeats.getNumeric().getValue(); diff --git a/src/java/org/apache/fop/fo/pagination/RepeatablePageMasterReference.java b/src/java/org/apache/fop/fo/pagination/RepeatablePageMasterReference.java index 860ae58c0..200536321 100644 --- a/src/java/org/apache/fop/fo/pagination/RepeatablePageMasterReference.java +++ b/src/java/org/apache/fop/fo/pagination/RepeatablePageMasterReference.java @@ -103,7 +103,7 @@ public class RepeatablePageMasterReference extends FObj * Return the "maximum-repeats" property. */ public int getMaximumRepeats() { - if (maximumRepeats.getEnum() == NO_LIMIT) { + if (maximumRepeats.getEnum() == EN_NO_LIMIT) { return INFINITE; } else { int mr = maximumRepeats.getNumeric().getValue(); |