Revision: 12258
http://sourceforge.net/p/foray/code/12258
Author: victormote
Date: 2021-12-21 19:43:22 +0000 (Tue, 21 Dec 2021)
Log Message:
-----------
Move and rename class for clarity and consistency.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/PropertyList.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ExternalGraphic4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/InstreamForeignObject4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/AbstractContentDimension.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdContentHeight.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdContentWidth.java
Added Paths:
-----------
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FoScaled4a.java
Removed Paths:
-------------
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObjScaled.java
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java 2021-12-21 19:37:33 UTC (rev 12257)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java 2021-12-21 19:43:22 UTC (rev 12258)
@@ -45,6 +45,7 @@
import org.foray.fotree.fo.obj.BasicLink4a;
import org.foray.fotree.fo.obj.Block4a;
import org.foray.fotree.fo.obj.Flow4a;
+import org.foray.fotree.fo.obj.FoScaled4a;
import org.foray.fotree.fo.obj.FoTextCharacters4a;
import org.foray.fotree.fo.obj.Leader4a;
import org.foray.fotree.fo.obj.ListBlock4a;
@@ -3179,7 +3180,7 @@
* using "inherit".
* @return The content-height.
*/
- public float getContentHeight(final FoContext context, final FoObjScaled fobjScaled) {
+ public float getContentHeight(final FoContext context, final FoScaled4a fobjScaled) {
return getPropertyList().getContentHeight(this, context, fobjScaled);
}
@@ -3201,7 +3202,7 @@
* using "inherit".
* @return The content-width.
*/
- public float getContentWidth(final FoContext context, final FoObjScaled fobjScaled) {
+ public float getContentWidth(final FoContext context, final FoScaled4a fobjScaled) {
return getPropertyList().getContentWidth(this, context, fobjScaled);
}
Deleted: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObjScaled.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObjScaled.java 2021-12-21 19:37:33 UTC (rev 12257)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObjScaled.java 2021-12-21 19:43:22 UTC (rev 12258)
@@ -1,242 +0,0 @@
-/*
- * Copyright 2004 The FOray Project.
- * http://www.foray.org
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * This work is in part derived from the following work(s), used with the
- * permission of the licensor:
- * Apache FOP, licensed by the Apache Software Foundation
- *
- */
-
-/*
- * $LastChangedRevision$
- * $LastChangedDate$
- * $LastChangedBy$
- */
-
-package org.foray.fotree;
-
-import org.foray.common.WellKnownConstants;
-
-import org.axsl.common.value.FoPropertyConstants;
-import org.axsl.fotree.FoContext;
-
-/**
- * Abstract base class for inline FOs that are scaleable. This currently
- * includes external-graphic and instream-foreign-object.
- */
-public abstract class FoObjScaled extends FoObj implements org.axsl.fotree.FoScaled {
-
- /** The property list for this object. */
- private PropertyList propertyList;
-
- /**
- * Constructor.
- * @param parent The parent FoObj.
- * @param propertyList The property list for this FoObj.
- */
- public FoObjScaled(final FoObj parent, final PropertyList propertyList) {
- super(parent);
- this.propertyList = propertyList;
- }
-
- /**
- * Returns the width of the content.
- * @param context An object that knows how to resolve FO Tree context
- * issues.
- * @return The width, in millipoints, of the content of this object, as
- * reported by the content itself.
- */
- public abstract int intrinsicContentWidth(FoContext context);
-
- /**
- * Returns the height of the content.
- * @param context An object that knows how to resolve FO Tree context
- * issues.
- * @return The height, in millipoints, of the content of this object, as
- * reported by the content itself.
- */
- public abstract int intrinsicContentHeight(FoContext context);
-
- @Override
- public int viewportIpd(final FoContext context) {
- /* See XSL-FO Standard 1.0, Section 6.6.5 and 6.6.6, Subsection
- * "Constraints", first paragraph, for explanation of logic. */
- final int viewportIPD = this.traitIpDimensionOpt(context);
- if (viewportIPD != FoPropertyConstants.DIMENSION_AUTO) {
- return viewportIPD;
- }
-
- /* The remaining logic is for the "auto" case.
- * The CSS2 spec says that for replaced inline content, if
- * width="auto", it should return the intrinsic width.
- * See http://www.w3.org/TR/REC-CSS2/visudet.html#q5.
- * However, the documentation on the fo:external-graphic and
- * fo:instream-foreign-object say that the "content size" should be
- * used, and then define it. */
- final int intrinsicWidth = this.intrinsicContentWidth(context);
-
- /* We already know that the viewport IPD is dependent on the
- * content-width.
- * If the content-width is also dependent on the viewport IPD, then we
- * have a circular dependency. */
- if (this.isContentWidthDependentOnPd(context)) {
- /* We have a circular dependency. See if we can use the other
- * dimension to compute this one. */
- if (this.isViewportBpdDependent(context)) {
- /* The viewport BPD is not specified either, so the user has
- * given us absolutely nothing by which to compute the
- * dimensions of this viewport.
- * We punt by returning the smaller of 1) the intrinsic width,
- * and 2) the width of the parent area. */
- return Math.min(intrinsicWidth,
- context.ipdAncestorBlockOrRa());
- } else {
- /* We can use the other dimension to compute this one. */
- final int viewportBpd = this.viewportBpd(context);
- final int intrinsicHeight = this.intrinsicContentWidth(context);
- final float widthToHeight = (float) intrinsicWidth
- / (float) intrinsicHeight;
- return Math.round(widthToHeight * viewportBpd);
- }
- }
-
- /* The content-width is not dependent on the viewport IPD, so we can
- * compute it first, then use it to compute the viewport IPD. */
- final float scalingFactor = this.getContentWidth(context, this);
- return Math.round(intrinsicWidth * scalingFactor);
- }
-
- /**
- * Indicates whether the viewport IPD for this graphic can be computed
- * independent of the viewport BPD.
- * @param context An object that knows how to resolve FO Tree context
- * issues.
- * @return True if and only if the viewport BPD needs to be computed before the IPD
- * can be.
- */
- private boolean isViewportIpdDependent(final FoContext context) {
- final int viewportIPD = this.traitIpDimensionOpt(context);
- if (viewportIPD != FoPropertyConstants.DIMENSION_AUTO) {
- return false;
- }
- if (this.isContentWidthDependentOnPd(context)) {
- return true;
- }
- return false;
- }
-
- @Override
- public int viewportBpd(final FoContext context) {
- /* See XSL-FO Standard 1.0, Section 6.6.5 and 6.6.6, Subsection
- * "Constraints", first paragraph, for explanation of logic. */
- final int viewportBPD = this.traitBpDimensionOpt(context);
- if (viewportBPD != FoPropertyConstants.DIMENSION_AUTO) {
- return viewportBPD;
- }
-
- /* The remaining logic is for the "auto" case.
- * The CSS2 spec says that for replaced inline content, if
- * height="auto", it should return the intrinsic height.
- * See http://www.w3.org/TR/REC-CSS2/visudet.html#q16.
- * However, the documentation on the fo:external-graphic and
- * fo:instream-foreign-object say that the "content size" should be
- * used, and then define it. */
- final int intrinsicHeight = this.intrinsicContentHeight(context);
-
- /* We already know that the viewport BPD is dependent on the
- * content-height.
- * If the content-height is also dependent on the viewport BPD, then we
- * have a circular dependency. */
- if (this.isContentHeightDependentOnPd(context)) {
- /* We have a circular dependency. See if we can use the other
- * dimension to compute this one. */
- if (this.isViewportIpdDependent(context)) {
- /* The viewport IPD is not specified either, so the user has
- * given us absolutely nothing by which to compute the
- * dimensions of this viewport.
- * We punt by returning the smaller of 1) the intrinsic height,
- * and 2) the height of the parent area. */
- return Math.min(intrinsicHeight,
- context.bpdAncestorBlockOrRa());
- } else {
- /* We can use the other dimension to compute this one. */
- final int viewportIpd = this.viewportIpd(context);
- final int intrinsicWidth = this.intrinsicContentWidth(context);
- final float heightToWidth = (float) intrinsicHeight
- / (float) intrinsicWidth;
- return Math.round(heightToWidth * viewportIpd);
- }
- }
-
- /* The content-height is not dependent on the viewport BPD, so we can
- * compute it first, then use it to compute the viewport BPD. */
- final float scalingFactor = this.getContentHeight(context, this);
- return Math.round(this.intrinsicContentHeight(context) * scalingFactor);
- }
-
- /**
- * Indicates whether the viewport BPD for this graphic can be computed
- * independent of the viewport IPD.
- * @param context An object that knows how to resolve FO Tree context
- * issues.
- * @return True if and only if the viewport IPD needs to be computed before the BPD
- * can be.
- */
- private boolean isViewportBpdDependent(final FoContext context) {
- final int viewportBPD = this.traitBpDimensionOpt(context);
- if (viewportBPD != FoPropertyConstants.DIMENSION_AUTO) {
- return false;
- }
- if (this.isContentHeightDependentOnPd(context)) {
- return true;
- }
- return false;
- }
-
- /**
- * Converts a quantity of pixels to a length in millipoints, using the
- * value passed in pixelsPerInch.
- * @param pixels The quantity of pixels to be converted to millipoints.
- * @param pixelsPerInch The resolution, in pixels-per-inch, at which the
- * conversion should take place.
- * @return The millipoint equivalent of pixels.
- */
- public static int pixelsToMillipoints(final int pixels,
- final int pixelsPerInch) {
- return pixels * WellKnownConstants.POINTS_PER_INCH
- * WellKnownConstants.MILLIUNITS_PER_UNIT / pixelsPerInch;
- }
-
- @Override
- public int referenceIpd(final FoContext context) {
- final int intrinsicWidth = this.intrinsicContentWidth(context);
- final float scaling = this.getContentWidth(context, this);
- return Math.round(intrinsicWidth * scaling);
- }
-
- @Override
- public int referenceBpd(final FoContext context) {
- final int intrinsicHeight = this.intrinsicContentHeight(context);
- final float scaling = this.getContentHeight(context, this);
- return Math.round(intrinsicHeight * scaling);
- }
-
- @Override
- public PropertyList getPropertyList() {
- return this.propertyList;
- }
-
-}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/PropertyList.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/PropertyList.java 2021-12-21 19:37:33 UTC (rev 12257)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/PropertyList.java 2021-12-21 19:43:22 UTC (rev 12258)
@@ -32,6 +32,7 @@
import org.foray.common.i18n.Country4a;
import org.foray.fotree.fo.FoProperty;
import org.foray.fotree.fo.FoValue;
+import org.foray.fotree.fo.obj.FoScaled4a;
import org.foray.fotree.fo.obj.Region4a;
import org.foray.fotree.fo.prop.AbstractAbsoluteDimension;
import org.foray.fotree.fo.prop.AbstractAbsoluteOffset;
@@ -1861,7 +1862,7 @@
* using "inherit".
* @return The scaling factor that should be applied to the intrinsic width of the content.
*/
- public float getContentWidth(final FoObj fobj, final FoContext context, final FoObjScaled fobjScaled) {
+ public float getContentWidth(final FoObj fobj, final FoContext context, final FoScaled4a fobjScaled) {
final PdContentWidth property = (PdContentWidth) getProperty(FoProperty.CONTENT_WIDTH);
if (property == null) {
/* Width scaling is not set. If we are scaling uniformly, use the
@@ -1906,7 +1907,7 @@
* using "inherit".
* @return The scaling factor that should be applied to the intrinsic height of the content.
*/
- public float getContentHeight(final FoObj fobj, final FoContext context, final FoObjScaled fobjScaled) {
+ public float getContentHeight(final FoObj fobj, final FoContext context, final FoScaled4a fobjScaled) {
final PdContentHeight property = (PdContentHeight) getProperty(FoProperty.CONTENT_HEIGHT);
if (property == null) {
/* Height scaling is not set. If we are scaling uniformly, use the
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ExternalGraphic4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ExternalGraphic4a.java 2021-12-21 19:37:33 UTC (rev 12257)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ExternalGraphic4a.java 2021-12-21 19:43:22 UTC (rev 12258)
@@ -30,7 +30,6 @@
import org.foray.common.ForayConstants;
import org.foray.fotree.FoObj;
-import org.foray.fotree.FoObjScaled;
import org.foray.fotree.Namespace;
import org.foray.fotree.PropertyList;
@@ -49,7 +48,7 @@
/**
* An "external-graphic" object in XSL-FO.
*/
-public class ExternalGraphic4a extends FoObjScaled implements ExternalGraphic {
+public class ExternalGraphic4a extends FoScaled4a implements ExternalGraphic {
/** The parent of this node. */
private FoObj parent;
Copied: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FoScaled4a.java (from rev 12256, trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObjScaled.java)
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FoScaled4a.java (rev 0)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FoScaled4a.java 2021-12-21 19:43:22 UTC (rev 12258)
@@ -0,0 +1,245 @@
+/*
+ * Copyright 2004 The FOray Project.
+ * http://www.foray.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * This work is in part derived from the following work(s), used with the
+ * permission of the licensor:
+ * Apache FOP, licensed by the Apache Software Foundation
+ *
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate$
+ * $LastChangedBy$
+ */
+
+package org.foray.fotree.fo.obj;
+
+import org.foray.common.WellKnownConstants;
+import org.foray.fotree.FoObj;
+import org.foray.fotree.PropertyList;
+
+import org.axsl.common.value.FoPropertyConstants;
+import org.axsl.fotree.FoContext;
+import org.axsl.fotree.FoScaled;
+
+/**
+ * Abstract base class for inline FOs that are scaleable. This currently
+ * includes external-graphic and instream-foreign-object.
+ */
+public abstract class FoScaled4a extends FoObj implements FoScaled {
+
+ /** The property list for this object. */
+ private PropertyList propertyList;
+
+ /**
+ * Constructor.
+ * @param parent The parent FoObj.
+ * @param propertyList The property list for this FoObj.
+ */
+ public FoScaled4a(final FoObj parent, final PropertyList propertyList) {
+ super(parent);
+ this.propertyList = propertyList;
+ }
+
+ /**
+ * Returns the width of the content.
+ * @param context An object that knows how to resolve FO Tree context
+ * issues.
+ * @return The width, in millipoints, of the content of this object, as
+ * reported by the content itself.
+ */
+ public abstract int intrinsicContentWidth(FoContext context);
+
+ /**
+ * Returns the height of the content.
+ * @param context An object that knows how to resolve FO Tree context
+ * issues.
+ * @return The height, in millipoints, of the content of this object, as
+ * reported by the content itself.
+ */
+ public abstract int intrinsicContentHeight(FoContext context);
+
+ @Override
+ public int viewportIpd(final FoContext context) {
+ /* See XSL-FO Standard 1.0, Section 6.6.5 and 6.6.6, Subsection
+ * "Constraints", first paragraph, for explanation of logic. */
+ final int viewportIPD = this.traitIpDimensionOpt(context);
+ if (viewportIPD != FoPropertyConstants.DIMENSION_AUTO) {
+ return viewportIPD;
+ }
+
+ /* The remaining logic is for the "auto" case.
+ * The CSS2 spec says that for replaced inline content, if
+ * width="auto", it should return the intrinsic width.
+ * See http://www.w3.org/TR/REC-CSS2/visudet.html#q5.
+ * However, the documentation on the fo:external-graphic and
+ * fo:instream-foreign-object say that the "content size" should be
+ * used, and then define it. */
+ final int intrinsicWidth = this.intrinsicContentWidth(context);
+
+ /* We already know that the viewport IPD is dependent on the
+ * content-width.
+ * If the content-width is also dependent on the viewport IPD, then we
+ * have a circular dependency. */
+ if (this.isContentWidthDependentOnPd(context)) {
+ /* We have a circular dependency. See if we can use the other
+ * dimension to compute this one. */
+ if (this.isViewportBpdDependent(context)) {
+ /* The viewport BPD is not specified either, so the user has
+ * given us absolutely nothing by which to compute the
+ * dimensions of this viewport.
+ * We punt by returning the smaller of 1) the intrinsic width,
+ * and 2) the width of the parent area. */
+ return Math.min(intrinsicWidth,
+ context.ipdAncestorBlockOrRa());
+ } else {
+ /* We can use the other dimension to compute this one. */
+ final int viewportBpd = this.viewportBpd(context);
+ final int intrinsicHeight = this.intrinsicContentWidth(context);
+ final float widthToHeight = (float) intrinsicWidth
+ / (float) intrinsicHeight;
+ return Math.round(widthToHeight * viewportBpd);
+ }
+ }
+
+ /* The content-width is not dependent on the viewport IPD, so we can
+ * compute it first, then use it to compute the viewport IPD. */
+ final float scalingFactor = this.getContentWidth(context, this);
+ return Math.round(intrinsicWidth * scalingFactor);
+ }
+
+ /**
+ * Indicates whether the viewport IPD for this graphic can be computed
+ * independent of the viewport BPD.
+ * @param context An object that knows how to resolve FO Tree context
+ * issues.
+ * @return True if and only if the viewport BPD needs to be computed before the IPD
+ * can be.
+ */
+ private boolean isViewportIpdDependent(final FoContext context) {
+ final int viewportIPD = this.traitIpDimensionOpt(context);
+ if (viewportIPD != FoPropertyConstants.DIMENSION_AUTO) {
+ return false;
+ }
+ if (this.isContentWidthDependentOnPd(context)) {
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ public int viewportBpd(final FoContext context) {
+ /* See XSL-FO Standard 1.0, Section 6.6.5 and 6.6.6, Subsection
+ * "Constraints", first paragraph, for explanation of logic. */
+ final int viewportBPD = this.traitBpDimensionOpt(context);
+ if (viewportBPD != FoPropertyConstants.DIMENSION_AUTO) {
+ return viewportBPD;
+ }
+
+ /* The remaining logic is for the "auto" case.
+ * The CSS2 spec says that for replaced inline content, if
+ * height="auto", it should return the intrinsic height.
+ * See http://www.w3.org/TR/REC-CSS2/visudet.html#q16.
+ * However, the documentation on the fo:external-graphic and
+ * fo:instream-foreign-object say that the "content size" should be
+ * used, and then define it. */
+ final int intrinsicHeight = this.intrinsicContentHeight(context);
+
+ /* We already know that the viewport BPD is dependent on the
+ * content-height.
+ * If the content-height is also dependent on the viewport BPD, then we
+ * have a circular dependency. */
+ if (this.isContentHeightDependentOnPd(context)) {
+ /* We have a circular dependency. See if we can use the other
+ * dimension to compute this one. */
+ if (this.isViewportIpdDependent(context)) {
+ /* The viewport IPD is not specified either, so the user has
+ * given us absolutely nothing by which to compute the
+ * dimensions of this viewport.
+ * We punt by returning the smaller of 1) the intrinsic height,
+ * and 2) the height of the parent area. */
+ return Math.min(intrinsicHeight,
+ context.bpdAncestorBlockOrRa());
+ } else {
+ /* We can use the other dimension to compute this one. */
+ final int viewportIpd = this.viewportIpd(context);
+ final int intrinsicWidth = this.intrinsicContentWidth(context);
+ final float heightToWidth = (float) intrinsicHeight
+ / (float) intrinsicWidth;
+ return Math.round(heightToWidth * viewportIpd);
+ }
+ }
+
+ /* The content-height is not dependent on the viewport BPD, so we can
+ * compute it first, then use it to compute the viewport BPD. */
+ final float scalingFactor = this.getContentHeight(context, this);
+ return Math.round(this.intrinsicContentHeight(context) * scalingFactor);
+ }
+
+ /**
+ * Indicates whether the viewport BPD for this graphic can be computed
+ * independent of the viewport IPD.
+ * @param context An object that knows how to resolve FO Tree context
+ * issues.
+ * @return True if and only if the viewport IPD needs to be computed before the BPD
+ * can be.
+ */
+ private boolean isViewportBpdDependent(final FoContext context) {
+ final int viewportBPD = this.traitBpDimensionOpt(context);
+ if (viewportBPD != FoPropertyConstants.DIMENSION_AUTO) {
+ return false;
+ }
+ if (this.isContentHeightDependentOnPd(context)) {
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Converts a quantity of pixels to a length in millipoints, using the
+ * value passed in pixelsPerInch.
+ * @param pixels The quantity of pixels to be converted to millipoints.
+ * @param pixelsPerInch The resolution, in pixels-per-inch, at which the
+ * conversion should take place.
+ * @return The millipoint equivalent of pixels.
+ */
+ public static int pixelsToMillipoints(final int pixels,
+ final int pixelsPerInch) {
+ return pixels * WellKnownConstants.POINTS_PER_INCH
+ * WellKnownConstants.MILLIUNITS_PER_UNIT / pixelsPerInch;
+ }
+
+ @Override
+ public int referenceIpd(final FoContext context) {
+ final int intrinsicWidth = this.intrinsicContentWidth(context);
+ final float scaling = this.getContentWidth(context, this);
+ return Math.round(intrinsicWidth * scaling);
+ }
+
+ @Override
+ public int referenceBpd(final FoContext context) {
+ final int intrinsicHeight = this.intrinsicContentHeight(context);
+ final float scaling = this.getContentHeight(context, this);
+ return Math.round(intrinsicHeight * scaling);
+ }
+
+ @Override
+ public PropertyList getPropertyList() {
+ return this.propertyList;
+ }
+
+}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/InstreamForeignObject4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/InstreamForeignObject4a.java 2021-12-21 19:37:33 UTC (rev 12257)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/InstreamForeignObject4a.java 2021-12-21 19:43:22 UTC (rev 12258)
@@ -29,7 +29,6 @@
package org.foray.fotree.fo.obj;
import org.foray.fotree.FoObj;
-import org.foray.fotree.FoObjScaled;
import org.foray.fotree.ForeignXml;
import org.foray.fotree.Namespace;
import org.foray.fotree.PropertyList;
@@ -47,7 +46,7 @@
/**
* An "instream-foreign-object" object in XSL-FO.
*/
-public class InstreamForeignObject4a extends FoObjScaled implements InstreamForeignObject {
+public class InstreamForeignObject4a extends FoScaled4a implements InstreamForeignObject {
/** The parent of this node. */
private FoObj parent;
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/AbstractContentDimension.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/AbstractContentDimension.java 2021-12-21 19:37:33 UTC (rev 12257)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/AbstractContentDimension.java 2021-12-21 19:43:22 UTC (rev 12258)
@@ -30,10 +30,10 @@
import org.foray.common.WellKnownConstants;
import org.foray.fotree.FoObj;
-import org.foray.fotree.FoObjScaled;
import org.foray.fotree.PropertyException;
import org.foray.fotree.fo.AbstractFoProperty;
import org.foray.fotree.fo.FoValue;
+import org.foray.fotree.fo.obj.FoScaled4a;
import org.foray.fotree.value.PropertyValue;
import org.axsl.fotree.FoContext;
@@ -104,7 +104,7 @@
* @return The scaling factor implied or stated by this property.
*/
public float getValue(final FoContext context, final FoObj fobj,
- final FoObjScaled fobjScaled) {
+ final FoScaled4a fobjScaled) {
if (value().canEvalKeyword()) {
final FoValue keyword = this.convertValueToFoValue(value());
switch (keyword) {
@@ -159,7 +159,7 @@
* @param context An object that knows how to resolve FO Tree context
* issues.
* @return True if the IPD or BPD must be known in order to for
- * {@link #getValue(FoContext, FoObj, FoObjScaled)} to return a useful
+ * {@link #getValue(FoContext, FoObj, FoScaled4a)} to return a useful
* amount.
*/
public boolean dependsOnPd(final FoObj fobj, final FoContext context) {
@@ -213,7 +213,7 @@
* value.
* @return The inherited scaling factor.
*/
- protected abstract float getInheritedValue(FoContext context, FoObjScaled fobjScaled, FoObj parent);
+ protected abstract float getInheritedValue(FoContext context, FoScaled4a fobjScaled, FoObj parent);
/**
* Returns either the intrinsic height or intrinsic width of the graphic,
@@ -225,7 +225,7 @@
* @return The intrinsic dimension of the graphic on the axis being computed
* (height for content-height, width for content-width).
*/
- protected abstract int intrinsicContentDimension(FoObjScaled fobjScaled,
+ protected abstract int intrinsicContentDimension(FoScaled4a fobjScaled,
FoContext context);
/**
@@ -238,7 +238,7 @@
* @return The intrinsic dimension of the graphic on the axis being computed
* (height for content-height, width for content-width).
*/
- protected abstract int viewportDimension(FoObjScaled fobjScaled,
+ protected abstract int viewportDimension(FoScaled4a fobjScaled,
FoContext context);
/**
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdContentHeight.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdContentHeight.java 2021-12-21 19:37:33 UTC (rev 12257)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdContentHeight.java 2021-12-21 19:43:22 UTC (rev 12258)
@@ -29,9 +29,9 @@
package org.foray.fotree.fo.prop;
import org.foray.fotree.FoObj;
-import org.foray.fotree.FoObjScaled;
import org.foray.fotree.PropertyException;
import org.foray.fotree.fo.FoProperty;
+import org.foray.fotree.fo.obj.FoScaled4a;
import org.axsl.fotree.FoContext;
@@ -62,18 +62,18 @@
@Override
protected float getInheritedValue(final FoContext context,
- final FoObjScaled fobjScaled, final FoObj parent) {
+ final FoScaled4a fobjScaled, final FoObj parent) {
return parent.getContentHeight(context, fobjScaled);
}
@Override
- protected int intrinsicContentDimension(final FoObjScaled fobjScaled,
+ protected int intrinsicContentDimension(final FoScaled4a fobjScaled,
final FoContext context) {
return fobjScaled.intrinsicContentHeight(context);
}
@Override
- protected int viewportDimension(final FoObjScaled fobjScaled,
+ protected int viewportDimension(final FoScaled4a fobjScaled,
final FoContext context) {
return fobjScaled.viewportBpd(context);
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdContentWidth.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdContentWidth.java 2021-12-21 19:37:33 UTC (rev 12257)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/prop/PdContentWidth.java 2021-12-21 19:43:22 UTC (rev 12258)
@@ -29,9 +29,9 @@
package org.foray.fotree.fo.prop;
import org.foray.fotree.FoObj;
-import org.foray.fotree.FoObjScaled;
import org.foray.fotree.PropertyException;
import org.foray.fotree.fo.FoProperty;
+import org.foray.fotree.fo.obj.FoScaled4a;
import org.axsl.fotree.FoContext;
@@ -62,18 +62,18 @@
@Override
protected float getInheritedValue(final FoContext context,
- final FoObjScaled fobjScaled, final FoObj parent) {
+ final FoScaled4a fobjScaled, final FoObj parent) {
return parent.getContentWidth(context, fobjScaled);
}
@Override
- protected int intrinsicContentDimension(final FoObjScaled fobjScaled,
+ protected int intrinsicContentDimension(final FoScaled4a fobjScaled,
final FoContext context) {
return fobjScaled.intrinsicContentWidth(context);
}
@Override
- protected int viewportDimension(final FoObjScaled fobjScaled,
+ protected int viewportDimension(final FoScaled4a fobjScaled,
final FoContext context) {
return fobjScaled.viewportBpd(context);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|