PropertyList propertyList) throws FOPException {
super(parent, propertyList);
this.name = "fo:color-profile";
+
+ //this.properties.get("src");
+ //this.properties.get("color-profile-name");
+ //this.properties.get("rendering-intent");
}
}
import org.apache.fop.layout.FontState;
import org.apache.fop.layout.FontInfo;
import org.apache.fop.layout.BorderAndPadding;
+import org.apache.fop.layout.MarginProps;
+import org.apache.fop.layout.BackgroundProps;
import org.apache.fop.fo.properties.BreakAfter;
import org.apache.fop.fo.properties.BreakBefore;
import org.apache.fop.fo.properties.Constants;
}
}
+public MarginProps getMarginProps()
+{
+MarginProps props = new MarginProps();
+
+// Common Margin Properties-Block
+ props.marginTop = this.properties.get("margin-top").getLength().mvalue();
+ props.marginBottom = this.properties.get("margin-bottom").getLength().mvalue();
+ props.marginLeft = this.properties.get("margin-left").getLength().mvalue();
+ props.marginRight = this.properties.get("margin-right").getLength().mvalue();
+/*
+// need to get opt, min and max
+ props.spaceBefore = this.properties.get("space-before").getLength().mvalue();
+ props.spaceAfter = this.properties.get("space-after").getLength().mvalue();
+ props.startIndent = this.properties.get("start-indent").getLength().mvalue();
+ props.endIndent = this.properties.get("end-indent").getLength().mvalue();
+*/
+return props;
+}
+
+public BackgroundProps getBackgroundProps() {
+BackgroundProps bp = new BackgroundProps();
+return bp;
+}
+
}
-/*
-
- ============================================================================
- The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999 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
- 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 <jtauber@jtauber.com>. For more information on the Apache
- Software Foundation, please see <http://www.apache.org/>.
-
+/* $Id$
+ * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
+ * For details on use and redistribution please refer to the
+ * LICENSE file included with these sources.
*/
package org.apache.fop.fo.flow;
import org.apache.fop.fo.properties.*;
import org.apache.fop.datatypes.ColorType;
import org.apache.fop.layout.BlockArea;
-import org.apache.fop.layout.Area;
+import org.apache.fop.layout.*;
import org.apache.fop.layout.inline.InlineArea;
import org.apache.fop.fo.FObj;
import org.apache.fop.layout.FontState;
public Status layout(Area area) throws FOPException {
- BlockArea blockArea;
+ AreaContainer blockArea;
blockArea = (BlockArea) area;
boolean textDecoration;
this.properties.get("grouping-separator").getCharacter(),
this.properties.get("grouping-size").getNumber().intValue(),
this.properties.get("letter-value").getEnum()
+
);
this.forcePageCount = this.properties.get("force-page-count").getEnum();
+
+ //this.properties.get("country");
+ //this.properties.get("language");
+ //this.properties.get("id");
}
public void addFlow(Flow flow) throws FOPException {
import org.apache.fop.fo.properties.*;
import org.apache.fop.apps.FOPException;
import org.apache.fop.layout.RegionArea;
+import org.apache.fop.layout.BorderAndPadding;
+import org.apache.fop.layout.BackgroundProps;
public class RegionAfter extends Region {
int allocationRectangleYPosition,
int allocationRectangleWidth,
int allocationRectangleHeight) {
- int extent = this.properties.get("extent").getLength().mvalue();
+
+// Common Border, Padding, and Background Properties
+BorderAndPadding bap = propMgr.getBorderAndPadding();
+BackgroundProps bProps = propMgr.getBackgroundProps();
+
+ //this.properties.get("clip");
+ //this.properties.get("display-align");
+ int extent = this.properties.get("extent").getLength().mvalue();
+ //this.properties.get("overflow");
+ //this.properties.get("precedence");
+ //this.properties.get("region-name");
+ //this.properties.get("reference-orientation");
+ //this.properties.get("writing-mode");
return new RegionArea(allocationRectangleXPosition,
allocationRectangleYPosition -
*
* Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
* For details on use and redistribution please refer to the
- * LICENSE file included with these sources."
+ * LICENSE file included with these sources.
*/
package org.apache.fop.fo.pagination;
import org.apache.fop.fo.*;
import org.apache.fop.fo.properties.*;
import org.apache.fop.layout.RegionArea;
+import org.apache.fop.layout.BorderAndPadding;
+import org.apache.fop.layout.BackgroundProps;
import org.apache.fop.apps.FOPException;
public class RegionBefore extends Region {
int allocationRectangleYPosition,
int allocationRectangleWidth,
int allocationRectangleHeight) {
- int extent = this.properties.get("extent").getLength().mvalue();
+
+// Common Border, Padding, and Background Properties
+BorderAndPadding bap = propMgr.getBorderAndPadding();
+BackgroundProps bProps = propMgr.getBackgroundProps();
+
+ //this.properties.get("clip");
+ //this.properties.get("display-align");
+ int extent = this.properties.get("extent").getLength().mvalue();
+ //this.properties.get("overflow");
+ //this.properties.get("precedence");
+ //this.properties.get("region-name");
+ //this.properties.get("reference-orientation");
+ //this.properties.get("writing-mode");
return new RegionArea(allocationRectangleXPosition,
allocationRectangleYPosition,
-/*-- $Id$ --
-
- ============================================================================
- The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999 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
- 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 <jtauber@jtauber.com>. For more information on the Apache
- Software Foundation, please see <http://www.apache.org/>.
-
+/* $Id$
+ * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
+ * For details on use and redistribution please refer to the
+ * LICENSE file included with these sources.
*/
+
package org.apache.fop.fo.pagination;
// FOP
import org.apache.fop.apps.FOPException;
import org.apache.fop.layout.RegionArea;
import org.apache.fop.layout.BodyRegionArea;
+import org.apache.fop.layout.BorderAndPadding;
+import org.apache.fop.layout.BackgroundProps;
+import org.apache.fop.layout.MarginProps;
import org.apache.fop.messaging.MessageHandler;
public class RegionBody extends Region {
int allocationRectangleYPosition,
int allocationRectangleWidth,
int allocationRectangleHeight) {
- int marginTop = this.properties.get("margin-top").getLength().mvalue();
- int marginBottom = this.properties.get("margin-bottom").getLength().mvalue();
- int marginLeft = this.properties.get("margin-left").getLength().mvalue();
- int marginRight = this.properties.get("margin-right").getLength().mvalue();
+
+// Common Border, Padding, and Background Properties
+BorderAndPadding bap = propMgr.getBorderAndPadding();
+BackgroundProps bProps = propMgr.getBackgroundProps();
+
+// Common Margin Properties-Block
+MarginProps mProps = propMgr.getMarginProps();
+
+ //this.properties.get("clip");
+ //this.properties.get("display-align");
+ //this.properties.get("region-name");
+ //this.properties.get("reference-orientation");
+ //this.properties.get("writing-mode");
this.backgroundColor = this.properties.get(
"background-color").getColorType();
- BodyRegionArea body = new BodyRegionArea(allocationRectangleXPosition + marginLeft,
- allocationRectangleYPosition - marginTop,
- allocationRectangleWidth - marginLeft -
- marginRight, allocationRectangleHeight -
- marginTop - marginBottom);
+ BodyRegionArea body = new BodyRegionArea(allocationRectangleXPosition + mProps.marginLeft,
+ allocationRectangleYPosition - mProps.marginTop,
+ allocationRectangleWidth - mProps.marginLeft -
+ mProps.marginRight, allocationRectangleHeight -
+ mProps.marginTop - mProps.marginBottom);
int overflow = this.properties.get("overflow").getEnum();
String columnCountAsString = this.properties.get("column-count").getString();
import org.apache.fop.fo.*;
import org.apache.fop.fo.properties.*;
import org.apache.fop.layout.RegionArea;
+import org.apache.fop.layout.BorderAndPadding;
+import org.apache.fop.layout.BackgroundProps;
import org.apache.fop.apps.FOPException;
public class RegionEnd extends Region {
int allocationRectangleYPosition,
int allocationRectangleWidth,
int allocationRectangleHeight) {
- int extent = this.properties.get("extent").getLength().mvalue();
+
+// Common Border, Padding, and Background Properties
+BorderAndPadding bap = propMgr.getBorderAndPadding();
+BackgroundProps bProps = propMgr.getBackgroundProps();
+
+ //this.properties.get("clip");
+ //this.properties.get("display-align");
+ int extent = this.properties.get("extent").getLength().mvalue();
+ //this.properties.get("overflow");
+ //this.properties.get("region-name");
+ //this.properties.get("reference-orientation");
+ //this.properties.get("writing-mode");
+
return makeRegionArea(allocationRectangleXPosition,
allocationRectangleYPosition,
allocationRectangleWidth, extent, false, false, 0, 0);
import org.apache.fop.fo.*;
import org.apache.fop.fo.properties.*;
import org.apache.fop.layout.RegionArea;
+import org.apache.fop.layout.BorderAndPadding;
+import org.apache.fop.layout.BackgroundProps;
import org.apache.fop.apps.FOPException;
public class RegionStart extends Region {
int allocationRectangleYPosition,
int allocationRectangleWidth,
int allocationRectangleHeight) {
- int extent = this.properties.get("extent").getLength().mvalue();
+
+// Common Border, Padding, and Background Properties
+BorderAndPadding bap = propMgr.getBorderAndPadding();
+BackgroundProps bProps = propMgr.getBackgroundProps();
+
+ //this.properties.get("clip");
+ //this.properties.get("display-align");
+ int extent = this.properties.get("extent").getLength().mvalue();
+ //this.properties.get("overflow");
+ //this.properties.get("region-name");
+ //this.properties.get("reference-orientation");
+ //this.properties.get("writing-mode");
+
return makeRegionArea(allocationRectangleXPosition,
allocationRectangleYPosition,
allocationRectangleWidth, extent, false, false, 0, 0);
super(parent, propertyList);
this.name = "fo:root";
+ //this.properties.get("media-usage");
+
pageSequences = new Vector();
if (parent != null) {
/*-- $Id$ --
- *
* Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
* For details on use and redistribution please refer to the
* LICENSE file included with these sources."
import org.apache.fop.layout.PageMaster;
import org.apache.fop.layout.RegionArea;
import org.apache.fop.layout.BodyRegionArea;
+import org.apache.fop.layout.MarginProps;
import org.apache.fop.apps.FOPException;
import java.util.*;
protected void end() {
int pageWidth = this.properties.get("page-width").getLength().mvalue();
int pageHeight = this.properties.get("page-height").getLength().mvalue();
+ //this.properties.get("reference-orientation");
+ //this.properties.get("writing-mode");
- int marginTop = this.properties.get("margin-top").getLength().mvalue();
- int marginBottom = this.properties.get("margin-bottom").getLength().mvalue();
- int marginLeft = this.properties.get("margin-left").getLength().mvalue();
- int marginRight = this.properties.get("margin-right").getLength().mvalue();
+// Common Margin Properties-Block
+MarginProps mProps = propMgr.getMarginProps();
- int contentRectangleXPosition = marginLeft;
- int contentRectangleYPosition = pageHeight - marginTop;
- int contentRectangleWidth = pageWidth - marginLeft - marginRight;
- int contentRectangleHeight = pageHeight - marginTop - marginBottom;
+ int contentRectangleXPosition = mProps.marginLeft;
+ int contentRectangleYPosition = pageHeight - mProps.marginTop;
+ int contentRectangleWidth = pageWidth - mProps.marginLeft - mProps.marginRight;
+ int contentRectangleHeight = pageHeight - mProps.marginTop - mProps.marginBottom;
this.pageMaster = new PageMaster(pageWidth, pageHeight);
if (getRegion(RegionBody.REGION_CLASS) != null) {
--- /dev/null
+/* $Id$
+ * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
+ * For details on use and redistribution please refer to the
+ * LICENSE file included with these sources.
+ */
+
+package org.apache.fop.layout;
+
+/**
+ * Store all hyphenation related properties on an FO.
+ * Public "structure" allows direct member access.
+ */
+public class BackgroundProps {
+
+ public BackgroundProps() {
+ }
+}
--- /dev/null
+/* $Id$
+ * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
+ * For details on use and redistribution please refer to the
+ * LICENSE file included with these sources.
+ */
+
+package org.apache.fop.layout;
+
+/**
+ * Store all hyphenation related properties on an FO.
+ * Public "structure" allows direct member access.
+ */
+public class MarginProps {
+ public int marginTop;
+ public int marginBottom;
+ public int marginLeft;
+ public int marginRight;
+ public int spaceBefore;
+ public int spaceAfter;
+ public int startIndent;
+ public int endIndent;
+
+ public MarginProps() {
+ }
+}