import org.apache.fop.datastructs.ROBitSet;
import org.apache.fop.datastructs.SyncedNode;
import org.apache.fop.datastructs.TreeException;
+import org.apache.fop.datatypes.EnumType;
import org.apache.fop.datatypes.Numeric;
import org.apache.fop.datatypes.PropertyValue;
import org.apache.fop.datatypes.PropertyValueList;
return (Numeric)fontsize;
}
+ /**
+ * Gets the <code>writing-mode</code> applying to this node.
+ * @return an enumerated constant representing the writing-mode
+ * @throws PropertyException
+ */
+ public int getWritingMode()
+ throws PropertyException {
+ PropertyValue wm = getPropertyValue(PropNames.WRITING_MODE);
+ return EnumType.getEnumValue(wm);
+ }
+
/**
* Clone the current font size.
* @return a <tt>Numeric</tt> containing the current font size
*/
package org.apache.fop.fo.properties;
-import org.apache.fop.datatypes.EnumType;
-import org.apache.fop.datatypes.PropertyValue;
import org.apache.fop.fo.FONode;
-import org.apache.fop.fo.PropNames;
import org.apache.fop.fo.expr.PropertyException;
/**
public abstract class AbstractCorrespondingProperty extends Property
implements
CorrespondingProperty {
- /* (non-Javadoc)
- * @see org.apache.fop.fo.properties.CorrespondingProperty#getWritingMode(org.apache.fop.fo.FONode)
- */
- public int getWritingMode(FONode foNode)
- throws PropertyException {
- PropertyValue wm = foNode.getPropertyValue(PropNames.WRITING_MODE);
- return EnumType.getEnumValue(wm);
- }
/* (non-Javadoc)
* @see org.apache.fop.fo.properties.CorrespondingProperty#getCorrespondingProperty(org.apache.fop.fo.FONode)
FONode foNode, int absoluteEdge)
throws PropertyException {
int relEdge = WritingMode.getCorrespondingRelativeEdge(
- getWritingMode(foNode), absoluteEdge);
+ foNode.getWritingMode(), absoluteEdge);
return relBorderStyleProps[relEdge];
}
FONode foNode, int relativeEdge)
throws PropertyException {
int absEdge = WritingMode.getCorrespondingAbsoluteEdge(
- getWritingMode(foNode), relativeEdge);
+ foNode.getWritingMode(), relativeEdge);
return absBorderStyleProps[absEdge];
}
FONode foNode, int absoluteEdge)
throws PropertyException {
int relEdge = WritingMode.getCorrespondingRelativeEdge(
- getWritingMode(foNode), absoluteEdge);
+ foNode.getWritingMode(), absoluteEdge);
return relBorderWidthProps[relEdge];
}
FONode foNode, int relativeEdge)
throws PropertyException {
int absEdge = WritingMode.getCorrespondingAbsoluteEdge(
- getWritingMode(foNode), relativeEdge);
+ foNode.getWritingMode(), relativeEdge);
return absBorderWidthProps[absEdge];
}
* @version $Revision$ $Name$
*/
public interface CorrespondingProperty {
- public int getWritingMode (FONode foNode)
- throws PropertyException;
public int getCorrespondingProperty(FONode foNode)
throws PropertyException;
}
FONode foNode, int absoluteEdge)
throws PropertyException {
int relEdge = WritingMode.getCorrespondingRelativeEdge(
- getWritingMode(foNode), absoluteEdge);
+ foNode.getWritingMode(), absoluteEdge);
return relPaddingProps[relEdge];
}
FONode foNode, int relativeEdge)
throws PropertyException {
int relEdge = WritingMode.getCorrespondingAbsoluteEdge(
- getWritingMode(foNode), relativeEdge);
+ foNode.getWritingMode(), relativeEdge);
return absPaddingProps[relEdge];
}