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)
*/
- public abstract int getCorrespondingProperty(FONode foNode)
- throws PropertyException;
+ public int getCorrespondingProperty(FONode foNode)
+ throws PropertyException {
+ throw new PropertyException("Called from superclass");
+ }
+
+ /**
+ * @return
+ * @throws PropertyException
+ */
+ public boolean overridesCorresponding()
+ throws PropertyException {
+ throw new PropertyException("Called from superclass");
+ }
}
return inherited;
}
- public int getCorrespondingAbsoluteProperty(FONode foNode)
+ public int getCorrespondingProperty(FONode foNode)
throws PropertyException {
- return getCorrespondingAbsoluteStyleProperty(
+ return getCorrespondingStyleProperty(
foNode, WritingMode.AFTER);
}
- public boolean correspondingOverrides(FONode foNode) {
+ public boolean overridesCorresponding(FONode foNode) {
return false;
}
return inherited;
}
- public int getCorrespondingAbsoluteProperty(FONode foNode)
+ public int getCorrespondingProperty(FONode foNode)
throws PropertyException {
- return getCorrespondingAbsoluteStyleProperty(
+ return getCorrespondingStyleProperty(
foNode, WritingMode.BEFORE);
}
- public boolean correspondingOverrides(FONode foNode) {
+ public boolean overridesCorresponding(FONode foNode) {
return false;
}
return inherited;
}
- public int getCorrespondingRelativeProperty(FONode foNode)
+ public int getCorrespondingProperty(FONode foNode)
throws PropertyException {
- return getCorrespondingRelativeStyleProperty(
+ return getCorrespondingStyleProperty(
foNode, WritingMode.BOTTOM);
}
- public boolean correspondingOverrides(FONode foNode) {
+ public boolean overridesCorresponding(FONode foNode) {
return false;
}
* Pseudo-property class for common border style values occurring in a
* number of classes.
*/
-public class BorderCommonStyle extends AbstractCorrespondingProperty {
+public abstract class BorderCommonStyle
+extends AbstractCorrespondingProperty {
public static final int HIDDEN = 1;
public static final int DOTTED = 2;
public static final int DASHED = 3;
return rwEnums[index];
}
- public int getCorrespondingProperty(FONode foNode)
+ public boolean overridesCorresponding(FONode foNode)
throws PropertyException {
- throw new PropertyException("Called from superclass");
+ throw new PropertyException("Called within superclass");
}
-
}
*/
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;
* @author pbw
* @version $Revision$ $Name$
*/
-public class BorderCommonStyleAbsolute
-extends BorderCommonStyle
-implements AbsoluteCorrespondingProperty {
- /* (non-Javadoc)
- * @see org.apache.fop.fo.properties.AbsoluteCorrespondingProperty#getWritingMode()
- */
- public int getWritingMode(FONode foNode)
- throws PropertyException {
- PropertyValue wm = foNode.getPropertyValue(PropNames.WRITING_MODE);
- return EnumType.getEnumValue(wm);
- }
-
- public int getCorrespondingProperty(FONode foNode)
- throws PropertyException {
- return getCorrespondingRelativeProperty(foNode);
- }
- /* (non-Javadoc)
- * @see org.apache.fop.fo.properties.AbsoluteCorrespondingProperty#getCorrespondingRelativeProperty()
- */
- public int getCorrespondingRelativeProperty(FONode foNode)
- throws PropertyException {
- throw new PropertyException("Called from superclass");
- }
+public abstract class BorderCommonStyleAbsolute
+extends BorderCommonStyle {
/** Array of relative border style properties,
* indexed by relative edge constants */
* @return the relative border style property index
* @throws PropertyException
*/
- protected int getCorrespondingRelativeStyleProperty(
+ protected int getCorrespondingStyleProperty(
FONode foNode, int absoluteEdge)
throws PropertyException {
int relEdge = WritingMode.getCorrespondingRelativeEdge(
return relBorderStyleProps[relEdge];
}
- /* (non-Javadoc)
- * @see org.apache.fop.fo.properties.AbsoluteCorrespondingProperty#overridesCorresponding()
- */
- public boolean overridesCorresponding(FONode foNode) {
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.apache.fop.fo.properties.Property#isCorrespondingAbsolute()
- */
- public static boolean isCorrespondingAbsolute() {
- return true;
- }
}
*/
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;
* @author pbw
* @version $Revision$ $Name$
*/
-public class BorderCommonStyleRelative
-extends BorderCommonStyle
-implements RelativeCorrespondingProperty {
- /* (non-Javadoc)
- * @see org.apache.fop.fo.properties.RelativeCorrespondingProperty#getWritingMode(org.apache.fop.fo.FONode)
- */
- public int getWritingMode(FONode foNode)
- throws PropertyException {
- PropertyValue wm = foNode.getPropertyValue(PropNames.WRITING_MODE);
- return EnumType.getEnumValue(wm);
- }
+public abstract class BorderCommonStyleRelative
+extends BorderCommonStyle {
- public int getCorrespondingProperty(FONode foNode)
- throws PropertyException {
- return getCorrespondingAbsoluteProperty(foNode);
- }
- /* (non-Javadoc)
- * @see org.apache.fop.fo.properties.RelativeCorrespondingProperty#getCorrespondingAbsoluteProperty(org.apache.fop.fo.FONode)
- */
- public int getCorrespondingAbsoluteProperty(FONode foNode)
- throws PropertyException {
- throw new PropertyException("Called from superclass");
- }
/** Array of absolute border style properties,
* indexed by absolute edge constants */
* @return the absolute border style property index
* @throws PropertyException
*/
- protected int getCorrespondingAbsoluteStyleProperty(
+ protected int getCorrespondingStyleProperty(
FONode foNode, int relativeEdge)
throws PropertyException {
int absEdge = WritingMode.getCorrespondingAbsoluteEdge(
return absBorderStyleProps[absEdge];
}
- /* (non-Javadoc)
- * @see org.apache.fop.fo.properties.RelativeCorrespondingProperty#correspondingOverrides(org.apache.fop.fo.FONode)
- */
- public boolean correspondingOverrides(FONode foNode) {
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.apache.fop.fo.properties.Property#isCorrespondingRelative()
- */
- public static boolean isCorrespondingRelative() {
- return true;
- }
-
}
return inherited;
}
- public int getCorrespondingAbsoluteProperty(FONode foNode)
+ public int getCorrespondingProperty(FONode foNode)
throws PropertyException {
- return getCorrespondingAbsoluteStyleProperty(
+ return getCorrespondingStyleProperty(
foNode, WritingMode.END);
}
- public boolean correspondingOverrides(FONode foNode) {
+ public boolean overridesCorresponding(FONode foNode) {
return false;
}
public int getCorrespondingRelativeProperty(FONode foNode)
throws PropertyException {
- return getCorrespondingRelativeStyleProperty(
+ return getCorrespondingStyleProperty(
foNode, WritingMode.LEFT);
}
- public boolean correspondingOverrides(FONode foNode) {
+ public boolean overridesCorresponding(FONode foNode) {
return false;
}
return inherited;
}
- public int getCorrespondingRelativeProperty(FONode foNode)
+ public int getCorrespondingProperty(FONode foNode)
throws PropertyException {
- return getCorrespondingRelativeStyleProperty(
+ return getCorrespondingStyleProperty(
foNode, WritingMode.RIGHT);
}
- public boolean correspondingOverrides(FONode foNode) {
+ public boolean overridesCorresponding(FONode foNode) {
return false;
}
return inherited;
}
- public int getCorrespondingAbsoluteProperty(FONode foNode)
+ public int getCorrespondingProperty(FONode foNode)
throws PropertyException {
- return getCorrespondingAbsoluteStyleProperty(
+ return getCorrespondingStyleProperty(
foNode, WritingMode.START);
}
- public boolean correspondingOverrides(FONode foNode) {
+ public boolean overridesCorresponding(FONode foNode) {
return false;
}
return inherited;
}
- public int getCorrespondingRelativeProperty(FONode foNode)
+ public int getCorrespondingProperty(FONode foNode)
throws PropertyException {
- return getCorrespondingRelativeStyleProperty(
+ return getCorrespondingStyleProperty(
foNode, WritingMode.TOP);
}
- public boolean correspondingOverrides(FONode foNode) {
+ public boolean overridesCorresponding(FONode foNode) {
return false;
}
throws PropertyException;
public int getCorrespondingProperty(FONode foNode)
throws PropertyException;
+ public boolean overridesCorresponding(FONode foNode)
+ throws PropertyException;
}