aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/area
diff options
context:
space:
mode:
authorAdrian Cumiskey <acumiskey@apache.org>2008-07-04 14:14:58 +0000
committerAdrian Cumiskey <acumiskey@apache.org>2008-07-04 14:14:58 +0000
commitf9ab729b73deb6299ad6e04949c0be5a37cade76 (patch)
tree6e5c59c4ca071feb7f490ebc0b4b35629d570698 /src/java/org/apache/fop/area
parent2c718ed03a60e086aba4c61dd6fa0268819fb5b5 (diff)
downloadxmlgraphics-fop-f9ab729b73deb6299ad6e04949c0be5a37cade76.tar.gz
xmlgraphics-fop-f9ab729b73deb6299ad6e04949c0be5a37cade76.zip
Merged revisions 674065 via svnmerge from
https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk ........ r674065 | acumiskey | 2008-07-04 15:12:37 +0100 (Fri, 04 Jul 2008) | 2 lines Replaced conditional with a switch and capitalized method javadoc description. ........ git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AFPGOCAResources@674066 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/area')
-rw-r--r--src/java/org/apache/fop/area/Page.java23
1 files changed, 12 insertions, 11 deletions
diff --git a/src/java/org/apache/fop/area/Page.java b/src/java/org/apache/fop/area/Page.java
index 94a394014..ddc2a95ab 100644
--- a/src/java/org/apache/fop/area/Page.java
+++ b/src/java/org/apache/fop/area/Page.java
@@ -209,27 +209,28 @@ public class Page extends AreaTreeObject implements Serializable, Cloneable {
/**
* Get the region from this page.
*
- * @param areaclass the region area class
+ * @param areaClass the region area class
* @return the region viewport or null if none
*/
- public RegionViewport getRegionViewport(int areaclass) {
- if (areaclass == Constants.FO_REGION_BEFORE) {
+ public RegionViewport getRegionViewport(int areaClass) {
+ switch (areaClass) {
+ case Constants.FO_REGION_BEFORE:
return regionBefore;
- } else if (areaclass == Constants.FO_REGION_START) {
+ case Constants.FO_REGION_START:
return regionStart;
- } else if (areaclass == Constants.FO_REGION_BODY) {
- return regionBody;
- } else if (areaclass == Constants.FO_REGION_END) {
+ case Constants.FO_REGION_BODY:
+ return regionBody;
+ case Constants.FO_REGION_END:
return regionEnd;
- } else if (areaclass == Constants.FO_REGION_AFTER) {
+ case Constants.FO_REGION_AFTER:
return regionAfter;
+ default:
+ throw new IllegalArgumentException("No such area class with ID = " + areaClass);
}
- throw new IllegalArgumentException("No such area class with ID = "
- + areaclass);
}
/**
- * indicates whether any FOs have been added to the body region
+ * Indicates whether any FOs have been added to the body region
*
* @return whether any FOs have been added to the body region
*/