xmlgraphics-fop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vhenneb...@apache.org
Subject svn commit: r1081822 - in /xmlgraphics/fop/trunk: src/java/org/apache/fop/area/ src/java/org/apache/fop/area/inline/ src/java/org/apache/fop/layoutmgr/ src/java/org/apache/fop/layoutmgr/inline/ src/java/org/apache/fop/render/ src/java/org/apache/fop/re...
Date Tue, 15 Mar 2011 15:56:02 GMT
Author: vhennebert
Date: Tue Mar 15 15:56:01 2011
New Revision: 1081822

URL: http://svn.apache.org/viewvc?rev=1081822&view=rev
Log:
Renamed Viewport into InlineViewport
Added {@inheritDoc} comments to make Checkstyle happy

Added:
    xmlgraphics/fop/trunk/src/java/org/apache/fop/area/inline/InlineViewport.java
      - copied, changed from r1081554, xmlgraphics/fop/trunk/src/java/org/apache/fop/area/inline/Viewport.java
Removed:
    xmlgraphics/fop/trunk/src/java/org/apache/fop/area/inline/Viewport.java
Modified:
    xmlgraphics/fop/trunk/src/java/org/apache/fop/area/AreaTreeParser.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/area/BlockViewport.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/area/RegionViewport.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/area/inline/FilledArea.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/ExternalDocumentLayoutManager.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/AbstractGraphicsLayoutManager.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/AbstractPathOrientedRenderer.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/AbstractRenderer.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFRenderer.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/xml/XMLRenderer.java
    xmlgraphics/fop/trunk/test/java/org/apache/fop/area/inline/InlineViewportTestCase.java

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/area/AreaTreeParser.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/area/AreaTreeParser.java?rev=1081822&r1=1081821&r2=1081822&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/area/AreaTreeParser.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/area/AreaTreeParser.java Tue Mar 15 15:56:01
2011
@@ -73,7 +73,7 @@ import org.apache.fop.area.inline.Leader
 import org.apache.fop.area.inline.Space;
 import org.apache.fop.area.inline.SpaceArea;
 import org.apache.fop.area.inline.TextArea;
-import org.apache.fop.area.inline.Viewport;
+import org.apache.fop.area.inline.InlineViewport;
 import org.apache.fop.area.inline.WordArea;
 import org.apache.fop.fo.ElementMappingRegistry;
 import org.apache.fop.fo.expr.PropertyException;
