[FOray-commit] SF.net SVN: foray: [7263] trunk/foray/foray-fotree/src/java/org/foray/fotree
Modular XSL-FO Implementation for Java.
Status: Alpha
Brought to you by:
victormote
|
From: <vic...@us...> - 2006-05-26 15:59:15
|
Revision: 7263 Author: victormote Date: 2006-05-26 08:58:40 -0700 (Fri, 26 May 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7263&view=rev Log Message: ----------- Conform to axsl changes regarding location of writing-mode related constants. Modified Paths: -------------- trunk/foray/foray-areatree/src/java/org/foray/area/AbstractInlineArea.java trunk/foray/foray-areatree/src/java/org/foray/area/Area.java trunk/foray/foray-areatree/src/java/org/foray/area/AreaFlexible.java trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java trunk/foray/foray-areatree/src/java/org/foray/area/RegionRABody.java trunk/foray/foray-areatree/src/java/org/foray/area/TableRowContainer.java trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java trunk/foray/foray-fotree/src/java/org/foray/fotree/FObjScaled.java trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/AbsoluteDimension.java trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/AbsoluteOffset.java trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BackgroundPosition.java trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BorderColor.java trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BorderPrecedence.java trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BorderSeparation.java trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BorderStyle.java trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BorderWidth.java trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/ContentDimension.java trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Extent.java trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/GlyphOrientation.java trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Indent.java trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Margin.java trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Padding.java trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/PageDimension.java trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/RelativeSpace.java trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/Size.java trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtWritingMode.java trunk/foray/foray-fotree/src/java/org/foray/fotree/value/PropertyCollection.java Modified: trunk/foray/foray-areatree/src/java/org/foray/area/AbstractInlineArea.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/AbstractInlineArea.java 2006-05-26 15:04:07 UTC (rev 7262) +++ trunk/foray/foray-areatree/src/java/org/foray/area/AbstractInlineArea.java 2006-05-26 15:58:40 UTC (rev 7263) @@ -26,8 +26,8 @@ import org.axsl.areaR.GeneralInlineArea; import org.axsl.areaW.AreaWException; +import org.axsl.common.Constants; import org.axsl.foR.FObj; -import org.axsl.foR.WritingMode; public abstract class AbstractInlineArea extends AreaFlexible @@ -49,7 +49,7 @@ * @see Area#contentStackingAxis() */ public byte contentStackingAxisRelative() { - return WritingMode.AXIS_IP; + return Constants.AXIS_IP; } public Area getOverflowArea(Area childRequesting) throws AreaWException { Modified: trunk/foray/foray-areatree/src/java/org/foray/area/Area.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/Area.java 2006-05-26 15:04:07 UTC (rev 7262) +++ trunk/foray/foray-areatree/src/java/org/foray/area/Area.java 2006-05-26 15:58:40 UTC (rev 7263) @@ -369,9 +369,9 @@ public int brOriginX() { // Start at the padding-rectangle origin. int x = prOriginX(); - if (this.getBPAxis() == WritingMode.AXIS_VERTICAL) { + if (this.getBPAxis() == Constants.AXIS_VERTICAL) { boolean goingRight = (this.traitIPDirection() - == WritingMode.DIRECTION_LEFT_TO_RIGHT); + == Constants.DIRECTION_LEFT_TO_RIGHT); if (goingRight) { x -= this.traitBorderStartWidth(); } else { @@ -380,7 +380,7 @@ } else { // Our BP Axis is horizontal boolean goingRight = (this.traitBPDirection() - == WritingMode.DIRECTION_LEFT_TO_RIGHT); + == Constants.DIRECTION_LEFT_TO_RIGHT); if (goingRight) { x -= this.traitBorderBeforeWidth(); } else { @@ -398,9 +398,9 @@ public int brOriginY() { // Start at the padding-rectangle origin. int y = prOriginY(); - if (this.getBPAxis() == WritingMode.AXIS_VERTICAL) { + if (this.getBPAxis() == Constants.AXIS_VERTICAL) { boolean goingDown = (this.traitBPDirection() - == WritingMode.DIRECTION_TOP_TO_BOTTOM); + == Constants.DIRECTION_TOP_TO_BOTTOM); if (goingDown) { y += this.traitBorderBeforeWidth(); } else { @@ -409,7 +409,7 @@ } else { // Our BP Axis is horizontal boolean goingUp = (this.traitIPDirection() - == WritingMode.DIRECTION_BOTTOM_TO_TOP); + == Constants.DIRECTION_BOTTOM_TO_TOP); if (goingUp) { y -= this.traitBorderStartWidth(); } else { @@ -467,9 +467,9 @@ public int prOriginX() { // Start at the content-rectangle origin. int x = crOriginX(); - if (this.getBPAxis() == WritingMode.AXIS_VERTICAL) { + if (this.getBPAxis() == Constants.AXIS_VERTICAL) { boolean goingRight = (this.traitIPDirection() - == WritingMode.DIRECTION_LEFT_TO_RIGHT); + == Constants.DIRECTION_LEFT_TO_RIGHT); if (goingRight) { x -= this.traitPaddingStart(); } else { @@ -478,7 +478,7 @@ } else { // Our BP Axis is horizontal boolean goingRight = (this.traitBPDirection() - == WritingMode.DIRECTION_LEFT_TO_RIGHT); + == Constants.DIRECTION_LEFT_TO_RIGHT); if (goingRight) { x -= this.traitPaddingBefore(); } else { @@ -496,9 +496,9 @@ public int prOriginY() { // Start at the content-rectangle origin. int y = crOriginY(); - if (this.getBPAxis() == WritingMode.AXIS_VERTICAL) { + if (this.getBPAxis() == Constants.AXIS_VERTICAL) { boolean goingDown = (this.traitBPDirection() - == WritingMode.DIRECTION_TOP_TO_BOTTOM); + == Constants.DIRECTION_TOP_TO_BOTTOM); if (goingDown) { y += this.traitPaddingBefore(); } else { @@ -507,7 +507,7 @@ } else { // Our BP Axis is horizontal boolean goingRight = (this.traitBPDirection() - == WritingMode.DIRECTION_LEFT_TO_RIGHT); + == Constants.DIRECTION_LEFT_TO_RIGHT); if (goingRight) { y -= this.traitPaddingBefore(); } else { @@ -552,21 +552,21 @@ // Start at the parent's content origin. int x = crReferenceX(); switch (getWritingMode().getIPDirectionOdd()) { - case WritingMode.DIRECTION_LEFT_TO_RIGHT: { + case Constants.DIRECTION_LEFT_TO_RIGHT: { x += this.crOriginIPDOffset(); return x; } - case WritingMode.DIRECTION_RIGHT_TO_LEFT: { + case Constants.DIRECTION_RIGHT_TO_LEFT: { x -= this.crOriginIPDOffset(); return x; } } switch (getWritingMode().getBPDirection()) { - case WritingMode.DIRECTION_LEFT_TO_RIGHT: { + case Constants.DIRECTION_LEFT_TO_RIGHT: { x += this.crOriginBPDOffset(); return x; } - case WritingMode.DIRECTION_RIGHT_TO_LEFT: { + case Constants.DIRECTION_RIGHT_TO_LEFT: { x -= this.crOriginBPDOffset(); return x; } @@ -591,21 +591,21 @@ // Start at the parent's content origin. int y = getParentArea().crOriginY(); switch (getWritingMode().getBPDirection()) { - case WritingMode.DIRECTION_TOP_TO_BOTTOM: { + case Constants.DIRECTION_TOP_TO_BOTTOM: { y -= this.crOriginBPDOffset(); return y; } - case WritingMode.DIRECTION_BOTTOM_TO_TOP: { + case Constants.DIRECTION_BOTTOM_TO_TOP: { y += this.crOriginBPDOffset(); return y; } } switch (getWritingMode().getIPDirectionOdd()) { - case WritingMode.DIRECTION_TOP_TO_BOTTOM: { + case Constants.DIRECTION_TOP_TO_BOTTOM: { y -= this.crOriginIPDOffset(); return y; } - case WritingMode.DIRECTION_RIGHT_TO_LEFT: { + case Constants.DIRECTION_RIGHT_TO_LEFT: { y += this.crOriginIPDOffset(); return y; } @@ -900,7 +900,7 @@ * stack in the IPD should override this method. */ public byte contentStackingAxisRelative() { - return WritingMode.AXIS_BP; + return Constants.AXIS_BP; } /** Modified: trunk/foray/foray-areatree/src/java/org/foray/area/AreaFlexible.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/AreaFlexible.java 2006-05-26 15:04:07 UTC (rev 7262) +++ trunk/foray/foray-areatree/src/java/org/foray/area/AreaFlexible.java 2006-05-26 15:58:40 UTC (rev 7263) @@ -24,10 +24,9 @@ package org.foray.area; +import org.axsl.common.Constants; import org.axsl.foR.FObj; -import org.axsl.foR.WritingMode; - import java.util.List; /** @@ -357,7 +356,7 @@ public int crOriginIPDOffset() { int offset = 0; if (getParentArea().contentStackingAxisRelative() - == WritingMode.AXIS_IP) { + == Constants.AXIS_IP) { offset += this.pdUsedBySiblings(); offset += this.getAnteriorSpace(); offset += this.traitBorderStartWidth(); @@ -372,7 +371,7 @@ public int crOriginBPDOffset() { int offset = 0; if (getParentArea().contentStackingAxisRelative() - == WritingMode.AXIS_BP) { + == Constants.AXIS_BP) { offset += this.pdUsedBySiblings(); offset += this.getAnteriorSpace(); offset += this.traitBorderBeforeWidth(); Modified: trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java 2006-05-26 15:04:07 UTC (rev 7262) +++ trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java 2006-05-26 15:58:40 UTC (rev 7263) @@ -30,7 +30,6 @@ import org.axsl.foR.FOText; import org.axsl.foR.FObj; import org.axsl.foR.FObjMixed; -import org.axsl.foR.WritingMode; import org.axsl.foR.fo.BasicLink; import org.axsl.foR.fo.Block; import org.axsl.foR.fo.Character; @@ -532,7 +531,7 @@ * @see Area#contentStackingAxis() */ public byte contentStackingAxisRelative() { - return WritingMode.AXIS_IP; + return Constants.AXIS_IP; } /* @@ -571,9 +570,10 @@ * {@inheritDoc} */ public int alignmentPointOffset() { + int axis = this.getWritingMode().getAbsoluteAxis(Constants.AXIS_IP); int baseline = this.traitDominantBaseline(); Font font = this.getPrimaryFont().getFont(); - return font.baseline(0, baseline, this.traitFontSize()); + return font.baseline(axis, baseline, this.traitFontSize()); } public int alignmentPointX() { @@ -698,14 +698,14 @@ } case Constants.FOVAL_INSIDE: { if (this.getPage().getBindingEdge() - == WritingMode.DIRECTION_END) { + == Constants.DIRECTION_END) { return Constants.FOVAL_END; } return Constants.FOVAL_START; } case Constants.FOVAL_OUTSIDE: { if (this.getPage().getBindingEdge() - == WritingMode.DIRECTION_END) { + == Constants.DIRECTION_END) { return Constants.FOVAL_START; } return Constants.FOVAL_END; Modified: trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java 2006-05-26 15:04:07 UTC (rev 7262) +++ trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java 2006-05-26 15:58:40 UTC (rev 7263) @@ -30,7 +30,6 @@ import org.axsl.areaW.AreaWException; import org.axsl.common.Constants; import org.axsl.foR.FObj; -import org.axsl.foR.WritingMode; import org.axsl.foR.fo.FootnoteBody; import org.axsl.foR.fo.Marker; import org.axsl.foR.fo.PageSequence; @@ -362,14 +361,14 @@ } public int crIPD() { - if (getWritingMode().getIPAxis() == WritingMode.AXIS_HORIZONTAL) { + if (getWritingMode().getIPAxis() == Constants.AXIS_HORIZONTAL) { return traitPageWidth() - getMarginLeft() - getMarginRight(); } return traitPageHeight() - getMarginTop() - getMarginBottom(); } public int crBPD() { - if (getWritingMode().getBPAxis() == WritingMode.AXIS_VERTICAL) { + if (getWritingMode().getBPAxis() == Constants.AXIS_VERTICAL) { return traitPageHeight() - getMarginTop() - getMarginBottom(); } return traitPageWidth() - getMarginLeft() - getMarginRight(); @@ -393,19 +392,19 @@ public int crOriginX() { switch (getWritingMode().getAbsoluteDirFromRelativeAxis( - WritingMode.AXIS_BP)) { - case WritingMode.DIRECTION_TOP_TO_BOTTOM: - case WritingMode.DIRECTION_BOTTOM_TO_TOP: { + Constants.AXIS_BP)) { + case Constants.DIRECTION_TOP_TO_BOTTOM: + case Constants.DIRECTION_BOTTOM_TO_TOP: { if (getWritingMode().getIPDirectionOdd() - == WritingMode.DIRECTION_LEFT_TO_RIGHT) { + == Constants.DIRECTION_LEFT_TO_RIGHT) { return getMarginLeft(); } return this.traitPageWidth() - getMarginRight(); } - case WritingMode.DIRECTION_LEFT_TO_RIGHT: { + case Constants.DIRECTION_LEFT_TO_RIGHT: { return getMarginLeft(); } - case WritingMode.DIRECTION_RIGHT_TO_LEFT: { + case Constants.DIRECTION_RIGHT_TO_LEFT: { return this.traitPageWidth() - getMarginRight(); } } @@ -414,17 +413,17 @@ public int crOriginY() { switch (getWritingMode().getAbsoluteDirFromRelativeAxis( - WritingMode.AXIS_BP)) { - case WritingMode.DIRECTION_TOP_TO_BOTTOM: { + Constants.AXIS_BP)) { + case Constants.DIRECTION_TOP_TO_BOTTOM: { return traitPageHeight() - getMarginTop(); } - case WritingMode.DIRECTION_BOTTOM_TO_TOP: { + case Constants.DIRECTION_BOTTOM_TO_TOP: { return getMarginBottom(); } - case WritingMode.DIRECTION_LEFT_TO_RIGHT: - case WritingMode.DIRECTION_RIGHT_TO_LEFT: { + case Constants.DIRECTION_LEFT_TO_RIGHT: + case Constants.DIRECTION_RIGHT_TO_LEFT: { if (getWritingMode().getIPDirectionOdd() - == WritingMode.DIRECTION_TOP_TO_BOTTOM) { + == Constants.DIRECTION_TOP_TO_BOTTOM) { return traitPageHeight() - getMarginTop(); } return getMarginBottom(); Modified: trunk/foray/foray-areatree/src/java/org/foray/area/RegionRABody.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/RegionRABody.java 2006-05-26 15:04:07 UTC (rev 7262) +++ trunk/foray/foray-areatree/src/java/org/foray/area/RegionRABody.java 2006-05-26 15:58:40 UTC (rev 7263) @@ -27,7 +27,7 @@ import org.axsl.areaR.MainReferenceArea; import org.axsl.areaR.RegionBodyArea; import org.axsl.areaW.AreaWException; -import org.axsl.foR.WritingMode; +import org.axsl.common.Constants; import org.axsl.foR.fo.RegionBody; import org.axsl.foR.fo.SimplePageMaster; @@ -135,7 +135,7 @@ public int crBPD() { int dimension = getParentArea().brBPD(); - if (this.getBPAxis() == WritingMode.AXIS_VERTICAL) { + if (this.getBPAxis() == Constants.AXIS_VERTICAL) { dimension -= getMarginTop(); dimension -= getMarginBottom(); } else { @@ -147,7 +147,7 @@ public int crIPD() { int dimension = getParentArea().brIPD(); - if (this.getBPAxis() == WritingMode.AXIS_VERTICAL) { + if (this.getBPAxis() == Constants.AXIS_VERTICAL) { dimension -= getMarginLeft(); dimension -= getMarginRight(); } else { @@ -178,16 +178,16 @@ RegionBody rb = (RegionBody) traitGeneratedBy(); SimplePageMaster spm = (SimplePageMaster) rb.parentFO(); switch (getParentArea().contentStackingDirectionAbsolute()) { - case WritingMode.DIRECTION_TOP_TO_BOTTOM: - case WritingMode.DIRECTION_BOTTOM_TO_TOP: { + case Constants.DIRECTION_TOP_TO_BOTTOM: + case Constants.DIRECTION_BOTTOM_TO_TOP: { // x is where it needs to be break; } - case WritingMode.DIRECTION_LEFT_TO_RIGHT: { + case Constants.DIRECTION_LEFT_TO_RIGHT: { x += spm.getStartExtent(); break; } - case WritingMode.DIRECTION_RIGHT_TO_LEFT: { + case Constants.DIRECTION_RIGHT_TO_LEFT: { x -= spm.getEndExtent(); break; } @@ -202,17 +202,17 @@ SimplePageMaster spm = (SimplePageMaster) traitGeneratedBy().parentFO(); switch (getWritingMode().getAbsoluteDirFromRelativeAxis( - WritingMode.AXIS_BP)) { - case WritingMode.DIRECTION_TOP_TO_BOTTOM: { + Constants.AXIS_BP)) { + case Constants.DIRECTION_TOP_TO_BOTTOM: { y -= spm.getBeforeExtent(); break; } - case WritingMode.DIRECTION_BOTTOM_TO_TOP: { + case Constants.DIRECTION_BOTTOM_TO_TOP: { y += spm.getAfterExtent(); break; } - case WritingMode.DIRECTION_LEFT_TO_RIGHT: - case WritingMode.DIRECTION_RIGHT_TO_LEFT: { + case Constants.DIRECTION_LEFT_TO_RIGHT: + case Constants.DIRECTION_RIGHT_TO_LEFT: { // y is where it needs to be break; } Modified: trunk/foray/foray-areatree/src/java/org/foray/area/TableRowContainer.java =================================================================== --- trunk/foray/foray-areatree/src/java/org/foray/area/TableRowContainer.java 2006-05-26 15:04:07 UTC (rev 7262) +++ trunk/foray/foray-areatree/src/java/org/foray/area/TableRowContainer.java 2006-05-26 15:58:40 UTC (rev 7263) @@ -25,7 +25,7 @@ package org.foray.area; import org.axsl.areaW.TableCellArea; -import org.axsl.foR.WritingMode; +import org.axsl.common.Constants; import org.axsl.foR.fo.TableCell; import org.axsl.foR.fo.TableRow; @@ -52,7 +52,7 @@ * @see Area#contentStackingAxis() */ public byte contentStackingAxisRelative() { - return WritingMode.AXIS_IP; + return Constants.AXIS_IP; } public int crOriginY() { Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java =================================================================== --- trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2006-05-26 15:04:07 UTC (rev 7262) +++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2006-05-26 15:58:40 UTC (rev 7263) @@ -26,7 +26,6 @@ import org.foray.common.XMLCharacter; import org.foray.fotree.fo.prop.Dimension; -import org.foray.fotree.value.DtWritingMode; import org.axsl.common.Constants; import org.axsl.foR.FOTreeException; @@ -526,7 +525,7 @@ * {@inheritDoc} */ public int traitStartIndent(int ipdContainingRA) { - return propertyList.getIndent(DtWritingMode.DIRECTION_START, + return propertyList.getIndent(Constants.DIRECTION_START, ipdContainingRA); } @@ -933,7 +932,7 @@ * {@inheritDoc} */ public int traitEndIndent(int ipdContainingRA) { - return propertyList.getIndent(DtWritingMode.DIRECTION_END, + return propertyList.getIndent(Constants.DIRECTION_END, ipdContainingRA); } @@ -1339,119 +1338,119 @@ * {@inheritDoc} */ public Color traitBorderBeforeColor() { - return propertyList.getBorderColor(DtWritingMode.DIRECTION_BEFORE); + return propertyList.getBorderColor(Constants.DIRECTION_BEFORE); } /** * {@inheritDoc} */ public Color traitBorderAfterColor() { - return propertyList.getBorderColor(DtWritingMode.DIRECTION_AFTER); + return propertyList.getBorderColor(Constants.DIRECTION_AFTER); } /** * {@inheritDoc} */ public Color traitBorderStartColor() { - return propertyList.getBorderColor(DtWritingMode.DIRECTION_START); + return propertyList.getBorderColor(Constants.DIRECTION_START); } /** * {@inheritDoc} */ public Color traitBorderEndColor() { - return propertyList.getBorderColor(DtWritingMode.DIRECTION_END); + return propertyList.getBorderColor(Constants.DIRECTION_END); } /** * {@inheritDoc} */ public Color traitBorderLeftColor() { - return propertyList.getBorderColor(DtWritingMode.DIRECTION_LEFT); + return propertyList.getBorderColor(Constants.DIRECTION_LEFT); } /** * {@inheritDoc} */ public Color traitBorderRightColor() { - return propertyList.getBorderColor(DtWritingMode.DIRECTION_RIGHT); + return propertyList.getBorderColor(Constants.DIRECTION_RIGHT); } /** * {@inheritDoc} */ public Color traitBorderTopColor() { - return propertyList.getBorderColor(DtWritingMode.DIRECTION_TOP); + return propertyList.getBorderColor(Constants.DIRECTION_TOP); } /** * {@inheritDoc} */ public Color traitBorderBottomColor() { - return propertyList.getBorderColor(DtWritingMode.DIRECTION_BOTTOM); + return propertyList.getBorderColor(Constants.DIRECTION_BOTTOM); } /** * {@inheritDoc} */ public short traitBorderBeforeStyle() { - return propertyList.getBorderStyle(DtWritingMode.DIRECTION_BEFORE); + return propertyList.getBorderStyle(Constants.DIRECTION_BEFORE); } /** * {@inheritDoc} */ public short traitBorderAfterStyle() { - return propertyList.getBorderStyle(DtWritingMode.DIRECTION_AFTER); + return propertyList.getBorderStyle(Constants.DIRECTION_AFTER); } /** * {@inheritDoc} */ public short traitBorderStartStyle() { - return propertyList.getBorderStyle(DtWritingMode.DIRECTION_START); + return propertyList.getBorderStyle(Constants.DIRECTION_START); } /** * {@inheritDoc} */ public short traitBorderEndStyle() { - return propertyList.getBorderStyle(DtWritingMode.DIRECTION_END); + return propertyList.getBorderStyle(Constants.DIRECTION_END); } /** * {@inheritDoc} */ public short traitBorderLeftStyle() { - return propertyList.getBorderStyle(DtWritingMode.DIRECTION_LEFT); + return propertyList.getBorderStyle(Constants.DIRECTION_LEFT); } /** * {@inheritDoc} */ public short traitBorderRightStyle() { - return propertyList.getBorderStyle(DtWritingMode.DIRECTION_RIGHT); + return propertyList.getBorderStyle(Constants.DIRECTION_RIGHT); } /** * {@inheritDoc} */ public short traitBorderTopStyle() { - return propertyList.getBorderStyle(DtWritingMode.DIRECTION_TOP); + return propertyList.getBorderStyle(Constants.DIRECTION_TOP); } /** * {@inheritDoc} */ public short traitBorderBottomStyle() { - return propertyList.getBorderStyle(DtWritingMode.DIRECTION_BOTTOM); + return propertyList.getBorderStyle(Constants.DIRECTION_BOTTOM); } /** * {@inheritDoc} */ public int traitBorderBeforeWidth(boolean isFirst) { - return propertyList.getBorderWidth(DtWritingMode.DIRECTION_BEFORE, + return propertyList.getBorderWidth(Constants.DIRECTION_BEFORE, isFirst); } @@ -1459,7 +1458,7 @@ * {@inheritDoc} */ public int traitBorderAfterWidth(boolean isLast) { - return propertyList.getBorderWidth(DtWritingMode.DIRECTION_AFTER, + return propertyList.getBorderWidth(Constants.DIRECTION_AFTER, isLast); } @@ -1467,7 +1466,7 @@ * {@inheritDoc} */ public int traitBorderStartWidth(boolean isFirst) { - return propertyList.getBorderWidth(DtWritingMode.DIRECTION_START, + return propertyList.getBorderWidth(Constants.DIRECTION_START, isFirst); } @@ -1475,35 +1474,35 @@ * {@inheritDoc} */ public int traitBorderEndWidth(boolean isLast) { - return propertyList.getBorderWidth(DtWritingMode.DIRECTION_END, isLast); + return propertyList.getBorderWidth(Constants.DIRECTION_END, isLast); } /** * {@inheritDoc} */ public int traitBorderLeftWidth() { - return propertyList.getBorderWidth(DtWritingMode.DIRECTION_LEFT, true); + return propertyList.getBorderWidth(Constants.DIRECTION_LEFT, true); } /** * {@inheritDoc} */ public int traitBorderRightWidth() { - return propertyList.getBorderWidth(DtWritingMode.DIRECTION_RIGHT, true); + return propertyList.getBorderWidth(Constants.DIRECTION_RIGHT, true); } /** * {@inheritDoc} */ public int traitBorderTopWidth() { - return propertyList.getBorderWidth(DtWritingMode.DIRECTION_TOP, true); + return propertyList.getBorderWidth(Constants.DIRECTION_TOP, true); } /** * {@inheritDoc} */ public int traitBorderBottomWidth() { - return propertyList.getBorderWidth(DtWritingMode.DIRECTION_BOTTOM, + return propertyList.getBorderWidth(Constants.DIRECTION_BOTTOM, true); } @@ -1511,56 +1510,56 @@ * {@inheritDoc} */ public int traitPaddingBefore(boolean isFirst) { - return propertyList.getPadding(DtWritingMode.DIRECTION_BEFORE, isFirst); + return propertyList.getPadding(Constants.DIRECTION_BEFORE, isFirst); } /** * {@inheritDoc} */ public int traitPaddingAfter(boolean isLast) { - return propertyList.getPadding(DtWritingMode.DIRECTION_AFTER, isLast); + return propertyList.getPadding(Constants.DIRECTION_AFTER, isLast); } /** * {@inheritDoc} */ public int traitPaddingStart(boolean isFirst) { - return propertyList.getPadding(DtWritingMode.DIRECTION_START, isFirst); + return propertyList.getPadding(Constants.DIRECTION_START, isFirst); } /** * {@inheritDoc} */ public int traitPaddingEnd(boolean isLast) { - return propertyList.getPadding(DtWritingMode.DIRECTION_END, isLast); + return propertyList.getPadding(Constants.DIRECTION_END, isLast); } /** * {@inheritDoc} */ public int traitPaddingLeft() { - return propertyList.getPadding(DtWritingMode.DIRECTION_LEFT, true); + return propertyList.getPadding(Constants.DIRECTION_LEFT, true); } /** * {@inheritDoc} */ public int traitPaddingRight() { - return propertyList.getPadding(DtWritingMode.DIRECTION_RIGHT, true); + return propertyList.getPadding(Constants.DIRECTION_RIGHT, true); } /** * {@inheritDoc} */ public int traitPaddingTop() { - return propertyList.getPadding(DtWritingMode.DIRECTION_TOP, true); + return propertyList.getPadding(Constants.DIRECTION_TOP, true); } /** * {@inheritDoc} */ public int traitPaddingBottom() { - return propertyList.getPadding(DtWritingMode.DIRECTION_BOTTOM, true); + return propertyList.getPadding(Constants.DIRECTION_BOTTOM, true); } /** @@ -1777,8 +1776,8 @@ String script = this.traitScript(); WritingMode writingMode = this.getWritingMode(); if (script.equals("auto")) { - if (writingMode.getAbsoluteAxis(WritingMode.AXIS_IP) - == WritingMode.AXIS_HORIZONTAL) { + if (writingMode.getAbsoluteAxis(Constants.AXIS_IP) + == Constants.AXIS_HORIZONTAL) { /* The writing mode is horizontal. */ return Constants.BASELINE_ALPHABETIC; } else { @@ -2215,28 +2214,28 @@ * {@inheritDoc} */ public int traitBorderBeforePrecedence() { - return propertyList.getBorderPrecedence(DtWritingMode.DIRECTION_BEFORE); + return propertyList.getBorderPrecedence(Constants.DIRECTION_BEFORE); } /** * {@inheritDoc} */ public int traitBorderAfterPrecedence() { - return propertyList.getBorderPrecedence(DtWritingMode.DIRECTION_AFTER); + return propertyList.getBorderPrecedence(Constants.DIRECTION_AFTER); } /** * {@inheritDoc} */ public int traitBorderStartPrecedence() { - return propertyList.getBorderPrecedence(DtWritingMode.DIRECTION_START); + return propertyList.getBorderPrecedence(Constants.DIRECTION_START); } /** * {@inheritDoc} */ public int traitBorderEndPrecedence() { - return propertyList.getBorderPrecedence(DtWritingMode.DIRECTION_END); + return propertyList.getBorderPrecedence(Constants.DIRECTION_END); } /** Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FObjScaled.java =================================================================== --- trunk/foray/foray-fotree/src/java/org/foray/fotree/FObjScaled.java 2006-05-26 15:04:07 UTC (rev 7262) +++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObjScaled.java 2006-05-26 15:58:40 UTC (rev 7263) @@ -26,8 +26,8 @@ import org.foray.fotree.fo.prop.ContentDimension; import org.foray.fotree.fo.prop.Dimension; -import org.foray.fotree.value.DtWritingMode; +import org.axsl.common.Constants; import org.axsl.foR.FOTreeException; import org.axsl.text.line.LineNonText; @@ -167,20 +167,20 @@ private boolean contentWidthIsAuto() { ContentDimension contentWidth = propertyList - .getContentDimensionProperty(DtWritingMode.AXIS_HORIZONTAL); + .getContentDimensionProperty(Constants.AXIS_HORIZONTAL); if (contentWidth == null) { return true; } - return contentWidth.isAuto(this, DtWritingMode.AXIS_HORIZONTAL); + return contentWidth.isAuto(this, Constants.AXIS_HORIZONTAL); } private boolean contentHeightIsAuto() { ContentDimension contentHeight = propertyList - .getContentDimensionProperty(DtWritingMode.AXIS_VERTICAL); + .getContentDimensionProperty(Constants.AXIS_VERTICAL); if (contentHeight == null) { return true; } - return contentHeight.isAuto(this, DtWritingMode.AXIS_VERTICAL); + return contentHeight.isAuto(this, Constants.AXIS_VERTICAL); } /** Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java =================================================================== --- trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java 2006-05-26 15:04:07 UTC (rev 7262) +++ trunk/foray/foray-fotree/src/java/org/foray/fotree/PropertyList.java 2006-05-26 15:58:40 UTC (rev 7263) @@ -367,22 +367,22 @@ } public int getMarginTop(int widthContainingBlock) { - return getAbsoluteMargin(DtWritingMode.DIRECTION_TOP, + return getAbsoluteMargin(Constants.DIRECTION_TOP, widthContainingBlock); } public int getMarginBottom(int widthContainingBlock) { - return getAbsoluteMargin(DtWritingMode.DIRECTION_BOTTOM, + return getAbsoluteMargin(Constants.DIRECTION_BOTTOM, widthContainingBlock); } public int getMarginLeft(int widthContainingBlock) { - return getAbsoluteMargin(DtWritingMode.DIRECTION_LEFT, + return getAbsoluteMargin(Constants.DIRECTION_LEFT, widthContainingBlock); } public int getMarginRight(int widthContainingBlock) { - return getAbsoluteMargin(DtWritingMode.DIRECTION_RIGHT, + return getAbsoluteMargin(Constants.DIRECTION_RIGHT, widthContainingBlock); } @@ -616,9 +616,9 @@ .FOPROP_BORDER_SPACING); } if (property != null) { - return property.getValue(DtWritingMode.AXIS_IP, fobj); + return property.getValue(Constants.AXIS_IP, fobj); } - return BorderSeparation.getValueNoInstance(DtWritingMode.AXIS_IP, fobj); + return BorderSeparation.getValueNoInstance(Constants.AXIS_IP, fobj); } public int getBorderSeparationBPD() { @@ -629,9 +629,9 @@ .FOPROP_BORDER_SPACING); } if (property != null) { - return property.getValue(DtWritingMode.AXIS_BP, fobj); + return property.getValue(Constants.AXIS_BP, fobj); } - return BorderSeparation.getValueNoInstance(DtWritingMode.AXIS_BP, fobj); + return BorderSeparation.getValueNoInstance(Constants.AXIS_BP, fobj); } public int getNumberColumnsRepeated() { @@ -1013,11 +1013,11 @@ } public int getPageWidth() { - return getPageDimension(DtWritingMode.AXIS_HORIZONTAL); + return getPageDimension(Constants.AXIS_HORIZONTAL); } public int getPageHeight() { - return getPageDimension(DtWritingMode.AXIS_VERTICAL); + return getPageDimension(Constants.AXIS_VERTICAL); } public short getTextAlign() { @@ -1127,7 +1127,7 @@ if (property == null) { return RelativeSpace.getValueNoInstance(); } - return property.getValue(DtWritingMode.DIRECTION_BEFORE, subProperty, + return property.getValue(Constants.DIRECTION_BEFORE, subProperty, fobj, 0); } @@ -1141,7 +1141,7 @@ * If a corresponding margin property exists, conditionality must be * set to "retain". See XSL-FO Std. 1.0, Section 5.3.2, Para 1. */ - if (correspondingMarginExists(DtWritingMode.DIRECTION_BEFORE)) { + if (correspondingMarginExists(Constants.DIRECTION_BEFORE)) { return Constants.FOVAL_RETAIN; } return RelativeSpace.getConditionalityNoInstance(); @@ -1162,7 +1162,7 @@ if (property == null) { return RelativeSpace.getValueNoInstance(); } - return property.getValue(DtWritingMode.DIRECTION_AFTER, subProperty, + return property.getValue(Constants.DIRECTION_AFTER, subProperty, fobj, 0); } @@ -1176,7 +1176,7 @@ * If a corresponding margin property exists, conditionality must be * set to "retain". See XSL-FO Std. 1.0, Section 5.3.2, Para 1. */ - if (correspondingMarginExists(DtWritingMode.DIRECTION_AFTER)) { + if (correspondingMarginExists(Constants.DIRECTION_AFTER)) { return Constants.FOVAL_RETAIN; } return RelativeSpace.getConditionalityNoInstance(); @@ -1198,7 +1198,7 @@ if (property == null) { return RelativeSpace.getValueNoInstance(); } - return property.getValue(DtWritingMode.DIRECTION_START, subProperty, + return property.getValue(Constants.DIRECTION_START, subProperty, fobj, ipdAncestorBlockArea); } @@ -1226,7 +1226,7 @@ if (property == null) { return RelativeSpace.getValueNoInstance(); } - return property.getValue(DtWritingMode.DIRECTION_END, subProperty, + return property.getValue(Constants.DIRECTION_END, subProperty, fobj, ipdAncestorBlockArea); } @@ -1258,14 +1258,14 @@ } public int getWidth(int parentAreaCR_width) { - if (getWritingMode().getBPAxis() == DtWritingMode.AXIS_HORIZONTAL) { + if (getWritingMode().getBPAxis() == Constants.AXIS_HORIZONTAL) { return traitBPDimensionOpt(parentAreaCR_width); } return traitIPDimensionOpt(parentAreaCR_width); } public int getHeight(int parentAreaCR_height) { - if (getWritingMode().getBPAxis() == DtWritingMode.AXIS_VERTICAL) { + if (getWritingMode().getBPAxis() == Constants.AXIS_VERTICAL) { return traitBPDimensionOpt(parentAreaCR_height); } return traitIPDimensionOpt(parentAreaCR_height); @@ -1293,22 +1293,22 @@ } public int getTop(int heightContainingBlock) { - return getAbsoluteOffset(DtWritingMode.DIRECTION_TOP, + return getAbsoluteOffset(Constants.DIRECTION_TOP, heightContainingBlock); } public int getBottom(int heightContainingBlock) { - return getAbsoluteOffset(DtWritingMode.DIRECTION_BOTTOM, + return getAbsoluteOffset(Constants.DIRECTION_BOTTOM, heightContainingBlock); } public int getLeft(int widthContainingBlock) { - return getAbsoluteOffset(DtWritingMode.DIRECTION_LEFT, + return getAbsoluteOffset(Constants.DIRECTION_LEFT, widthContainingBlock); } public int getRight(int widthContainingBlock) { - return getAbsoluteOffset(DtWritingMode.DIRECTION_RIGHT, + return getAbsoluteOffset(Constants.DIRECTION_RIGHT, widthContainingBlock); } @@ -1387,13 +1387,13 @@ public int getContentWidth(int intrinsicContentWidth, int viewportWidth) { - return getContentDimension(DtWritingMode.AXIS_HORIZONTAL, + return getContentDimension(Constants.AXIS_HORIZONTAL, intrinsicContentWidth, viewportWidth); } public int getContentHeight(int intrinsicContentHeight, int viewportHeight) { - return getContentDimension(DtWritingMode.AXIS_VERTICAL, + return getContentDimension(Constants.AXIS_VERTICAL, intrinsicContentHeight, viewportHeight); } @@ -1532,7 +1532,7 @@ private int getRelativeDimension(byte relativeAxis, int subProperty, int parentAreaCR_Dimension) { RelativeDimension property = null; - if (relativeAxis == DtWritingMode.AXIS_BP) { + if (relativeAxis == Constants.AXIS_BP) { property = (RelativeDimension) getProperty(Constants.FOPROP_BLOCK_PROGRESSION_DIMENSION); } else { @@ -1546,7 +1546,7 @@ // Try the corresponding absolute dimension AbsoluteDimension absDimProperty = null; byte absoluteAxis = getWritingMode().getAbsoluteAxis(relativeAxis); - if (absoluteAxis == DtWritingMode.AXIS_HORIZONTAL) { + if (absoluteAxis == Constants.AXIS_HORIZONTAL) { switch (subProperty) { case Property.MINIMUM: { absDimProperty = (AbsoluteDimension) getProperty @@ -1561,7 +1561,7 @@ (Constants.FOPROP_WIDTH); } } - } else if (absoluteAxis == DtWritingMode.AXIS_VERTICAL){ + } else if (absoluteAxis == Constants.AXIS_VERTICAL){ switch (subProperty) { case Property.MINIMUM: { absDimProperty = (AbsoluteDimension) getProperty @@ -1585,7 +1585,7 @@ } public int traitBPDimensionMin(int parentAreaCR_BPD) { - int nominal = getRelativeDimension(DtWritingMode.AXIS_BP, + int nominal = getRelativeDimension(Constants.AXIS_BP, Property.MINIMUM, parentAreaCR_BPD); if (nominal == Dimension.DIMENSION_AUTO) { return this.getFObj().autoBPDimension(); @@ -1594,7 +1594,7 @@ } public int traitBPDimensionOpt(int parentAreaCR_BPD) { - int nominal = getRelativeDimension(DtWritingMode.AXIS_BP, + int nominal = getRelativeDimension(Constants.AXIS_BP, Property.OPTIMUM, parentAreaCR_BPD); if (nominal == Dimension.DIMENSION_AUTO) { return this.getFObj().autoBPDimension(); @@ -1603,7 +1603,7 @@ } public int traitBPDimensionMax(int parentAreaCR_BPD) { - int nominal = getRelativeDimension(DtWritingMode.AXIS_BP, + int nominal = getRelativeDimension(Constants.AXIS_BP, Property.MAXIMUM, parentAreaCR_BPD); if (nominal == Dimension.DIMENSION_AUTO) { return this.getFObj().autoBPDimension(); @@ -1612,7 +1612,7 @@ } public int traitIPDimensionMin(int parentAreaCR_IPD) { - int nominal = getRelativeDimension(DtWritingMode.AXIS_IP, + int nominal = getRelativeDimension(Constants.AXIS_IP, Property.MINIMUM, parentAreaCR_IPD); if (nominal == Dimension.DIMENSION_AUTO) { return this.getFObj().autoIPDimension(); @@ -1621,7 +1621,7 @@ } public int traitIPDimensionOpt(int parentAreaCR_IPD) { - int nominal = getRelativeDimension(DtWritingMode.AXIS_IP, + int nominal = getRelativeDimension(Constants.AXIS_IP, Property.OPTIMUM, parentAreaCR_IPD); if (nominal == Dimension.DIMENSION_AUTO) { return this.getFObj().autoIPDimension(); @@ -1630,7 +1630,7 @@ } public int traitIPDimensionMax(int parentAreaCR_IPD) { - int nominal = getRelativeDimension(DtWritingMode.AXIS_IP, + int nominal = getRelativeDimension(Constants.AXIS_IP, Property.MAXIMUM, parentAreaCR_IPD); if (nominal == Dimension.DIMENSION_AUTO) { return this.getFObj().autoIPDimension(); @@ -2899,13 +2899,13 @@ public double traitPauseBefore() { Pause property = (Pause) getProperty(Constants.FOPROP_PAUSE_BEFORE); if (property != null) { - return property.getValue(fobj, DtWritingMode.DIRECTION_BEFORE); + return property.getValue(fobj, Constants.DIRECTION_BEFORE); } // Try the shorthand property = (Pause) getProperty(Constants.FOPROP_PAUSE); if (property != null) { return property.getShorthandValue(fobj, - DtWritingMode.DIRECTION_BEFORE); + Constants.DIRECTION_BEFORE); } return Pause.getValueNoInstance(); } @@ -2913,13 +2913,13 @@ public double traitPauseAfter() { Pause property = (Pause) getProperty(Constants.FOPROP_PAUSE_AFTER); if (property != null) { - return property.getValue(fobj, DtWritingMode.DIRECTION_AFTER); + return property.getValue(fobj, Constants.DIRECTION_AFTER); } // Try the shorthand property = (Pause) getProperty(Constants.FOPROP_PAUSE); if (property != null) { return property.getShorthandValue(fobj, - DtWritingMode.DIRECTION_AFTER); + Constants.DIRECTION_AFTER); } return Pause.getValueNoInstance(); } @@ -3072,20 +3072,20 @@ GlyphOrientation property = (GlyphOrientation) getProperty(Constants.FOPROP_GLYPH_ORIENTATION_HORIZONTAL); if (property != null) { - return property.getValue(fobj, DtWritingMode.AXIS_HORIZONTAL); + return property.getValue(fobj, Constants.AXIS_HORIZONTAL); } return GlyphOrientation.getValueNoInstance(fobj, - DtWritingMode.AXIS_HORIZONTAL); + Constants.AXIS_HORIZONTAL); } public short traitGlyphOrientationVertical() { GlyphOrientation property = (GlyphOrientation) getProperty(Constants.FOPROP_GLYPH_ORIENTATION_VERTICAL); if (property != null) { - return property.getValue(fobj, DtWritingMode.AXIS_VERTICAL); + return property.getValue(fobj, Constants.AXIS_VERTICAL); } return GlyphOrientation.getValueNoInstance(fobj, - DtWritingMode.AXIS_VERTICAL); + Constants.AXIS_VERTICAL); } public int traitBackgroundPositionHorizontal(int paddingRectangleWidth, @@ -3093,7 +3093,7 @@ BackgroundPosition property = (BackgroundPosition) getProperty(Constants.FOPROP_BACKGROUND_POSITION_HORIZONTAL); if (property != null) { - return property.getValue(fobj, DtWritingMode.AXIS_HORIZONTAL, + return property.getValue(fobj, Constants.AXIS_HORIZONTAL, paddingRectangleWidth, backgroundImageWidth); } // Try the first shorthand @@ -3101,7 +3101,7 @@ .FOPROP_BACKGROUND_POSITION); if (property != null) { return property.getShorthandValue(fobj, - DtWritingMode.AXIS_HORIZONTAL, paddingRectangleWidth, + Constants.AXIS_HORIZONTAL, paddingRectangleWidth, backgroundImageWidth); } // Try the second shorthand @@ -3111,7 +3111,7 @@ property = background.getPosition(); if (property != null) { return property.getShorthandValue(fobj, - DtWritingMode.AXIS_HORIZONTAL, paddingRectangleWidth, + Constants.AXIS_HORIZONTAL, paddingRectangleWidth, backgroundImageWidth); } } @@ -3123,7 +3123,7 @@ BackgroundPosition property = (BackgroundPosition) getProperty(Constants.FOPROP_BACKGROUND_POSITION_VERTICAL); if (property != null) { - return property.getValue(fobj, DtWritingMode.AXIS_VERTICAL, + return property.getValue(fobj, Constants.AXIS_VERTICAL, paddingRectangleHeight, backgroundImageHeight); } // Try the first shorthand @@ -3131,7 +3131,7 @@ .FOPROP_BACKGROUND_POSITION); if (property != null) { return property.getShorthandValue(fobj, - DtWritingMode.AXIS_VERTICAL, paddingRectangleHeight, + Constants.AXIS_VERTICAL, paddingRectangleHeight, backgroundImageHeight); } // Try the second shorthand @@ -3141,7 +3141,7 @@ property = background.getPosition(); if (property != null) { return property.getShorthandValue(fobj, - DtWritingMode.AXIS_VERTICAL, paddingRectangleHeight, + Constants.AXIS_VERTICAL, paddingRectangleHeight, backgroundImageHeight); } } Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/AbsoluteDimension.java =================================================================== --- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/AbsoluteDimension.java 2006-05-26 15:04:07 UTC (rev 7262) +++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/AbsoluteDimension.java 2006-05-26 15:58:40 UTC (rev 7263) @@ -29,7 +29,6 @@ import org.foray.fotree.PropertyList; import org.foray.fotree.value.DtLength; import org.foray.fotree.value.DtPercentage; -import org.foray.fotree.value.DtWritingMode; import org.foray.fotree.value.PropertyKeyword; import org.foray.fotree.value.PropertyValue; @@ -102,7 +101,7 @@ switch (getPropertyType()) { case Constants.FOPROP_HEIGHT: case Constants.FOPROP_WIDTH: { - if (relativeAxis == DtWritingMode.AXIS_BP) { + if (relativeAxis == Constants.AXIS_BP) { return fobj.getFObjParent().traitBPDimensionOpt (dimAncestorGenByBlockLevelFO); } @@ -111,7 +110,7 @@ } case Constants.FOPROP_MAX_HEIGHT: case Constants.FOPROP_MAX_WIDTH: { - if (relativeAxis == DtWritingMode.AXIS_BP) { + if (relativeAxis == Constants.AXIS_BP) { return fobj.getFObjParent().traitBPDimensionMax (dimAncestorGenByBlockLevelFO); } @@ -120,7 +119,7 @@ } case Constants.FOPROP_MIN_HEIGHT: case Constants.FOPROP_MIN_WIDTH: { - if (relativeAxis == DtWritingMode.AXIS_BP) { + if (relativeAxis == Constants.AXIS_BP) { return fobj.getFObjParent().traitBPDimensionMin (dimAncestorGenByBlockLevelFO); } Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/AbsoluteOffset.java =================================================================== --- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/AbsoluteOffset.java 2006-05-26 15:04:07 UTC (rev 7262) +++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/AbsoluteOffset.java 2006-05-26 15:58:40 UTC (rev 7263) @@ -30,7 +30,6 @@ import org.foray.fotree.PropertyList; import org.foray.fotree.value.DtLength; import org.foray.fotree.value.DtPercentage; -import org.foray.fotree.value.DtWritingMode; import org.foray.fotree.value.PropertyKeyword; import org.foray.fotree.value.PropertyValue; @@ -124,16 +123,16 @@ */ public static short rawPropertyName(int direction) { switch (direction) { - case DtWritingMode.DIRECTION_TOP: { + case Constants.DIRECTION_TOP: { return Constants.FOPROP_TOP; } - case DtWritingMode.DIRECTION_BOTTOM: { + case Constants.DIRECTION_BOTTOM: { return Constants.FOPROP_BOTTOM; } - case DtWritingMode.DIRECTION_LEFT: { + case Constants.DIRECTION_LEFT: { return Constants.FOPROP_LEFT; } - case DtWritingMode.DIRECTION_RIGHT: { + case Constants.DIRECTION_RIGHT: { return Constants.FOPROP_RIGHT; } } Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BackgroundPosition.java =================================================================== --- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BackgroundPosition.java 2006-05-26 15:04:07 UTC (rev 7262) +++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BackgroundPosition.java 2006-05-26 15:58:40 UTC (rev 7263) @@ -30,7 +30,6 @@ import org.foray.fotree.PropertyList; import org.foray.fotree.value.DtLength; import org.foray.fotree.value.DtPercentage; -import org.foray.fotree.value.DtWritingMode; import org.foray.fotree.value.PropertyCollection; import org.foray.fotree.value.PropertyKeyword; import org.foray.fotree.value.PropertyValue; @@ -209,12 +208,12 @@ FObj parent = fobj.getFObjParent(); if (parent != null) { switch (axis) { - case DtWritingMode.AXIS_HORIZONTAL: { + case Constants.AXIS_HORIZONTAL: { return parent.traitBackgroundPositionHorizontal( paddingRectangleDimension, backgroundImageDimension); } - case DtWritingMode.AXIS_VERTICAL: { + case Constants.AXIS_VERTICAL: { return parent.traitBackgroundPositionVertical( paddingRectangleDimension, backgroundImageDimension); @@ -235,19 +234,19 @@ PropertyValue pv = bpProperty.getPropertyValue(); if (collection.getCount() == 1) { if (pv instanceof DtPercentage || pv instanceof DtLength) { - if (axis == DtWritingMode.AXIS_VERTICAL) { + if (axis == Constants.AXIS_VERTICAL) { return (int) Math.round(.5 * (paddingRectangleDimension - backgroundImageDimension)); } } if (pv instanceof PropertyKeyword) { short keyword = ((PropertyKeyword) pv).getValue(); - if (axis == DtWritingMode.AXIS_HORIZONTAL + if (axis == Constants.AXIS_HORIZONTAL && keywordInSet(keyword, validKeywordsVertical)) { return (int) Math.round(.5 * (paddingRectangleDimension - backgroundImageDimension)); } - if (axis == DtWritingMode.AXIS_VERTICAL + if (axis == Constants.AXIS_VERTICAL && keywordInSet(keyword, validKeywordsHorizontal)) { return (int) Math.round(.5 * (paddingRectangleDimension - backgroundImageDimension)); @@ -268,10 +267,10 @@ PropertyValue pv2 = bpProperty2.getPropertyValue(); BackgroundPosition bpPropertyToUse = null; if (pv instanceof DtPercentage || pv instanceof DtLength) { - if (axis == DtWritingMode.AXIS_HORIZONTAL) { + if (axis == Constants.AXIS_HORIZONTAL) { bpPropertyToUse = bpProperty; } - if (axis == DtWritingMode.AXIS_VERTICAL) { + if (axis == Constants.AXIS_VERTICAL) { bpPropertyToUse = bpProperty2; } } @@ -291,14 +290,14 @@ if (keywordInSet(keyword2, validKeywordsHorizontal)) { horizontalFirst = false; } - if (axis == DtWritingMode.AXIS_HORIZONTAL) { + if (axis == Constants.AXIS_HORIZONTAL) { if (horizontalFirst) { bpPropertyToUse = bpProperty; } else { bpPropertyToUse = bpProperty2; } } - if (axis == DtWritingMode.AXIS_VERTICAL) { + if (axis == Constants.AXIS_VERTICAL) { if (horizontalFirst) { bpPropertyToUse = bpProperty2; } else { Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BorderColor.java =================================================================== --- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BorderColor.java 2006-05-26 15:04:07 UTC (rev 7262) +++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BorderColor.java 2006-05-26 15:58:40 UTC (rev 7263) @@ -29,7 +29,6 @@ import org.foray.fotree.PropertyException; import org.foray.fotree.PropertyList; import org.foray.fotree.value.DtColor; -import org.foray.fotree.value.DtWritingMode; import org.foray.fotree.value.ExprColor; import org.foray.fotree.value.PropertyCollection; import org.foray.fotree.value.PropertyValue; @@ -124,28 +123,28 @@ */ public static short rawPropertyType(int direction) { switch (direction) { - case DtWritingMode.DIRECTION_BEFORE: { + case Constants.DIRECTION_BEFORE: { return Constants.FOPROP_BORDER_BEFORE_COLOR; } - case DtWritingMode.DIRECTION_AFTER: { + case Constants.DIRECTION_AFTER: { return Constants.FOPROP_BORDER_AFTER_COLOR; } - case DtWritingMode.DIRECTION_START: { + case Constants.DIRECTION_START: { return Constants.FOPROP_BORDER_START_COLOR; } - case DtWritingMode.DIRECTION_END: { + case Constants.DIRECTION_END: { return Constants.FOPROP_BORDER_END_COLOR; } - case DtWritingMode.DIRECTION_LEFT: { + case Constants.DIRECTION_LEFT: { return Constants.FOPROP_BORDER_LEFT_COLOR; } - case DtWritingMode.DIRECTION_RIGHT: { + case Constants.DIRECTION_RIGHT: { return Constants.FOPROP_BORDER_RIGHT_COLOR; } - case DtWritingMode.DIRECTION_TOP: { + case Constants.DIRECTION_TOP: { return Constants.FOPROP_BORDER_TOP_COLOR; } - case DtWritingMode.DIRECTION_BOTTOM: { + case Constants.DIRECTION_BOTTOM: { return Constants.FOPROP_BORDER_BOTTOM_COLOR; } default: { Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BorderPrecedence.java =================================================================== --- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BorderPrecedence.java 2006-05-26 15:04:07 UTC (rev 7262) +++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BorderPrecedence.java 2006-05-26 15:58:40 UTC (rev 7263) @@ -36,7 +36,6 @@ import org.foray.fotree.fo.obj.TableHeader; import org.foray.fotree.fo.obj.TableRow; import org.foray.fotree.value.DtInteger; -import org.foray.fotree.value.DtWritingMode; import org.foray.fotree.value.PropertyKeyword; import org.foray.fotree.value.PropertyValue; @@ -86,16 +85,16 @@ FObj parent = fobj.getFObjParent(); if (parent != null) { switch (direction) { - case DtWritingMode.DIRECTION_BEFORE: { + case Constants.DIRECTION_BEFORE: { return parent.traitBorderBeforePrecedence(); } - case DtWritingMode.DIRECTION_AFTER: { + case Constants.DIRECTION_AFTER: { return parent.traitBorderAfterPrecedence(); } - case DtWritingMode.DIRECTION_START: { + case Constants.DIRECTION_START: { return parent.traitBorderStartPrecedence(); } - case DtWritingMode.DIRECTION_END: { + case Constants.DIRECTION_END: { return parent.traitBorderEndPrecedence(); } } @@ -131,16 +130,16 @@ public static short getPropertyType(byte direction) { switch (direction) { - case DtWritingMode.DIRECTION_BEFORE: { + case Constants.DIRECTION_BEFORE: { return Constants.FOPROP_BORDER_BEFORE_PRECEDENCE; } - case DtWritingMode.DIRECTION_AFTER: { + case Constants.DIRECTION_AFTER: { return Constants.FOPROP_BORDER_AFTER_PRECEDENCE; } - case DtWritingMode.DIRECTION_START: { + case Constants.DIRECTION_START: { return Constants.FOPROP_BORDER_START_PRECEDENCE; } - case DtWritingMode.DIRECTION_END: { + case Constants.DIRECTION_END: { return Constants.FOPROP_BORDER_END_PRECEDENCE; } } Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BorderSeparation.java =================================================================== --- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BorderSeparation.java 2006-05-26 15:04:07 UTC (rev 7262) +++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BorderSeparation.java 2006-05-26 15:58:40 UTC (rev 7263) @@ -30,7 +30,6 @@ import org.foray.fotree.PropertyList; import org.foray.fotree.value.DtLength; import org.foray.fotree.value.DtLengthBPIPDirection; -import org.foray.fotree.value.DtWritingMode; import org.foray.fotree.value.PropertyKeyword; import org.foray.fotre... [truncated message content] |