pbwest 2004/04/21 20:05:47
Modified: src/java/org/apache/fop/fo/properties Tag:
FOP_0-20-0_Alt-Design CorrespondingProperty.java
BorderAfterStyle.java
BorderCommonStyleRelative.java BorderEndStyle.java
BorderTopStyle.java BorderLeftStyle.java
BorderBeforeStyle.java
BorderCommonStyleAbsolute.java
AbstractCorrespondingProperty.java
BorderStartStyle.java BorderCommonStyle.java
BorderBottomStyle.java BorderRightStyle.java
Log:
Border style corresponding properties extended
Revision Changes Path
No revision
No revision
1.1.2.2 +4 -2
xml-fop/src/java/org/apache/fop/fo/properties/Attic/CorrespondingProperty.java
Index: CorrespondingProperty.java
===================================================================
RCS file:
/home/cvs/xml-fop/src/java/org/apache/fop/fo/properties/Attic/CorrespondingProperty.java,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -r1.1.2.1 -r1.1.2.2
--- CorrespondingProperty.java 21 Apr 2004 15:21:18 -0000 1.1.2.1
+++ CorrespondingProperty.java 22 Apr 2004 03:05:47 -0000 1.1.2.2
@@ -34,4 +34,6 @@
throws PropertyException;
public int getCorrespondingProperty(FONode foNode)
throws PropertyException;
+ public boolean overridesCorresponding(FONode foNode)
+ throws PropertyException;
}
1.1.2.6 +4 -4
xml-fop/src/java/org/apache/fop/fo/properties/Attic/BorderAfterStyle.java
Index: BorderAfterStyle.java
===================================================================
RCS file:
/home/cvs/xml-fop/src/java/org/apache/fop/fo/properties/Attic/BorderAfterStyle.java,v
retrieving revision 1.1.2.5
retrieving revision 1.1.2.6
diff -u -r1.1.2.5 -r1.1.2.6
--- BorderAfterStyle.java 21 Apr 2004 15:21:18 -0000 1.1.2.5
+++ BorderAfterStyle.java 22 Apr 2004 03:05:47 -0000 1.1.2.6
@@ -51,13 +51,13 @@
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;
}
1.1.2.3 +5 -41
xml-fop/src/java/org/apache/fop/fo/properties/Attic/BorderCommonStyleRelative.java
Index: BorderCommonStyleRelative.java
===================================================================
RCS file:
/home/cvs/xml-fop/src/java/org/apache/fop/fo/properties/Attic/BorderCommonStyleRelative.java,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -u -r1.1.2.2 -r1.1.2.3
--- BorderCommonStyleRelative.java 21 Apr 2004 15:21:18 -0000 1.1.2.2
+++ BorderCommonStyleRelative.java 22 Apr 2004 03:05:47 -0000 1.1.2.3
@@ -19,8 +19,6 @@
*/
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;
@@ -32,29 +30,9 @@
* @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 */
@@ -74,26 +52,12 @@
* @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(
getWritingMode(foNode), relativeEdge);
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;
}
}
1.1.2.6 +4 -4
xml-fop/src/java/org/apache/fop/fo/properties/Attic/BorderEndStyle.java
Index: BorderEndStyle.java
===================================================================
RCS file:
/home/cvs/xml-fop/src/java/org/apache/fop/fo/properties/Attic/BorderEndStyle.java,v
retrieving revision 1.1.2.5
retrieving revision 1.1.2.6
diff -u -r1.1.2.5 -r1.1.2.6
--- BorderEndStyle.java 21 Apr 2004 15:21:18 -0000 1.1.2.5
+++ BorderEndStyle.java 22 Apr 2004 03:05:47 -0000 1.1.2.6
@@ -51,13 +51,13 @@
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;
}
1.1.2.6 +4 -4
xml-fop/src/java/org/apache/fop/fo/properties/Attic/BorderTopStyle.java
Index: BorderTopStyle.java
===================================================================
RCS file:
/home/cvs/xml-fop/src/java/org/apache/fop/fo/properties/Attic/BorderTopStyle.java,v
retrieving revision 1.1.2.5
retrieving revision 1.1.2.6
diff -u -r1.1.2.5 -r1.1.2.6
--- BorderTopStyle.java 21 Apr 2004 15:21:18 -0000 1.1.2.5
+++ BorderTopStyle.java 22 Apr 2004 03:05:47 -0000 1.1.2.6
@@ -50,13 +50,13 @@
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;
}
1.1.2.6 +3 -3
xml-fop/src/java/org/apache/fop/fo/properties/Attic/BorderLeftStyle.java
Index: BorderLeftStyle.java
===================================================================
RCS file:
/home/cvs/xml-fop/src/java/org/apache/fop/fo/properties/Attic/BorderLeftStyle.java,v
retrieving revision 1.1.2.5
retrieving revision 1.1.2.6
diff -u -r1.1.2.5 -r1.1.2.6
--- BorderLeftStyle.java 21 Apr 2004 15:21:18 -0000 1.1.2.5
+++ BorderLeftStyle.java 22 Apr 2004 03:05:47 -0000 1.1.2.6
@@ -53,11 +53,11 @@
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;
}
1.1.2.6 +4 -4
xml-fop/src/java/org/apache/fop/fo/properties/Attic/BorderBeforeStyle.java
Index: BorderBeforeStyle.java
===================================================================
RCS file:
/home/cvs/xml-fop/src/java/org/apache/fop/fo/properties/Attic/BorderBeforeStyle.java,v
retrieving revision 1.1.2.5
retrieving revision 1.1.2.6
diff -u -r1.1.2.5 -r1.1.2.6
--- BorderBeforeStyle.java 21 Apr 2004 15:21:18 -0000 1.1.2.5
+++ BorderBeforeStyle.java 22 Apr 2004 03:05:47 -0000 1.1.2.6
@@ -51,13 +51,13 @@
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;
}
1.1.2.3 +5 -41
xml-fop/src/java/org/apache/fop/fo/properties/Attic/BorderCommonStyleAbsolute.java
Index: BorderCommonStyleAbsolute.java
===================================================================
RCS file:
/home/cvs/xml-fop/src/java/org/apache/fop/fo/properties/Attic/BorderCommonStyleAbsolute.java,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -u -r1.1.2.2 -r1.1.2.3
--- BorderCommonStyleAbsolute.java 21 Apr 2004 15:21:18 -0000 1.1.2.2
+++ BorderCommonStyleAbsolute.java 22 Apr 2004 03:05:47 -0000 1.1.2.3
@@ -19,8 +19,6 @@
*/
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;
@@ -32,29 +30,8 @@
* @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 */
@@ -74,7 +51,7 @@
* @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(
@@ -82,17 +59,4 @@
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;
- }
}
1.1.2.2 +16 -4
xml-fop/src/java/org/apache/fop/fo/properties/Attic/AbstractCorrespondingProperty.java
Index: AbstractCorrespondingProperty.java
===================================================================
RCS file:
/home/cvs/xml-fop/src/java/org/apache/fop/fo/properties/Attic/AbstractCorrespondingProperty.java,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -r1.1.2.1 -r1.1.2.2
--- AbstractCorrespondingProperty.java 21 Apr 2004 15:21:18 -0000 1.1.2.1
+++ AbstractCorrespondingProperty.java 22 Apr 2004 03:05:47 -0000 1.1.2.2
@@ -40,9 +40,21 @@
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");
+ }
}
1.1.2.6 +4 -4
xml-fop/src/java/org/apache/fop/fo/properties/Attic/BorderStartStyle.java
Index: BorderStartStyle.java
===================================================================
RCS file:
/home/cvs/xml-fop/src/java/org/apache/fop/fo/properties/Attic/BorderStartStyle.java,v
retrieving revision 1.1.2.5
retrieving revision 1.1.2.6
diff -u -r1.1.2.5 -r1.1.2.6
--- BorderStartStyle.java 21 Apr 2004 15:21:18 -0000 1.1.2.5
+++ BorderStartStyle.java 22 Apr 2004 03:05:47 -0000 1.1.2.6
@@ -51,13 +51,13 @@
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;
}
1.1.2.7 +5 -5
xml-fop/src/java/org/apache/fop/fo/properties/Attic/BorderCommonStyle.java
Index: BorderCommonStyle.java
===================================================================
RCS file:
/home/cvs/xml-fop/src/java/org/apache/fop/fo/properties/Attic/BorderCommonStyle.java,v
retrieving revision 1.1.2.6
retrieving revision 1.1.2.7
diff -u -r1.1.2.6 -r1.1.2.7
--- BorderCommonStyle.java 21 Apr 2004 15:21:18 -0000 1.1.2.6
+++ BorderCommonStyle.java 22 Apr 2004 03:05:47 -0000 1.1.2.7
@@ -30,7 +30,8 @@
* 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;
@@ -79,10 +80,9 @@
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");
}
-
}
1.1.2.6 +4 -4
xml-fop/src/java/org/apache/fop/fo/properties/Attic/BorderBottomStyle.java
Index: BorderBottomStyle.java
===================================================================
RCS file:
/home/cvs/xml-fop/src/java/org/apache/fop/fo/properties/Attic/BorderBottomStyle.java,v
retrieving revision 1.1.2.5
retrieving revision 1.1.2.6
diff -u -r1.1.2.5 -r1.1.2.6
--- BorderBottomStyle.java 21 Apr 2004 15:21:18 -0000 1.1.2.5
+++ BorderBottomStyle.java 22 Apr 2004 03:05:47 -0000 1.1.2.6
@@ -51,13 +51,13 @@
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;
}
1.1.2.6 +4 -4
xml-fop/src/java/org/apache/fop/fo/properties/Attic/BorderRightStyle.java
Index: BorderRightStyle.java
===================================================================
RCS file:
/home/cvs/xml-fop/src/java/org/apache/fop/fo/properties/Attic/BorderRightStyle.java,v
retrieving revision 1.1.2.5
retrieving revision 1.1.2.6
diff -u -r1.1.2.5 -r1.1.2.6
--- BorderRightStyle.java 21 Apr 2004 15:21:18 -0000 1.1.2.5
+++ BorderRightStyle.java 22 Apr 2004 03:05:47 -0000 1.1.2.6
@@ -51,13 +51,13 @@
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;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]