pbwest 2004/06/17 04:27:27
Modified: src/java/org/apache/fop/area Tag: FOP_0-20-0_Alt-Design
AreaFrame.java
Log:
Added getAbsoluteEdgeWidth()
Revision Changes Path
No revision
No revision
1.1.2.7 +35 -3 xml-fop/src/java/org/apache/fop/area/Attic/AreaFrame.java
Index: AreaFrame.java
===================================================================
RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/area/Attic/AreaFrame.java,v
retrieving revision 1.1.2.6
retrieving revision 1.1.2.7
diff -u -r1.1.2.6 -r1.1.2.7
--- AreaFrame.java 14 Jun 2004 11:30:02 -0000 1.1.2.6
+++ AreaFrame.java 17 Jun 2004 11:27:27 -0000 1.1.2.7
@@ -223,7 +223,7 @@
}
}
- private void setAbsoluteEdgeWidth(int edge, double width) {
+ public void setAbsoluteEdgeWidth(int edge, double width) {
switch (edge) {
case WritingMode.TOP:
setTop(width);
@@ -299,6 +299,38 @@
public void setRight(double right) {
double diff = right - (getX() - contentOffset.getX() - contents.getX());
setRect(getX(), getY(), getWidth() + diff, getHeight());
+ }
+
+ public double getAbsoluteEdgeWidth(int edge) {
+ switch (edge) {
+ case WritingMode.TOP:
+ return getTop();
+ case WritingMode.BOTTOM:
+ return getBottom();
+ case WritingMode.LEFT:
+ return getLeft();
+ case WritingMode.RIGHT:
+ return getRight();
+ default:
+ throw new RuntimeException(
+ "Invalid absolute writing mode: " + edge);
+ }
+ }
+
+ public double getTop() {
+ return contentOffset.getY();
+ }
+
+ public double getLeft() {
+ return contentOffset.getX();
+ }
+
+ public double getBottom() {
+ return getHeight() - contentOffset.getY() - contents.getHeight();
+ }
+
+ public double getRight() {
+ return getWidth() - contentOffset.getX() - contents.getWidth();
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]