diff options
author | Peter Hancock <phancock@apache.org> | 2011-09-29 10:18:53 +0000 |
---|---|---|
committer | Peter Hancock <phancock@apache.org> | 2011-09-29 10:18:53 +0000 |
commit | 5fac6eaf12691399074e5674de75d6d45e2a6584 (patch) | |
tree | f551230fe70ed6cb1e88d0e571d3927d74bbfdfd /src/java/org/apache/fop/fo/flow | |
parent | 0a4a0fdf2e28fd2f685104efcde2cde6b7b57124 (diff) | |
download | xmlgraphics-fop-5fac6eaf12691399074e5674de75d6d45e2a6584.tar.gz xmlgraphics-fop-5fac6eaf12691399074e5674de75d6d45e2a6584.zip |
Fix FO tree hierarchy: BasicLink shouldn't inherit from Inline
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1177251 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/fo/flow')
-rw-r--r-- | src/java/org/apache/fop/fo/flow/BasicLink.java | 39 |
1 files changed, 38 insertions, 1 deletions
diff --git a/src/java/org/apache/fop/fo/flow/BasicLink.java b/src/java/org/apache/fop/fo/flow/BasicLink.java index ee3171188..c3a735db6 100644 --- a/src/java/org/apache/fop/fo/flow/BasicLink.java +++ b/src/java/org/apache/fop/fo/flow/BasicLink.java @@ -22,9 +22,11 @@ package org.apache.fop.fo.flow; import org.xml.sax.Locator; import org.apache.fop.apps.FOPException; +import org.apache.fop.datatypes.Length; import org.apache.fop.fo.FONode; import org.apache.fop.fo.PropertyList; import org.apache.fop.fo.ValidationException; +import org.apache.fop.fo.properties.StructurePointerPropertySet; /** * Class modelling the <a href="http://www.w3.org/TR/xsl/#fo_basic-link"> @@ -34,9 +36,14 @@ import org.apache.fop.fo.ValidationException; * and whether that link is external (uses a URI) or internal (an id * reference). */ -public class BasicLink extends Inline { +public class BasicLink extends InlineLevel implements StructurePointerPropertySet { // The value of properties relevant for fo:basic-link. + private Length alignmentAdjust; + private int alignmentBaseline; + private Length baselineShift; + private int dominantBaseline; + private String ptr; // private ToBeImplementedProperty destinationPlacementOffset; private String externalDestination; // private ToBeImplementedProperty indicateDestination; @@ -65,6 +72,11 @@ public class BasicLink extends Inline { /** {@inheritDoc} */ public void bind(PropertyList pList) throws FOPException { super.bind(pList); + alignmentAdjust = pList.get(PR_ALIGNMENT_ADJUST).getLength(); + alignmentBaseline = pList.get(PR_ALIGNMENT_BASELINE).getEnum(); + baselineShift = pList.get(PR_BASELINE_SHIFT).getLength(); + dominantBaseline = pList.get(PR_DOMINANT_BASELINE).getEnum(); + ptr = pList.get(PR_X_PTR).getString(); // used for accessibility // destinationPlacementOffset = pList.get(PR_DESTINATION_PLACEMENT_OFFSET); externalDestination = pList.get(PR_EXTERNAL_DESTINATION).getString(); // indicateDestination = pList.get(PR_INDICATE_DESTINATION); @@ -111,6 +123,31 @@ public class BasicLink extends Inline { } } + /** @return the "alignment-adjust" property */ + public Length getAlignmentAdjust() { + return alignmentAdjust; + } + + /** @return the "alignment-baseline" property */ + public int getAlignmentBaseline() { + return alignmentBaseline; + } + + /** @return the "baseline-shift" property */ + public Length getBaselineShift() { + return baselineShift; + } + + /** @return the "dominant-baseline" property */ + public int getDominantBaseline() { + return dominantBaseline; + } + + /** {@inheritDoc} */ + public String getPtr() { + return ptr; + } + /** * Get the value of the <code>internal-destination</code> property. * |