jeremias 2004/12/28 05:55:14
Modified: src/java/org/apache/fop/fo/flow InstreamForeignObject.java
src/java/org/apache/fop/layoutmgr
InstreamForeignObjectLM.java
Log:
Enable border and background for instream-foreign-object.
Revision Changes Path
1.37 +7 -0
xml-fop/src/java/org/apache/fop/fo/flow/InstreamForeignObject.java
Index: InstreamForeignObject.java
===================================================================
RCS file:
/home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/InstreamForeignObject.java,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- InstreamForeignObject.java 24 Dec 2004 12:06:26 -0000 1.36
+++ InstreamForeignObject.java 28 Dec 2004 13:55:14 -0000 1.37
@@ -191,6 +191,13 @@
}
/**
+ * Return the Common Border, Padding, and Background Properties.
+ */
+ public CommonBorderPaddingBackground getCommonBorderPaddingBackground() {
+ return commonBorderPaddingBackground;
+ }
+
+ /**
* Return the "line-height" property.
*/
public Length getLineHeight() {
1.11 +18 -10
xml-fop/src/java/org/apache/fop/layoutmgr/InstreamForeignObjectLM.java
Index: InstreamForeignObjectLM.java
===================================================================
RCS file:
/home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/InstreamForeignObjectLM.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- InstreamForeignObjectLM.java 24 Nov 2004 21:07:30 -0000 1.10
+++ InstreamForeignObjectLM.java 28 Dec 2004 13:55:14 -0000 1.11
@@ -30,9 +30,10 @@
import org.apache.fop.area.inline.Viewport;
/**
- * LayoutManager for the fo:basic-link formatting object
+ * LayoutManager for the fo:instream-foreign-object formatting object
*/
public class InstreamForeignObjectLM extends LeafNodeLayoutManager {
+
private InstreamForeignObject fobj;
/**
@@ -63,7 +64,7 @@
//int h = this.propertyList.get("height").getLength().mvalue();
// use specified line-height then ignore dimension in height
direction
- boolean hasLH =
false;//propertyList.get("line-height").getSpecifiedValue() != null;
+ boolean hasLH = false;
//propertyList.get("line-height").getSpecifiedValue() != null;
Length len;
@@ -175,16 +176,23 @@
fobj.childNodes = null;
ForeignObject foreign = new ForeignObject(doc, ns);
- Viewport areaCurrent = new Viewport(foreign);
- areaCurrent.setIPD(ipd);
- areaCurrent.setBPD(bpd);
- areaCurrent.setContentPosition(placement);
- areaCurrent.setClip(clip);
- areaCurrent.setOffset(0);
+ Viewport vp = new Viewport(foreign);
+ vp.setIPD(ipd);
+ vp.setBPD(bpd);
+ vp.setContentPosition(placement);
+ vp.setClip(clip);
+ vp.setOffset(0);
+
+ // Common Border, Padding, and Background Properties
+ TraitSetter.addBorders(vp, fobj.getCommonBorderPaddingBackground());
+ TraitSetter.addBackground(vp,
fobj.getCommonBorderPaddingBackground());
- return areaCurrent;
+ return vp;
}
+ /**
+ * @see org.apache.fop.layoutmgr.LeafNodeLayoutManager#addId()
+ */
protected void addId() {
addID(fobj.getId());
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]