diff options
author | Tore Engvig <tore@apache.org> | 2001-07-30 20:29:35 +0000 |
---|---|---|
committer | Tore Engvig <tore@apache.org> | 2001-07-30 20:29:35 +0000 |
commit | e0edd215721150e6c04ac49706622d6189cb0b42 (patch) | |
tree | 6b59b872d9c0e93f99316ea2f421209b71a97755 /src/org/apache/fop/layout/PageMaster.java | |
parent | eb57915dec9bcd907e495595efac60dbf3579ad8 (diff) | |
download | xmlgraphics-fop-e0edd215721150e6c04ac49706622d6189cb0b42.tar.gz xmlgraphics-fop-e0edd215721150e6c04ac49706622d6189cb0b42.zip |
Formatted code according to code standards.
Changed license to use short license.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194380 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/org/apache/fop/layout/PageMaster.java')
-rw-r--r-- | src/org/apache/fop/layout/PageMaster.java | 64 |
1 files changed, 33 insertions, 31 deletions
diff --git a/src/org/apache/fop/layout/PageMaster.java b/src/org/apache/fop/layout/PageMaster.java index 591fb369d..7034bf238 100644 --- a/src/org/apache/fop/layout/PageMaster.java +++ b/src/org/apache/fop/layout/PageMaster.java @@ -1,16 +1,17 @@ -/* $Id$ +/* + * $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; public class PageMaster { private int width; private int height; - + private BodyRegionArea body; private RegionArea before; private RegionArea after; @@ -18,56 +19,57 @@ public class PageMaster { private RegionArea end; public PageMaster(int pageWidth, int pageHeight) { - this.width = pageWidth; - this.height = pageHeight; + this.width = pageWidth; + this.height = pageHeight; } public void addAfter(RegionArea region) { - this.after = region; + this.after = region; } public void addBefore(RegionArea region) { - this.before = region; + this.before = region; } public void addBody(BodyRegionArea region) { - this.body = region; + this.body = region; } public void addEnd(RegionArea region) { - this.end = region; + this.end = region; } - + public void addStart(RegionArea region) { - this.start = region; + this.start = region; } public int getHeight() { - return this.height; + return this.height; } public int getWidth() { - return this.width; + return this.width; } public Page makePage(AreaTree areaTree) { - Page p = new Page(areaTree, this.height, this.width); - if (this.body != null) { - p.addBody(body.makeBodyAreaContainer()); - } - if (this.before != null) { - p.addBefore(before.makeAreaContainer()); - } - if (this.after != null) { - p.addAfter(after.makeAreaContainer()); - } - if (this.start != null) { - p.addStart(start.makeAreaContainer()); - } - if (this.end != null) { - p.addEnd(end.makeAreaContainer()); - } - - return p; + Page p = new Page(areaTree, this.height, this.width); + if (this.body != null) { + p.addBody(body.makeBodyAreaContainer()); + } + if (this.before != null) { + p.addBefore(before.makeAreaContainer()); + } + if (this.after != null) { + p.addAfter(after.makeAreaContainer()); + } + if (this.start != null) { + p.addStart(start.makeAreaContainer()); + } + if (this.end != null) { + p.addEnd(end.makeAreaContainer()); + } + + return p; } + } |