You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by pb...@apache.org on 2002/09/18 07:46:56 UTC
cvs commit: xml-fop/src/org/apache/fop/datatypes FromNearestSpecified.java
pbwest 2002/09/17 22:46:56
Modified: src/org/apache/fop/datatypes Tag: FOP_0-20-0_Alt-Design
FromNearestSpecified.java
Log:
Added resolve() method.
Revision Changes Path
No revision
No revision
1.1.2.6 +21 -3 xml-fop/src/org/apache/fop/datatypes/Attic/FromNearestSpecified.java
Index: FromNearestSpecified.java
===================================================================
RCS file: /home/cvs/xml-fop/src/org/apache/fop/datatypes/Attic/FromNearestSpecified.java,v
retrieving revision 1.1.2.5
retrieving revision 1.1.2.6
diff -u -r1.1.2.5 -r1.1.2.6
--- FromNearestSpecified.java 15 Sep 2002 05:50:05 -0000 1.1.2.5
+++ FromNearestSpecified.java 18 Sep 2002 05:46:55 -0000 1.1.2.6
@@ -4,6 +4,7 @@
import org.apache.fop.fo.expr.PropertyValue;
import org.apache.fop.fo.expr.PropertyException;
import org.apache.fop.fo.Properties;
+import org.apache.fop.fo.FONode;
/*
* $Id$
@@ -75,6 +76,23 @@
throws PropertyException
{
super(propertyName, PropertyValue.FROM_NEAREST_SPECIFIED);
+ }
+
+ /**
+ * Attempt to resolve this object into a "real" property value. If the
+ * object has no <i>inheritedTriplet</i>, obtain and set one. The
+ * obtained triplet is from the nearest ancestor node on which a value
+ * has been specified.
+ * Then invoke the superclass' <i>resolve()</i> method.
+ * @param node - the <tt>FONode</tt> with which this object is associated.
+ * @return the resulting <tt>PropertyValue</tt>. Either a resolved value
+ * or <i>this</i>, if bequeathing triplet has no resolved computed value.
+ */
+ public PropertyValue resolve(FONode node) throws PropertyException {
+ if (inheritedValue == null) {
+ inheritedValue = node.getNearestSpecifiedTriplet(sourceProperty);
+ }
+ return super.resolve(node);
}
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-cvs-help@xml.apache.org