@@ -217,7 +217,7 @@ public class AreaTreeParser {
             makers.put("word", new WordMaker());
             makers.put("space", new SpaceMaker());
             makers.put("leader", new LeaderMaker());
-            makers.put("viewport", new ViewportMaker());
+            makers.put("viewport", new InlineViewportMaker());
             makers.put("image", new ImageMaker());
             makers.put("foreignObject", new ForeignObjectMaker());
             makers.put("bookmarkTree", new BookmarkTreeMaker());
@@ -265,8 +265,8 @@ public class AreaTreeParser {
             return (AbstractTextArea)findAreaType(AbstractTextArea.class);
         }
 
-        private Viewport getCurrentViewport() {
-            return (Viewport)findAreaType(Viewport.class);
+        private InlineViewport getCurrentViewport() {
+            return (InlineViewport)findAreaType(InlineViewport.class);
         }
 
         /** {@inheritDoc} */
@@ -902,10 +902,10 @@ public class AreaTreeParser {
             }
         }
 
-        private class ViewportMaker extends AbstractMaker {
+        private class InlineViewportMaker extends AbstractMaker {
 
             public void startElement(Attributes attributes) {
-                Viewport viewport = new Viewport(null);
+                InlineViewport viewport = new InlineViewport(null);
                 transferForeignObjects(attributes, viewport);
                 setAreaAttributes(attributes, viewport);
                 setTraits(attributes, viewport, SUBSET_COMMON);
@@ -921,7 +921,7 @@ public class AreaTreeParser {
             }
 
             public void endElement() {
-                assertObjectOfClass(areaStack.pop(), Viewport.class);
+                assertObjectOfClass(areaStack.pop(), InlineViewport.class);
             }
         }
 

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/area/BlockViewport.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/area/BlockViewport.java?rev=1081822&r1=1081821&r2=1081822&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/area/BlockViewport.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/area/BlockViewport.java Tue Mar 15 15:56:01
2011
@@ -80,10 +80,12 @@ public class BlockViewport extends Block
         clip = cl;
     }
 
+    /** {@inheritDoc} */
     public boolean hasClip() {
         return clip;
     }
 
+    /** {@inheritDoc} */
     public Rectangle getClipRectangle() {
         if (clip) {
             return new Rectangle(getIPD(), getBPD());

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/area/RegionViewport.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/area/RegionViewport.java?rev=1081822&r1=1081821&r2=1081822&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/area/RegionViewport.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/area/RegionViewport.java Tue Mar 15 15:56:01
2011
@@ -76,10 +76,12 @@ public class RegionViewport extends Area
         clip = c;
     }
 
+    /** {@inheritDoc} */
     public boolean hasClip() {
         return this.clip;
     }
 
+    /** {@inheritDoc} */
     public Rectangle getClipRectangle() {
         if (clip) {
             return new Rectangle(getIPD(), getBPD());

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/area/inline/FilledArea.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/area/inline/FilledArea.java?rev=1081822&r1=1081821&r2=1081822&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/area/inline/FilledArea.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/area/inline/FilledArea.java Tue Mar 15 15:56:01
2011
@@ -19,10 +19,10 @@
 
 package org.apache.fop.area.inline;
 
-import java.util.List;
-import java.util.ListIterator;
 import java.util.ArrayList;
 import java.util.Iterator;
+import java.util.List;
+import java.util.ListIterator;
 
 /**
  * Filled area.
@@ -60,7 +60,7 @@ public class FilledArea extends InlinePa
             InlineArea child = (InlineArea) childrenIterator.next();
             if (child instanceof InlineParent) {
                 setChildOffset(((InlineParent) child).getChildAreas().listIterator(), v);
-            } else if (child instanceof org.apache.fop.area.inline.Viewport) {
+            } else if (child instanceof InlineViewport) {
                 // nothing
             } else {
                 child.setOffset(v);

Copied: xmlgraphics/fop/trunk/src/java/org/apache/fop/area/inline/InlineViewport.java (from
r1081554, xmlgraphics/fop/trunk/src/java/org/apache/fop/area/inline/Viewport.java)
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/area/inline/InlineViewport.java?p2=xmlgraphics/fop/trunk/src/java/org/apache/fop/area/inline/InlineViewport.java&p1=xmlgraphics/fop/trunk/src/java/org/apache/fop/area/inline/Viewport.java&r1=1081554&r2=1081822&rev=1081822&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/area/inline/Viewport.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/area/inline/InlineViewport.java Tue Mar
15 15:56:01 2011
@@ -25,6 +25,7 @@ import java.io.IOException;
 import java.util.HashMap;
 
 import org.apache.fop.area.Area;
+import org.apache.fop.area.Viewport;
 
 /**
  * Inline viewport area.
@@ -32,7 +33,7 @@ import org.apache.fop.area.Area;
  * external graphic and instream foreign object. This viewport
  * holds the area and positions it.
  */
-public class Viewport extends InlineArea implements org.apache.fop.area.Viewport {
+public class InlineViewport extends InlineArea implements Viewport {
 
     private static final long serialVersionUID = 813338534627918689L;
 
@@ -48,7 +49,7 @@ public class Viewport extends InlineArea
      *
      * @param child the child content area of this viewport
      */
-    public Viewport(Area child) {
+    public InlineViewport(Area child) {
         this.content = child;
     }
 
@@ -61,10 +62,12 @@ public class Viewport extends InlineArea
         this.clip = c;
     }
 
+    /** {@inheritDoc} */
     public boolean hasClip() {
         return this.clip;
     }
 
+    /** {@inheritDoc} */
     public Rectangle getClipRectangle() {
         if (clip) {
             return new Rectangle(getIPD(), getBPD());

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/ExternalDocumentLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/ExternalDocumentLayoutManager.java?rev=1081822&r1=1081821&r2=1081822&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/ExternalDocumentLayoutManager.java
(original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/ExternalDocumentLayoutManager.java
Tue Mar 15 15:56:01 2011
@@ -45,7 +45,7 @@ import org.apache.fop.area.PageSequence;
 import org.apache.fop.area.PageViewport;
 import org.apache.fop.area.RegionViewport;
 import org.apache.fop.area.inline.Image;
-import org.apache.fop.area.inline.Viewport;
+import org.apache.fop.area.inline.InlineViewport;
 import org.apache.fop.datatypes.FODimension;
 import org.apache.fop.datatypes.URISpecification;
 import org.apache.fop.fo.Constants;
@@ -184,7 +184,7 @@ public class ExternalDocumentLayoutManag
         TraitSetter.setProducerID(imageArea, fobj.getId());
         transferForeignAttributes(imageArea);
 
-        Viewport vp = new Viewport(imageArea);
+        InlineViewport vp = new InlineViewport(imageArea);
         TraitSetter.setProducerID(vp, fobj.getId());
         vp.setIPD(imageSize.width);
         vp.setBPD(imageSize.height);

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/AbstractGraphicsLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/AbstractGraphicsLayoutManager.java?rev=1081822&r1=1081821&r2=1081822&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/AbstractGraphicsLayoutManager.java
(original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/AbstractGraphicsLayoutManager.java
Tue Mar 15 15:56:01 2011
@@ -24,7 +24,7 @@ import java.awt.Rectangle;
 import java.util.List;
 
 import org.apache.fop.area.Area;
-import org.apache.fop.area.inline.Viewport;
+import org.apache.fop.area.inline.InlineViewport;
 import org.apache.fop.datatypes.LengthBase;
 import org.apache.fop.fo.FObj;
 import org.apache.fop.fo.flow.AbstractGraphics;
@@ -54,7 +54,7 @@ public abstract class AbstractGraphicsLa
      *
      * @return the viewport inline area
      */
-    private Viewport getInlineArea() {
+    private InlineViewport getInlineArea() {
         final AbstractGraphics fobj = (AbstractGraphics)this.fobj;
         Dimension intrinsicSize = new Dimension(
                 fobj.getIntrinsicWidth(),
@@ -84,7 +84,7 @@ public abstract class AbstractGraphicsLa
         TraitSetter.setProducerID(viewportArea, fobj.getId());
         transferForeignAttributes(viewportArea);
 
-        Viewport vp = new Viewport(viewportArea);
+        InlineViewport vp = new InlineViewport(viewportArea);
         TraitSetter.addPtr(vp, fobj.getPtr());  // used for accessibility
         TraitSetter.setProducerID(vp, fobj.getId());
         vp.setIPD(imageLayout.getViewportSize().width);
@@ -106,7 +106,7 @@ public abstract class AbstractGraphicsLa
     /** {@inheritDoc} */
     public List getNextKnuthElements(LayoutContext context,
                                            int alignment) {
-        Viewport areaCurrent = getInlineArea();
+        InlineViewport areaCurrent = getInlineArea();
         setCurrentArea(areaCurrent);
         return super.getNextKnuthElements(context, alignment);
     }

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/AbstractPathOrientedRenderer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/AbstractPathOrientedRenderer.java?rev=1081822&r1=1081821&r2=1081822&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/AbstractPathOrientedRenderer.java
(original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/AbstractPathOrientedRenderer.java
Tue Mar 15 15:56:01 2011
@@ -44,7 +44,7 @@ import org.apache.fop.area.RegionViewpor
 import org.apache.fop.area.Trait;
 import org.apache.fop.area.inline.ForeignObject;
 import org.apache.fop.area.inline.InlineArea;
-import org.apache.fop.area.inline.Viewport;
+import org.apache.fop.area.inline.InlineViewport;
 import org.apache.fop.fo.Constants;
 import org.apache.fop.fo.extensions.ExtensionElementMapping;
 import org.apache.fop.fonts.FontMetrics;
@@ -685,7 +685,7 @@ public abstract class AbstractPathOrient
      * This renders an inline viewport by clipping if necessary.
      * @param viewport the viewport to handle
      */
-    public void renderViewport(Viewport viewport) {
+    public void renderInlineViewport(InlineViewport viewport) {
 
         float x = currentIPPosition / 1000f;
         float y = (currentBPPosition + viewport.getOffset()) / 1000f;
@@ -706,7 +706,7 @@ public abstract class AbstractPathOrient
 
             clipRect(x + borderPaddingStart, y + borderPaddingBefore, width, height);
         }
-        super.renderViewport(viewport);
+        super.renderInlineViewport(viewport);
 
         if (viewport.hasClip()) {
             restoreGraphicsState();

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/AbstractRenderer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/AbstractRenderer.java?rev=1081822&r1=1081821&r2=1081822&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/AbstractRenderer.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/AbstractRenderer.java Tue Mar 15
15:56:01 2011
@@ -65,7 +65,7 @@ import org.apache.fop.area.inline.Leader
 import org.apache.fop.area.inline.Space;
 import org.apache.fop.area.inline.SpaceArea;
 import org.apache.fop.area.inline.TextArea;
-import org.apache.fop.area.inline.Viewport;
+import org.apache.fop.area.inline.InlineViewport;
 import org.apache.fop.area.inline.WordArea;
 import org.apache.fop.fo.Constants;
 import org.apache.fop.fonts.FontInfo;
@@ -632,8 +632,8 @@ public abstract class AbstractRenderer
             renderInlineBlockParent((InlineBlockParent) inlineArea);
         } else if (inlineArea instanceof Space) {
             renderInlineSpace((Space) inlineArea);
-        } else if (inlineArea instanceof Viewport) {
-            renderViewport((Viewport) inlineArea);
+        } else if (inlineArea instanceof InlineViewport) {
+            renderInlineViewport((InlineViewport) inlineArea);
         } else if (inlineArea instanceof Leader) {
             renderLeader((Leader) inlineArea);
         }
@@ -734,7 +734,7 @@ public abstract class AbstractRenderer
      * Render the given Viewport.
      * @param viewport the viewport to render
      */
-    protected void renderViewport(Viewport viewport) {
+    protected void renderInlineViewport(InlineViewport viewport) {
         Area content = viewport.getContent();
         int saveBP = currentBPPosition;
         currentBPPosition += viewport.getOffset();

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFRenderer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFRenderer.java?rev=1081822&r1=1081821&r2=1081822&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFRenderer.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFRenderer.java Tue
Mar 15 15:56:01 2011
@@ -73,7 +73,7 @@ import org.apache.fop.area.inline.Inline
 import org.apache.fop.area.inline.Leader;
 import org.apache.fop.area.inline.SpaceArea;
 import org.apache.fop.area.inline.TextArea;
-import org.apache.fop.area.inline.Viewport;
+import org.apache.fop.area.inline.InlineViewport;
 import org.apache.fop.area.inline.WordArea;
 import org.apache.fop.datatypes.URISpecification;
 import org.apache.fop.fo.extensions.ExtensionAttachment;
@@ -838,12 +838,12 @@ public class IFRenderer extends Abstract
     }
 
     /** {@inheritDoc} */
-    public void renderViewport(Viewport viewport) {
+    public void renderInlineViewport(InlineViewport viewport) {
         String ptr = (String) viewport.getTrait(Trait.PTR);
         establishStructurePointer(ptr);
         Dimension dim = new Dimension(viewport.getIPD(), viewport.getBPD());
         viewportDimensionStack.push(dim);
-        super.renderViewport(viewport);
+        super.renderInlineViewport(viewport);
         viewportDimensionStack.pop();
         resetStructurePointer();
     }

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/xml/XMLRenderer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/xml/XMLRenderer.java?rev=1081822&r1=1081821&r2=1081822&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/xml/XMLRenderer.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/xml/XMLRenderer.java Tue Mar 15 15:56:01
2011
@@ -79,7 +79,7 @@ import org.apache.fop.area.inline.Leader
 import org.apache.fop.area.inline.Space;
 import org.apache.fop.area.inline.SpaceArea;
 import org.apache.fop.area.inline.TextArea;
-import org.apache.fop.area.inline.Viewport;
+import org.apache.fop.area.inline.InlineViewport;
 import org.apache.fop.area.inline.WordArea;
 import org.apache.fop.fo.Constants;
 import org.apache.fop.fo.extensions.ExtensionAttachment;
@@ -743,7 +743,7 @@ public class XMLRenderer extends Abstrac
      * {@inheritDoc}
      */
     @Override
-    protected void renderViewport(Viewport viewport) {
+    protected void renderInlineViewport(InlineViewport viewport) {
         atts.clear();
         addAreaAttributes(viewport);
         addTraitAttributes(viewport);
@@ -753,7 +753,7 @@ public class XMLRenderer extends Abstrac
             addAttribute("clip", "true");
         }
         startElement("viewport", atts);
-        super.renderViewport(viewport);
+        super.renderInlineViewport(viewport);
         endElement("viewport");
     }
 

Modified: xmlgraphics/fop/trunk/test/java/org/apache/fop/area/inline/InlineViewportTestCase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/test/java/org/apache/fop/area/inline/InlineViewportTestCase.java?rev=1081822&r1=1081821&r2=1081822&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/test/java/org/apache/fop/area/inline/InlineViewportTestCase.java
(original)
+++ xmlgraphics/fop/trunk/test/java/org/apache/fop/area/inline/InlineViewportTestCase.java
Tue Mar 15 15:56:01 2011
@@ -22,19 +22,19 @@ package org.apache.fop.area.inline;
 import org.apache.fop.area.ViewportTestCase;
 
 /**
- * Tests the {@linkplain Viewport} class.
+ * Tests the {@linkplain InlineViewport} class.
  */
 public class InlineViewportTestCase extends ViewportTestCase {
 
     public void testNonClip() throws Exception {
-        Viewport v = new Viewport(null);
+        InlineViewport v = new InlineViewport(null);
         v.setIPD(50);
         v.setBPD(25);
         checkNonClip(v);
     }
 
     public void testClip() throws Exception {
-        Viewport v = new Viewport(null);
+        InlineViewport v = new InlineViewport(null);
         int ipd = 50;
         int bpd = 25;
         v.setIPD(ipd);



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


Mime
View raw message