gmazza 2003/07/16 21:52:38
Modified: src/java/org/apache/fop/fo FOElementMapping.java
StructureHandler.java
src/java/org/apache/fop/fo/pagination PageSequence.java
src/java/org/apache/fop/layoutmgr LayoutHandler.java
PageLayoutManager.java
src/java/org/apache/fop/mif MIFHandler.java
src/java/org/apache/fop/rtf/renderer RTFHandler.java
Added: src/java/org/apache/fop/fo/pagination ColorProfile.java
Declarations.java Flow.java StaticContent.java
Title.java
Removed: src/java/org/apache/fop/fo ColorProfile.java
Declarations.java Title.java
src/java/org/apache/fop/fo/flow Flow.java StaticContent.java
Log:
Inter-package references between fo.flow and fo.pagination removed by moving Flow
and StaticContent classes to pagination package.
Pagination.PageSequence and .Root children Title, Declarations, and ColorProfile
also moved under pagination.
Rationale given here: http://marc.theaimsgroup.com/?l=fop-dev&m=105813290817472&w=2
Revision Changes Path
1.3 +5 -5 xml-fop/src/java/org/apache/fop/fo/FOElementMapping.java
Index: FOElementMapping.java
===================================================================
RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/FOElementMapping.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- FOElementMapping.java 12 Jul 2003 21:22:03 -0000 1.2
+++ FOElementMapping.java 17 Jul 2003 04:52:34 -0000 1.3
@@ -160,13 +160,13 @@
static class Dec extends ElementMapping.Maker {
public FONode make(FONode parent) {
- return new Declarations(parent);
+ return new org.apache.fop.fo.pagination.Declarations(parent);
}
}
static class CP extends ElementMapping.Maker {
public FONode make(FONode parent) {
- return new ColorProfile(parent);
+ return new org.apache.fop.fo.pagination.ColorProfile(parent);
}
}
@@ -250,19 +250,19 @@
static class Fl extends ElementMapping.Maker {
public FONode make(FONode parent) {
- return new org.apache.fop.fo.flow.Flow(parent);
+ return new org.apache.fop.fo.pagination.Flow(parent);
}
}
static class SC extends ElementMapping.Maker {
public FONode make(FONode parent) {
- return new org.apache.fop.fo.flow.StaticContent(parent);
+ return new org.apache.fop.fo.pagination.StaticContent(parent);
}
}
static class T extends ElementMapping.Maker {
public FONode make(FONode parent) {
- return new Title(parent);
+ return new org.apache.fop.fo.pagination.Title(parent);
}
}
1.2 +2 -2 xml-fop/src/java/org/apache/fop/fo/StructureHandler.java
Index: StructureHandler.java
===================================================================
RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/StructureHandler.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- StructureHandler.java 29 Jun 2003 19:34:33 -0000 1.1
+++ StructureHandler.java 17 Jul 2003 04:52:34 -0000 1.2
@@ -61,7 +61,6 @@
import org.apache.fop.apps.FOPException;
import org.apache.fop.fo.flow.Block;
import org.apache.fop.fo.flow.ExternalGraphic;
-import org.apache.fop.fo.flow.Flow;
import org.apache.fop.fo.flow.InstreamForeignObject;
import org.apache.fop.fo.flow.Leader;
import org.apache.fop.fo.flow.ListBlock;
@@ -70,6 +69,7 @@
import org.apache.fop.fo.flow.TableBody;
import org.apache.fop.fo.flow.TableCell;
import org.apache.fop.fo.flow.TableRow;
+import org.apache.fop.fo.pagination.Flow;
import org.apache.fop.fo.pagination.PageSequence;
import org.apache.fop.layout.FontInfo;
1.5 +0 -3 xml-fop/src/java/org/apache/fop/fo/pagination/PageSequence.java
Index: PageSequence.java
===================================================================
RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/pagination/PageSequence.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- PageSequence.java 6 May 2003 07:46:05 -0000 1.4
+++ PageSequence.java 17 Jul 2003 04:52:36 -0000 1.5
@@ -53,9 +53,6 @@
// FOP
import org.apache.fop.fo.FONode;
import org.apache.fop.fo.FObj;
-import org.apache.fop.fo.Title;
-import org.apache.fop.fo.flow.Flow;
-import org.apache.fop.fo.flow.StaticContent;
import org.apache.fop.layout.PageMaster;
import org.apache.fop.area.AreaTree;
import org.apache.fop.area.PageViewport;
1.1 xml-fop/src/java/org/apache/fop/fo/pagination/ColorProfile.java
Index: ColorProfile.java
===================================================================
/*
* $Id: ColorProfile.java,v 1.1 2003/07/17 04:52:35 gmazza Exp $
* ============================================================================
* 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
* [EMAIL PROTECTED]
*
* 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
* APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
* DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (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 <[EMAIL PROTECTED]>. For more information on the Apache
* Software Foundation, please see <http://www.apache.org/>.
*/
package org.apache.fop.fo.pagination;
// Java
import java.awt.color.ICC_Profile;
import java.awt.color.ICC_ColorSpace;
import java.net.URL;
import java.io.IOException;
import java.io.InputStream;
// FOP
import org.apache.fop.datatypes.ColorType;
import org.apache.fop.fo.FONode;
import org.apache.fop.fo.FObj;
/**
* The fo:color-profile formatting object.
* This loads the color profile when needed and resolves a requested color.
*/
public class ColorProfile extends FObj {
private int intent;
private String src;
private String profileName;
private ICC_ColorSpace colorSpace = null;
/**
* @see org.apache.fop.fo.FONode#FONode(FONode)
*/
public ColorProfile(FONode parent) {
super(parent);
}
public void end() {
src = this.properties.get("src").getString();
profileName = this.properties.get("color-profile-name").getString();
intent = this.properties.get("rendering-intent").getEnum();
this.properties = null;
}
/**
* Get the name of this color profile.
*/
public String getProfileName() {
return profileName;
}
/**
* Get the color specified with the color values from the color profile.
* The default values are used if the profile could not be loaded
* or the value is not found.
*/
public ColorType getColor(int[] colorVals, int defR, int defG, int defB) {
// float[] rgbvals = colorSpace.toRGB(colorVals);
// return new ColorType(rgbvals);
return null;
}
/**
* Load the color profile.
*/
private void load() {
try {
URL url = new URL(src);
InputStream is = url.openStream();
ICC_Profile iccProfile = ICC_Profile.getInstance(is);
colorSpace = new ICC_ColorSpace(iccProfile);
} catch (IOException ioe) {
getLogger().error("Could not read Color Profile src", ioe);
} catch (IllegalArgumentException iae) {
getLogger().error("Color Profile src not an ICC Profile", iae);
}
}
}
1.1 xml-fop/src/java/org/apache/fop/fo/pagination/Declarations.java
Index: Declarations.java
===================================================================
/*
* $Id: Declarations.java,v 1.1 2003/07/17 04:52:36 gmazza Exp $
* ============================================================================
* 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
* [EMAIL PROTECTED]
*
* 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
* APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
* DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (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 <[EMAIL PROTECTED]>. For more information on the Apache
* Software Foundation, please see <http://www.apache.org/>.
*/
package org.apache.fop.fo.pagination;
// Java
import java.util.List;
import java.util.Map;
import java.util.Iterator;
// FOP
import org.apache.fop.fo.FONode;
import org.apache.fop.fo.FObj;
import org.apache.fop.fo.XMLObj;
/**
* Declarations formatting object.
* A declarations formatting object holds a set of color-profiles
* and optionally additional non-XSL namespace elements.
* The color-profiles are held in a hashmap for use with color-profile
* references.
*/
public class Declarations extends FObj {
private Map colorProfiles = null;
private List external = null;
public Declarations(FONode parent) {
super(parent);
}
/**
* At then end of this element sort out the child into
* a hashmap of color profiles and a list of external xml.
*/
public void end() {
for (Iterator iter = children.iterator(); iter.hasNext();) {
FONode node = (FONode)iter.next();
if (node.getName().equals("fo:color-profile")) {
ColorProfile cp = (ColorProfile)node;
if (!"".equals(cp.getProfileName())) {
if (colorProfiles == null) {
colorProfiles = new java.util.HashMap();
}
if (colorProfiles.get(cp.getProfileName()) != null) {
// duplicate names
getLogger().warn("Duplicate fo:color-profile profile name :
"
+ cp.getProfileName());
}
colorProfiles.put(cp.getProfileName(), cp);
} else {
getLogger().warn("color-profile-name required for color
profile");
}
} else if (node instanceof XMLObj) {
if (external == null) {
external = new java.util.ArrayList();
}
external.add(node);
} else {
getLogger().warn("invalid element " + node.getName() + "inside
declarations");
}
}
children = null;
}
}
1.1 xml-fop/src/java/org/apache/fop/fo/pagination/Flow.java
Index: Flow.java
===================================================================
/*
* $Id: Flow.java,v 1.1 2003/07/17 04:52:36 gmazza Exp $
* ============================================================================
* 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
* [EMAIL PROTECTED]
*
* 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
* APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
* DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (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 <[EMAIL PROTECTED]>. For more information on the Apache
* Software Foundation, please see <http://www.apache.org/>.
*/
package org.apache.fop.fo.pagination;
// Java
import java.util.ArrayList;
import java.util.List;
// XML
import org.xml.sax.Attributes;
// FOP
import org.apache.fop.fo.FONode;
import org.apache.fop.fo.FObj;
import org.apache.fop.apps.FOPException;
import org.apache.fop.layoutmgr.FlowLayoutManager;
/**
* Class modelling the fo:flow object. See Sec. 6.4.18 in the XSL-FO Standard.
*/
public class Flow extends FObj {
/**
* PageSequence container
*/
private PageSequence pageSequence;
/**
* ArrayList to store snapshot
*/
private ArrayList markerSnapshot;
/**
* flow-name attribute
*/
private String flowName;
/**
* Content-width of current column area during layout
*/
private int contentWidth;
/**
* @param parent FONode that is the parent of this object
*/
public Flow(FONode parent) {
super(parent);
}
/**
* @see org.apache.fop.fo.FObj#handleAttrs
* @param attlist Collection of attributes passed to us from the parser.
* @throws FOPException if parent is not a page-sequence object
*/
public void handleAttrs(Attributes attlist) throws FOPException {
super.handleAttrs(attlist);
if (parent.getName().equals("fo:page-sequence")) {
this.pageSequence = (PageSequence) parent;
} else {
throw new FOPException("flow must be child of "
+ "page-sequence, not " + parent.getName());
}
// according to communication from Paul Grosso (XSL-List,
// 001228, Number 406), confusion in spec section 6.4.5 about
// multiplicity of fo:flow in XSL 1.0 is cleared up - one (1)
// fo:flow per fo:page-sequence only.
/* if (pageSequence.isFlowSet()) {
if (this.name.equals("fo:flow")) {
throw new FOPException("Only a single fo:flow permitted"
+ " per fo:page-sequence");
} else {
throw new FOPException(this.name
+ " not allowed after fo:flow");
}
}
*/
setFlowName(getProperty("flow-name").getString());
// Now done in addChild of page-sequence
//pageSequence.addFlow(this);
structHandler.startFlow(this);
}
/**
* Tell the StructureRenderer that we are at the end of the flow.
*/
public void end() {
structHandler.endFlow(this);
}
/**
* @param name the name of the flow to set
* @throws FOPException for an empty name
*/
protected void setFlowName(String name) throws FOPException {
if (name == null || name.equals("")) {
throw new FOPException("A 'flow-name' is required for "
+ getName());
} else {
flowName = name;
}
}
/**
* @return the name of this flow
*/
public String getFlowName() {
return flowName;
}
/**
* @param contentWidth content width of this flow, in millipoints (??)
*/
protected void setContentWidth(int contentWidth) {
this.contentWidth = contentWidth;
}
/**
* @return the content width of this flow (really of the region
* in which it is flowing), in millipoints (??).
*/
public int getContentWidth() {
return this.contentWidth;
}
/**
* @return true (Flow can generate reference areas)
*/
public boolean generatesReferenceAreas() {
return true;
}
/**
* @see org.apache.fop.fo.FObj#addLayoutManager
*/
public void addLayoutManager(List list) {
FlowLayoutManager lm = new FlowLayoutManager();
lm.setUserAgent(getUserAgent());
lm.setFObj(this);
list.add(lm);
}
}
1.1 xml-fop/src/java/org/apache/fop/fo/pagination/StaticContent.java
Index: StaticContent.java
===================================================================
/*
* $Id: StaticContent.java,v 1.1 2003/07/17 04:52:36 gmazza Exp $
* ============================================================================
* 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
* [EMAIL PROTECTED]
*
* 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
* APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
* DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (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 <[EMAIL PROTECTED]>. For more information on the Apache
* Software Foundation, please see <http://www.apache.org/>.
*/
package org.apache.fop.fo.pagination;
// FOP
import org.apache.fop.fo.FONode;
import org.apache.fop.apps.FOPException;
import org.apache.fop.layoutmgr.StaticContentLayoutManager;
/**
* Class modelling the fo:static-content object. See Sec. 6.4.19 of the XSL-FO
* Standard.
*/
public class StaticContent extends Flow {
/**
* @param parent FONode that is the parent of this object
*/
public StaticContent(FONode parent) {
super(parent);
}
private void setup() {
}
/**
* flowname checking is more stringient for static content currently
* @param name the flow-name to set
* @throws FOPException for a missing flow name
*/
protected void setFlowName(String name) throws FOPException {
if (name == null || name.equals("")) {
throw new FOPException("A 'flow-name' is required for "
+ getName() + ".");
} else {
super.setFlowName(name);
}
}
private StaticContentLayoutManager lm;
/**
* @return this object's layout manager
*/
public StaticContentLayoutManager getLayoutManager() {
if (lm == null) {
lm = new StaticContentLayoutManager();
lm.setUserAgent(getUserAgent());
lm.setFObj(this);
}
return lm;
}
}
1.1 xml-fop/src/java/org/apache/fop/fo/pagination/Title.java
Index: Title.java
===================================================================
/*
* $Id: Title.java,v 1.1 2003/07/17 04:52:37 gmazza Exp $
* ============================================================================
* 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
* [EMAIL PROTECTED]
*
* 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
* APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
* DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (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 <[EMAIL PROTECTED]>. For more information on the Apache
* Software Foundation, please see <http://www.apache.org/>.
*/
package org.apache.fop.fo.pagination;
// FOP
import org.apache.fop.datatypes.ColorType;
import org.apache.fop.datatypes.Length;
import org.apache.fop.fo.EnumProperty;
import org.apache.fop.fo.FObjMixed;
import org.apache.fop.fo.FONode;
import org.apache.fop.fo.LengthProperty;
import org.apache.fop.fo.Property;
import org.apache.fop.layout.AccessibilityProps;
import org.apache.fop.layout.AuralProps;
import org.apache.fop.layout.BackgroundProps;
import org.apache.fop.layout.BorderAndPadding;
import org.apache.fop.layout.FontState;
import org.apache.fop.layout.MarginInlineProps;
import org.apache.fop.layoutmgr.ContentLayoutManager;
import org.apache.fop.layoutmgr.InlineStackingLayoutManager;
import org.apache.fop.layoutmgr.LMiter;
/**
* Class modelling the fo:title object. See Sec. 6.4.20 in the XSL-FO Standard.
*/
public class Title extends FObjMixed {
/**
* @param parent FONode that is the parent of this object
*/
public Title(FONode parent) {
super(parent);
}
/**
* TODO: shouldn't this code be in Layout??
* @return the Title area
*/
public org.apache.fop.area.Title getTitleArea() {
org.apache.fop.area.Title title =
new org.apache.fop.area.Title();
// use special layout manager to add the inline areas
// to the Title.
InlineStackingLayoutManager lm;
lm = new InlineStackingLayoutManager();
lm.setUserAgent(getUserAgent());
lm.setFObj(this);
lm.setLMiter(new LMiter(children.listIterator()));
lm.init();
// get breaks then add areas to title
ContentLayoutManager clm = new ContentLayoutManager(title);
clm.setUserAgent(getUserAgent());
lm.setParent(clm);
clm.fillArea(lm);
return title;
}
private void setup() {
// Common Accessibility Properties
AccessibilityProps mAccProps = propMgr.getAccessibilityProps();
// Common Aural Properties
AuralProps mAurProps = propMgr.getAuralProps();
// Common Border, Padding, and Background Properties
BorderAndPadding bap = propMgr.getBorderAndPadding();
BackgroundProps bProps = propMgr.getBackgroundProps();
// Common Font Properties
FontState fontState = propMgr.getFontState(structHandler.getFontInfo());
// Common Margin Properties-Inline
MarginInlineProps mProps = propMgr.getMarginInlineProps();
Property prop;
prop = this.properties.get("baseline-shift");
if (prop instanceof LengthProperty) {
Length bShift = prop.getLength();
} else if (prop instanceof EnumProperty) {
int bShift = prop.getEnum();
}
ColorType col = this.properties.get("color").getColorType();
Length lHeight = this.properties.get("line-height").getLength();
int lShiftAdj = this.properties.get(
"line-height-shift-adjustment").getEnum();
int vis = this.properties.get("visibility").getEnum();
Length zIndex = this.properties.get("z-index").getLength();
}
}
1.3 +5 -5 xml-fop/src/java/org/apache/fop/layoutmgr/LayoutHandler.java
Index: LayoutHandler.java
===================================================================
RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/LayoutHandler.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- LayoutHandler.java 6 Jul 2003 23:27:55 -0000 1.2
+++ LayoutHandler.java 17 Jul 2003 04:52:37 -0000 1.3
@@ -66,11 +66,7 @@
import org.apache.fop.area.Title;
import org.apache.fop.area.TreeExt;
import org.apache.fop.fo.StructureHandler;
-import org.apache.fop.fo.pagination.PageSequence;
-import org.apache.fop.layout.FontInfo;
-import org.apache.fop.render.Renderer;
import org.apache.fop.fo.flow.Block;
-import org.apache.fop.fo.flow.Flow;
import org.apache.fop.fo.flow.ExternalGraphic;
import org.apache.fop.fo.flow.InstreamForeignObject;
import org.apache.fop.fo.flow.Leader;
@@ -80,6 +76,10 @@
import org.apache.fop.fo.flow.TableBody;
import org.apache.fop.fo.flow.TableCell;
import org.apache.fop.fo.flow.TableRow;
+import org.apache.fop.fo.pagination.Flow;
+import org.apache.fop.fo.pagination.PageSequence;
+import org.apache.fop.layout.FontInfo;
+import org.apache.fop.render.Renderer;
/**
* Layout handler that receives the structure events.
1.2 +4 -4 xml-fop/src/java/org/apache/fop/layoutmgr/PageLayoutManager.java
Index: PageLayoutManager.java
===================================================================
RCS file:
/home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/PageLayoutManager.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- PageLayoutManager.java 11 Mar 2003 13:05:24 -0000 1.1
+++ PageLayoutManager.java 17 Jul 2003 04:52:37 -0000 1.2
@@ -65,13 +65,13 @@
import org.apache.fop.area.Footnote;
import org.apache.fop.area.Resolveable;
import org.apache.fop.fo.flow.Marker;
-import org.apache.fop.fo.flow.StaticContent;
+import org.apache.fop.fo.properties.Constants;
+import org.apache.fop.fo.pagination.PageNumberGenerator;
import org.apache.fop.fo.pagination.PageSequence;
import org.apache.fop.fo.pagination.Region;
-import org.apache.fop.fo.pagination.SimplePageMaster;
-import org.apache.fop.fo.pagination.PageNumberGenerator;
-import org.apache.fop.fo.properties.Constants;
import org.apache.fop.fo.properties.RetrieveBoundary;
+import org.apache.fop.fo.pagination.SimplePageMaster;
+import org.apache.fop.fo.pagination.StaticContent;
import java.util.ArrayList;
import java.util.List;
1.6 +1 -1 xml-fop/src/java/org/apache/fop/mif/MIFHandler.java
Index: MIFHandler.java
===================================================================
RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/mif/MIFHandler.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- MIFHandler.java 29 Jun 2003 19:34:34 -0000 1.5
+++ MIFHandler.java 17 Jul 2003 04:52:38 -0000 1.6
@@ -60,7 +60,7 @@
// FOP
import org.apache.fop.fo.StructureHandler;
import org.apache.fop.fo.flow.Block;
-import org.apache.fop.fo.flow.Flow;
+import org.apache.fop.fo.pagination.Flow;
import org.apache.fop.fo.pagination.PageSequence;
import org.apache.fop.fo.pagination.PageSequenceMaster;
import org.apache.fop.fo.pagination.SimplePageMaster;
1.10 +1 -1 xml-fop/src/java/org/apache/fop/rtf/renderer/RTFHandler.java
Index: RTFHandler.java
===================================================================
RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/rtf/renderer/RTFHandler.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- RTFHandler.java 5 Jul 2003 03:23:23 -0000 1.9
+++ RTFHandler.java 17 Jul 2003 04:52:38 -0000 1.10
@@ -60,7 +60,6 @@
import org.apache.fop.fo.StructureHandler;
import org.apache.fop.fo.flow.Block;
import org.apache.fop.fo.flow.ExternalGraphic;
-import org.apache.fop.fo.flow.Flow;
import org.apache.fop.fo.flow.InstreamForeignObject;
import org.apache.fop.fo.flow.Leader;
import org.apache.fop.fo.flow.ListBlock;
@@ -69,6 +68,7 @@
import org.apache.fop.fo.flow.TableBody;
import org.apache.fop.fo.flow.TableCell;
import org.apache.fop.fo.flow.TableRow;
+import org.apache.fop.fo.pagination.Flow;
import org.apache.fop.fo.pagination.PageSequence;
import org.apache.fop.fo.properties.Constants;
import org.apache.fop.layout.FontInfo;
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]