You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by ac...@apache.org on 2008/07/04 16:14:59 UTC

svn commit: r674066 - in /xmlgraphics/fop/branches/Temp_AFPGOCAResources: ./ src/java/org/apache/fop/area/Page.java

Author: acumiskey
Date: Fri Jul  4 07:14:58 2008
New Revision: 674066

URL: http://svn.apache.org/viewvc?rev=674066&view=rev
Log:
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.
........

Modified:
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/   (props changed)
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/area/Page.java

Propchange: xmlgraphics/fop/branches/Temp_AFPGOCAResources/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Fri Jul  4 07:14:58 2008
@@ -1 +1 @@
-/xmlgraphics/fop/trunk:1-674060
+/xmlgraphics/fop/trunk:1-674065

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/area/Page.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/area/Page.java?rev=674066&r1=674065&r2=674066&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/area/Page.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/area/Page.java Fri Jul  4 07:14:58 2008
@@ -209,27 +209,28 @@
     /**
      * 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
      */



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org