* ============================================================================
* 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
* that are created by the fo element.
*/
public class BasicLink extends Inline {
-
+
private String link = null;
private boolean external = false;
+ /**
+ * @param parent FONode that is the parent of this object
+ */
public BasicLink(FONode parent) {
super(parent);
}
- // add start and end properties for the link
+ /**
+ * Add start and end properties for the link
+ * @see org.apache.fop.fo.FObj#addLayoutManager
+ */
public void addLayoutManager(List lms) {
setup();
InlineStackingLayoutManager lm;
}
}
- public void setup() {
+ private void setup() {
String destination;
int linkType;
}
+ /**
+ * @return true (BasicLink can contain Markers)
+ */
protected boolean containsMarkers() {
return true;
}
area = a;
}
+ /**
+ * @return true if this link is resolved
+ */
public boolean isResolved() {
return resolved;
}
* ============================================================================
* 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
*/
public class BidiOverride extends FObjMixed {
+ /**
+ * @param parent FONode that is the parent of this object
+ */
public BidiOverride(FONode parent) {
super(parent);
}
+ /**
+ * @see org.apache.fop.fo.FObj#addLayoutManager
+ */
public void addLayoutManager(List list) {
if (false) {
super.addLayoutManager(list);
}
}
- public void setup() {
+ private void setup() {
// Common Aural Properties
AuralProps mAurProps = propMgr.getAuralProps();
}
+ /**
+ * @return true (BidiOverride can contain Markers)
+ */
protected boolean containsMarkers() {
return true;
}
* reverses the inline areas (at the character level).
*/
class BidiLayoutManager extends LeafNodeLayoutManager {
-
+
private List children;
BidiLayoutManager(LeafNodeLayoutManager cLM) {
* ============================================================================
* 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
there are only a few sematic changes; mostly I just got rid of
"this." from blockArea since BlockArea is now local.
*/
+ /**
+ * Class modelling the fo:block object. See Sec. 6.5.2 of the XSL-FO Standard.
+ */
public class Block extends FObjMixed {
private int align;
*/
private FONode firstInlineChild = null;
+ /**
+ * @param parent FONode that is the parent of this object
+ */
public Block(FONode parent) {
super(parent);
}
+ /**
+ * @see org.apache.fop.fo.FObj#handleAttrs
+ */
public void handleAttrs(Attributes attlist) throws FOPException {
super.handleAttrs(attlist);
this.span = this.properties.get("span").getEnum();
structHandler.startBlock(this);
}
- public void setup() {
+ private void setup() {
// Common Accessibility Properties
AccessibilityProps mAccProps = propMgr.getAccessibilityProps();
}
+ /**
+ * @return true (Block can contain Markers)
+ */
protected boolean containsMarkers() {
return true;
}
+ /**
+ * @return span for this Block, in millipoints (??)
+ */
public int getSpan() {
return this.span;
}
+ /**
+ * @see org.apache.fop.fo.FObj#addLayoutManager
+ */
public void addLayoutManager(List list) {
BlockLayoutManager blm = new BlockLayoutManager();
blm.setUserAgent(getUserAgent());
list.add(blm);
}
+ /**
+ * @return false (Block cannot generate inline areas)
+ */
public boolean generatesInlineAreas() {
return false;
}
+ /**
+ * @see org.apache.fop.fo.FObj#addChild
+ */
public void addChild(FONode child) {
// Handle whitespace based on values of properties
// Handle a sequence of inline-producing children in
super.addChild(child);
}
+ /**
+ * @see org.apache.fop.fo.FONode#end
+ */
public void end() {
handleWhiteSpace();
structHandler.endBlock(this);
if (bIgnore) {
charIter.remove();
} else if (bWScollapse) {
- if (bInWS || (lfTreatment == Constants.PRESERVE
+ if (bInWS || (lfTreatment == Constants.PRESERVE
&& (bPrevWasLF || lfCheck.nextIsLF()))) {
charIter.remove();
} else {
if (c == '\n') {
bNextIsLF = true;
break;
- } else if (CharUtilities.classOf(c)
+ } else if (CharUtilities.classOf(c)
!= CharUtilities.XMLWHITESPACE) {
break;
}
* ============================================================================
* 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 java.util.List;
+/**
+ * Class modelling the fo:block-container object. See Sec. 6.5.3 of the XSL-FO
+ * Standard.
+ */
public class BlockContainer extends FObj {
private ColorType backgroundColor;
private int span;
+ /**
+ * @param parent FONode that is the parent of this object
+ */
public BlockContainer(FONode parent) {
super(parent);
}
+ /**
+ * @see org.apache.fop.fo.FObj#handleAttrs
+ */
public void handleAttrs(Attributes attlist) throws FOPException {
super.handleAttrs(attlist);
this.span = this.properties.get("span").getEnum();
setupID();
}
+ /**
+ * @see org.apache.fop.fo.FObj#addLayoutManager
+ */
public void addLayoutManager(List list) {
BlockContainerLayoutManager blm = new BlockContainerLayoutManager();
blm.setUserAgent(getUserAgent());
list.add(blm);
}
- public void setup() {
+ private void setup() {
// Common Accessibility Properties
AbsolutePositionProps mAbsProps = propMgr.getAbsolutePositionProps();
}
+ /**
+ * @return true (BlockContainer can generate Reference Areas)
+ */
public boolean generatesReferenceAreas() {
return true;
}
+ /**
+ * @return false (BlockContainer cannot generate inline areas)
+ */
public boolean generatesInlineAreas() {
return false;
}
+ /**
+ * @return true (BlockContainer can contain Markers)
+ */
protected boolean containsMarkers() {
return true;
}
+ /**
+ * @return the span for this object
+ */
public int getSpan() {
return this.span;
}
* ============================================================================
* 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
*
*/
public class Character extends FObj {
-
+
+ /** constant indicating that the character is OK */
public static final int OK = 0;
+ /** constant indicating that the character does not fit */
public static final int DOESNOT_FIT = 1;
private char characterValue;
+ /**
+ * @param parent FONode that is the parent of this object
+ */
public Character(FONode parent) {
super(parent);
}
+ /**
+ * @see org.apache.fop.fo.FObj#addLayoutManager
+ */
public void addLayoutManager(List list) {
InlineArea inline = getInlineArea();
if (inline != null) {
return null;
}
- public void setup() throws FOPException {
+ private void setup() throws FOPException {
// Common Aural Properties
AuralProps mAurProps = propMgr.getAuralProps();
// this.properties.get("word-spacing");
}
+ /**
+ * @see org.apache.fop.fo.FObj#charIterator
+ */
public CharIterator charIterator() {
return new OneCharIterator(characterValue);
// But what it the character is ignored due to white space handling?