import java.util.List;
/**
- * base class for representation of mixed content formatting objects
+ * Base class for representation of mixed content formatting objects
* and their processing
*/
public class FObjMixed extends FObj {
+ /** TextInfo for this object */
protected TextInfo textInfo = null;
+ /** FontInfo for this object */
protected FontInfo fontInfo = null;
+ /**
+ * @param parent FONode that is the parent of this object
+ */
public FObjMixed(FONode parent) {
super(parent);
}
+ /**
+ * @param st StructureHandler to set
+ */
public void setStructHandler(StructureHandler st) {
super.setStructHandler(st);
fontInfo = st.getFontInfo();
}
+ /**
+ * @param lms the list to which the layout manager(s) should be added
+ */
public void addLayoutManager(List lms) {
if (children != null) {
InlineStackingLayoutManager lm;
}
}
+ /**
+ * @param data array of characters containing text to be added
+ * @param start starting array element to add
+ * @param length number of characters to add
+ */
protected void addCharacters(char data[], int start, int length) {
if (textInfo == null) {
- // Really only need one of these, but need to get fontInfo
- // stored in propMgr for later use.
- propMgr.setFontInfo(fontInfo);
- textInfo = propMgr.getTextLayoutProps(fontInfo);
+ // Really only need one of these, but need to get fontInfo
+ // stored in propMgr for later use.
+ propMgr.setFontInfo(fontInfo);
+ textInfo = propMgr.getTextLayoutProps(fontInfo);
}
FOText ft = new FOText(data, start, length, textInfo, this);
addChild(ft);
}
- public void setup() {
+ private void setup() {
if (this.properties != null) {
setupID();
}
}
+ /**
+ * @return iterator for this object
+ */
public CharIterator charIterator() {
return new RecursiveCharIterator(this);
}
* ============================================================================
* The Apache Software License, Version 1.1
* ============================================================================
- *
+ *
* Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without modifica-
* tion, are permitted provided that the following conditions are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
- *
+ *
* 3. The end-user documentation included with the redistribution, if any, must
* include the following acknowledgment: "This product includes software
* developed by the Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself, if
* and wherever such third-party acknowledgments normally appear.
- *
+ *
* 4. The names "FOP" and "Apache Software Foundation" must not be used to
* endorse or promote products derived from this software without prior
* written permission. For written permission, please contact
* apache@apache.org.
- *
+ *
* 5. Products derived from this software may not be called "Apache", nor may
* "Apache" appear in their name, without prior written permission of the
* Apache Software Foundation.
- *
+ *
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
- *
+ *
* This software consists of voluntary contributions made by many individuals
* on behalf of the Apache Software Foundation and was originally created by
* James Tauber <jtauber@jtauber.com>. For more information on the Apache
* Software Foundation, please see <http://www.apache.org/>.
- */
+ */
package org.apache.fop.fo.flow;
// Java
import org.apache.fop.area.inline.InlineArea;
/**
- * fo:inline-container element.
+ * Class modelling the fo:inline-container object. See Sec. 6.6.8 of the XSL-FO
+ * Standard.
*/
public class InlineContainer extends FObj {
+ /**
+ * @param parent FONode that is the parent of this object
+ */
public InlineContainer(FONode parent) {
super(parent);
}
+ /**
+ * @see org.apache.fop.fo.FObj#addLayoutManager
+ */
public void addLayoutManager(List lms) {
ArrayList childList = new ArrayList();
super.addLayoutManager(childList);
lms.add(lm);
}
+ /**
+ * @see org.apache.fop.fo.FObj#handleAttrs
+ */
public void handleAttrs(Attributes attlist) throws FOPException {
super.handleAttrs(attlist);
// Common Border, Padding, and Background Properties
// this.properties.get("writing-mode");
}
+ /**
+ * @return true (InlineContainer can contain Markers)
+ */
protected boolean containsMarkers() {
return true;
}
* and id areas are maintained for later retrieval.
*/
class ICLayoutManager extends LeafNodeLayoutManager {
-
+
private List childrenLM;
ICLayoutManager(List childLM) {
* ============================================================================
* The Apache Software License, Version 1.1
* ============================================================================
- *
+ *
* Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without modifica-
* tion, are permitted provided that the following conditions are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
- *
+ *
* 3. The end-user documentation included with the redistribution, if any, must
* include the following acknowledgment: "This product includes software
* developed by the Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself, if
* and wherever such third-party acknowledgments normally appear.
- *
+ *
* 4. The names "FOP" and "Apache Software Foundation" must not be used to
* endorse or promote products derived from this software without prior
* written permission. For written permission, please contact
* apache@apache.org.
- *
+ *
* 5. Products derived from this software may not be called "Apache", nor may
* "Apache" appear in their name, without prior written permission of the
* Apache Software Foundation.
- *
+ *
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
- *
+ *
* This software consists of voluntary contributions made by many individuals
* on behalf of the Apache Software Foundation and was originally created by
* James Tauber <jtauber@jtauber.com>. For more information on the Apache
* Software Foundation, please see <http://www.apache.org/>.
- */
+ */
package org.apache.fop.fo.flow;
// Java
import org.apache.fop.util.CharUtilities;
/**
- * Implements fo:leader; main property of leader leader-pattern.
+ * Class modelling fo:leader object. See Sec. 6.6.9 of the XSL-FO Standard.
+ * The main property of fo:leader is leader-pattern.
* The following patterns are treated: rule, space, dots and use-content.
*/
public class Leader extends FObjMixed {
-
+
private int ruleStyle;
private int ruleThickness;
private int leaderPattern;
private int patternWidth;
+ /** FontInfo for this object */
protected FontInfo fontInfo = null;
+ /** FontState for this object */
protected FontState fontState;
protected InlineArea leaderArea = null;
+ /**
+ * @param parent FONode that is the parent of this object
+ */
public Leader(FONode parent) {
super(parent);
}
+ /**
+ *
+ * @param list the list to which the layout manager(s) should be added
+ */
public void addLayoutManager(List list) {
LeafNodeLayoutManager lm = new LeafNodeLayoutManager() {
public InlineArea get(LayoutContext context) {
}
}
+ /**
+ * @param st StructureHandler to set
+ */
public void setStructHandler(StructureHandler st) {
super.setStructHandler(st);
fontInfo = st.getFontInfo();
}
- public void setup() {
+ private void setup() {
// Common Accessibility Properties
AccessibilityProps mAccProps = propMgr.getAccessibilityProps();
* ============================================================================
* The Apache Software License, Version 1.1
* ============================================================================
- *
+ *
* Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without modifica-
* tion, are permitted provided that the following conditions are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
- *
+ *
* 3. The end-user documentation included with the redistribution, if any, must
* include the following acknowledgment: "This product includes software
* developed by the Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself, if
* and wherever such third-party acknowledgments normally appear.
- *
+ *
* 4. The names "FOP" and "Apache Software Foundation" must not be used to
* endorse or promote products derived from this software without prior
* written permission. For written permission, please contact
* apache@apache.org.
- *
+ *
* 5. Products derived from this software may not be called "Apache", nor may
* "Apache" appear in their name, without prior written permission of the
* Apache Software Foundation.
- *
+ *
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
- *
+ *
* This software consists of voluntary contributions made by many individuals
* on behalf of the Apache Software Foundation and was originally created by
* James Tauber <jtauber@jtauber.com>. For more information on the Apache
* Software Foundation, please see <http://www.apache.org/>.
- */
+ */
package org.apache.fop.fo.flow;
// Java
import org.apache.fop.layout.RelativePositionProps;
import org.apache.fop.layoutmgr.list.ListBlockLayoutManager;
+/**
+ * Class modelling the fo:list-block object. See Sec. 6.8.2 of the XSL-FO
+ * Standard.
+ */
public class ListBlock extends FObj {
private int align;
private int spaceBetweenListRows = 0;
private ColorType backgroundColor;
+ /**
+ * @param parent FONode that is the parent of this object
+ */
public ListBlock(FONode parent) {
super(parent);
}
+ /**
+ *
+ * @param list the list to which the layout manager(s) should be added
+ */
public void addLayoutManager(List list) {
ListBlockLayoutManager blm = new ListBlockLayoutManager();
blm.setUserAgent(getUserAgent());
list.add(blm);
}
- public void setup() throws FOPException {
+ private void setup() throws FOPException {
// Common Accessibility Properties
AccessibilityProps mAccProps = propMgr.getAccessibilityProps();
}
+ /**
+ * @return false (ListBlock does not generate inline areas)
+ */
public boolean generatesInlineAreas() {
return false;
}
+ /**
+ * @return true (ListBlock can contain Markers)
+ */
protected boolean containsMarkers() {
return true;
}
* ============================================================================
* The Apache Software License, Version 1.1
* ============================================================================
- *
+ *
* Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without modifica-
* tion, are permitted provided that the following conditions are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
- *
+ *
* 3. The end-user documentation included with the redistribution, if any, must
* include the following acknowledgment: "This product includes software
* developed by the Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself, if
* and wherever such third-party acknowledgments normally appear.
- *
+ *
* 4. The names "FOP" and "Apache Software Foundation" must not be used to
* endorse or promote products derived from this software without prior
* written permission. For written permission, please contact
* apache@apache.org.
- *
+ *
* 5. Products derived from this software may not be called "Apache", nor may
* "Apache" appear in their name, without prior written permission of the
* Apache Software Foundation.
- *
+ *
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
- *
+ *
* This software consists of voluntary contributions made by many individuals
* on behalf of the Apache Software Foundation and was originally created by
* James Tauber <jtauber@jtauber.com>. For more information on the Apache
* Software Foundation, please see <http://www.apache.org/>.
- */
+ */
package org.apache.fop.fo.flow;
// Java
import org.apache.fop.layout.RelativePositionProps;
import org.apache.fop.layoutmgr.list.ListItemLayoutManager;
+/**
+ * Class modelling the fo:list-item object. See Sec. 6.8.3 of the XSL-FO
+ * Standard.
+ */
public class ListItem extends FObj {
-
+
private ListItemLabel label = null;
private ListItemBody body = null;
private int spaceBefore;
private int spaceAfter;
+ /**
+ * @param parent FONode that is the parent of this object
+ */
public ListItem(FONode parent) {
super(parent);
}
+ /**
+ * @param list the list to which the layout manager(s) should be added
+ */
public void addLayoutManager(List list) {
if (label != null && body != null) {
ListItemLayoutManager blm = new ListItemLayoutManager();
}
}
- public void setup() {
+ private void setup() {
// Common Accessibility Properties
AccessibilityProps mAccProps = propMgr.getAccessibilityProps();
}
+ /**
+ * Overridden from FObj
+ * @param child the child object to be added
+ */
public void addChild(FONode child) {
if ("fo:list-item-label".equals(child.getName())) {
label = (ListItemLabel)child;
}
}
+ /**
+ * @return false (ListItem cannot generate inline areas)
+ */
public boolean generatesInlineAreas() {
return false;
}
+ /**
+ * @return true (ListItem can contain Markers)
+ */
protected boolean containsMarkers() {
return true;
}
* ============================================================================
* The Apache Software License, Version 1.1
* ============================================================================
- *
+ *
* Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without modifica-
* tion, are permitted provided that the following conditions are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
- *
+ *
* 3. The end-user documentation included with the redistribution, if any, must
* include the following acknowledgment: "This product includes software
* developed by the Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself, if
* and wherever such third-party acknowledgments normally appear.
- *
+ *
* 4. The names "FOP" and "Apache Software Foundation" must not be used to
* endorse or promote products derived from this software without prior
* written permission. For written permission, please contact
* apache@apache.org.
- *
+ *
* 5. Products derived from this software may not be called "Apache", nor may
* "Apache" appear in their name, without prior written permission of the
* Apache Software Foundation.
- *
+ *
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
- *
+ *
* This software consists of voluntary contributions made by many individuals
* on behalf of the Apache Software Foundation and was originally created by
* James Tauber <jtauber@jtauber.com>. For more information on the Apache
* Software Foundation, please see <http://www.apache.org/>.
- */
+ */
package org.apache.fop.fo.flow;
// FOP
import org.apache.fop.layout.AccessibilityProps;
import org.apache.fop.layoutmgr.list.Item;
+/**
+ * Class modelling the fo:list-item-body object. See Sec. 6.8.4 of the XSL-FO
+ * Standard.
+ */
public class ListItemBody extends FObj {
+ /**
+ * @param parent FONode that is the parent of this object
+ */
public ListItemBody(FONode parent) {
super(parent);
}
+ /**
+ * @return Item layout manager
+ */
public Item getItemLayoutManager() {
Item item = new Item();
item.setUserAgent(getUserAgent());
return item;
}
- public void setup() {
+ private void setup() {
// Common Accessibility Properties
AccessibilityProps mAccProps = propMgr.getAccessibilityProps();
}
+ /**
+ * @return true (ListItemBody can contain Markers)
+ */
protected boolean containsMarkers() {
return true;
}
* ============================================================================
* The Apache Software License, Version 1.1
* ============================================================================
- *
+ *
* Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without modifica-
* tion, are permitted provided that the following conditions are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
- *
+ *
* 3. The end-user documentation included with the redistribution, if any, must
* include the following acknowledgment: "This product includes software
* developed by the Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself, if
* and wherever such third-party acknowledgments normally appear.
- *
+ *
* 4. The names "FOP" and "Apache Software Foundation" must not be used to
* endorse or promote products derived from this software without prior
* written permission. For written permission, please contact
* apache@apache.org.
- *
+ *
* 5. Products derived from this software may not be called "Apache", nor may
* "Apache" appear in their name, without prior written permission of the
* Apache Software Foundation.
- *
+ *
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
- *
+ *
* This software consists of voluntary contributions made by many individuals
* on behalf of the Apache Software Foundation and was originally created by
* James Tauber <jtauber@jtauber.com>. For more information on the Apache
* Software Foundation, please see <http://www.apache.org/>.
- */
+ */
package org.apache.fop.fo.flow;
// FOP
import org.apache.fop.layout.AccessibilityProps;
import org.apache.fop.layoutmgr.list.Item;
+/**
+ * Class modelling the fo:list-item-label object. See Sec. 6.8.5 of the XSL-FO
+ * Standard.
+ */
public class ListItemLabel extends FObj {
+ /**
+ * @param parent FONode that is the parent of this object
+ */
public ListItemLabel(FONode parent) {
super(parent);
}
+ /**
+ * @return this object's Item layout manager
+ */
public Item getItemLayoutManager() {
Item itemLabel = new Item();
itemLabel.setUserAgent(getUserAgent());
return itemLabel;
}
- public void setup() {
+ private void setup() {
// Common Accessibility Properties
AccessibilityProps mAccProps = propMgr.getAccessibilityProps();
}
+ /**
+ * @return true (ListItemLabel may contain Markers)
+ */
protected boolean containsMarkers() {
return true;
}