diff options
author | Jeremias Maerki <jeremias@apache.org> | 2010-08-14 17:17:00 +0000 |
---|---|---|
committer | Jeremias Maerki <jeremias@apache.org> | 2010-08-14 17:17:00 +0000 |
commit | 29e8badcec8bd40eca2ef4940133f08eeefdda11 (patch) | |
tree | 7b44a2d058ae8a60ff278f5d26f243eb674e54c6 /src/java/org/apache/fop/render/afp | |
parent | c81729764a0692e9f5e31ec28722403b603ee5aa (diff) | |
download | xmlgraphics-fop-29e8badcec8bd40eca2ef4940133f08eeefdda11.tar.gz xmlgraphics-fop-29e8badcec8bd40eca2ef4940133f08eeefdda11.zip |
Bugzilla #49733:
Resolved compilation (safe one), Checkstyle and many Javadoc warnings.
Submitted by: Glenn Adams <glenn.at.skynav.com>
Changes to patch:
- Restored the deprecated Graphics2DAdapter method (to be removed after Barcode4J 2.1 is released).
- Restored Renderer.startPageSequence(LineArea) pending discussion about removal.
- build.xml: set max VM to 1024MB instead of 2048MB to allow for 32-bit JVMs.
- build.xml: restored longer taskdef names.
- Restored Checkstyle 4 file for people running older IDEs.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@985537 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/render/afp')
8 files changed, 35 insertions, 18 deletions
diff --git a/src/java/org/apache/fop/render/afp/AFPForeignAttributeReader.java b/src/java/org/apache/fop/render/afp/AFPForeignAttributeReader.java index 235218cfc..aad31f18e 100644 --- a/src/java/org/apache/fop/render/afp/AFPForeignAttributeReader.java +++ b/src/java/org/apache/fop/render/afp/AFPForeignAttributeReader.java @@ -35,7 +35,8 @@ import org.apache.fop.render.afp.extensions.AFPElementMapping; * Parses any AFP foreign attributes */ public class AFPForeignAttributeReader { - private static final Log log = LogFactory.getLog("org.apache.xmlgraphics.afp"); + private static final Log log // CSOK: ConstantName + = LogFactory.getLog("org.apache.xmlgraphics.afp"); /** the resource-name attribute */ public static final QName RESOURCE_NAME = new QName( diff --git a/src/java/org/apache/fop/render/afp/AFPImageHandlerRenderedImage.java b/src/java/org/apache/fop/render/afp/AFPImageHandlerRenderedImage.java index cb7b23da2..09b93d41a 100644 --- a/src/java/org/apache/fop/render/afp/AFPImageHandlerRenderedImage.java +++ b/src/java/org/apache/fop/render/afp/AFPImageHandlerRenderedImage.java @@ -86,9 +86,10 @@ public class AFPImageHandlerRenderedImage extends AFPImageHandler implements Ima return imageObjectInfo; } - private AFPDataObjectInfo updateDataObjectInfo(AFPImageObjectInfo imageObjectInfo, - AFPPaintingState paintingState, ImageRendered imageRendered, Dimension targetSize) - throws IOException { + private AFPDataObjectInfo updateDataObjectInfo // CSOK: MethodLength + (AFPImageObjectInfo imageObjectInfo, + AFPPaintingState paintingState, ImageRendered imageRendered, Dimension targetSize) + throws IOException { long start = System.currentTimeMillis(); diff --git a/src/java/org/apache/fop/render/afp/AFPImageHandlerSVG.java b/src/java/org/apache/fop/render/afp/AFPImageHandlerSVG.java index 67c19843b..4e4e1de31 100644 --- a/src/java/org/apache/fop/render/afp/AFPImageHandlerSVG.java +++ b/src/java/org/apache/fop/render/afp/AFPImageHandlerSVG.java @@ -65,7 +65,7 @@ public class AFPImageHandlerSVG implements ImageHandler { BatikImageFlavors.SVG_DOM }; - /** {@inheritDoc} */ + /** @return a new AFP data object info instance */ protected AFPDataObjectInfo createDataObjectInfo() { return new AFPGraphicsObjectInfo(); } diff --git a/src/java/org/apache/fop/render/afp/AFPInfo.java b/src/java/org/apache/fop/render/afp/AFPInfo.java index fb1ec87a8..53a1aa046 100644 --- a/src/java/org/apache/fop/render/afp/AFPInfo.java +++ b/src/java/org/apache/fop/render/afp/AFPInfo.java @@ -256,7 +256,8 @@ public final class AFPInfo { public boolean strokeText() { boolean strokeText = false; if (handlerConfiguration != null) { - strokeText = handlerConfiguration.getChild("stroke-text", true).getValueAsBoolean(strokeText); + strokeText + = handlerConfiguration.getChild("stroke-text", true).getValueAsBoolean(strokeText); } return strokeText; } @@ -286,8 +287,9 @@ public final class AFPInfo { * @return a newly created AFPGraphics2D */ public AFPGraphics2D createGraphics2D(boolean textAsShapes) { - AFPGraphics2D g2d = new AFPGraphics2D( - textAsShapes, paintingState, resourceManager, resourceInfo, fontInfo); + AFPGraphics2D g2d + = new AFPGraphics2D + (textAsShapes, paintingState, resourceManager, resourceInfo, fontInfo); g2d.setGraphicContext(new org.apache.xmlgraphics.java2d.GraphicContext()); return g2d; } diff --git a/src/java/org/apache/fop/render/afp/AFPPainter.java b/src/java/org/apache/fop/render/afp/AFPPainter.java index 22a5e0a58..21bc4ab48 100644 --- a/src/java/org/apache/fop/render/afp/AFPPainter.java +++ b/src/java/org/apache/fop/render/afp/AFPPainter.java @@ -281,7 +281,8 @@ public class AFPPainter extends AbstractIFPainter { return mpt / 1000f; } - protected void drawBorderLine(int x1, int y1, int x2, int y2, boolean horz, + protected void drawBorderLine // CSOK: ParameterNumber + (int x1, int y1, int x2, int y2, boolean horz, boolean startOrBefore, int style, Color color) throws IOException { BorderPaintingInfo borderPaintInfo = new BorderPaintingInfo( toPoints(x1), toPoints(y1), toPoints(x2), toPoints(y2), @@ -316,9 +317,9 @@ public class AFPPainter extends AbstractIFPainter { } /** {@inheritDoc} */ - public void drawText(int x, int y, - final int letterSpacing, final int wordSpacing, final int[] dx, - final String text) throws IFException { + public void drawText // CSOK: MethodLength + (int x, int y, final int letterSpacing, final int wordSpacing, final int[] dx, + final String text) throws IFException { final int fontSize = this.state.getFontSize(); getPaintingState().setFontSize(fontSize); diff --git a/src/java/org/apache/fop/render/afp/AFPRenderer.java b/src/java/org/apache/fop/render/afp/AFPRenderer.java index 1f373023c..df6cf2c5f 100644 --- a/src/java/org/apache/fop/render/afp/AFPRenderer.java +++ b/src/java/org/apache/fop/render/afp/AFPRenderer.java @@ -404,9 +404,11 @@ public class AFPRenderer extends AbstractPathOrientedRenderer implements AFPCust } /** {@inheritDoc} */ - public void drawBorderLine(float x1, float y1, float x2, float y2, - boolean horz, boolean startOrBefore, int style, Color col) { - BorderPaintingInfo borderPaintInfo = new BorderPaintingInfo(x1, y1, x2, y2, horz, style, col); + public void drawBorderLine // CSOK: ParameterNumber + (float x1, float y1, float x2, float y2, + boolean horz, boolean startOrBefore, int style, Color col) { + BorderPaintingInfo borderPaintInfo + = new BorderPaintingInfo(x1, y1, x2, y2, horz, style, col); borderPainter.paint(borderPaintInfo); } @@ -654,7 +656,8 @@ public class AFPRenderer extends AbstractPathOrientedRenderer implements AFPCust textDataInfo.setString(textString); try { - dataStream.createText(textDataInfo, textLetterSpaceAdjust, textWordSpaceAdjust, fnt, charSet); + dataStream.createText + (textDataInfo, textLetterSpaceAdjust, textWordSpaceAdjust, fnt, charSet); } catch (UnsupportedEncodingException e) { AFPEventProducer eventProducer = AFPEventProducer.Provider.get(userAgent.getEventBroadcaster()); @@ -784,7 +787,8 @@ public class AFPRenderer extends AbstractPathOrientedRenderer implements AFPCust if (AFPElementMapping.INCLUDE_PAGE_OVERLAY.equals(element)) { String overlay = ipo.getName(); if (overlay != null) { - dataStream.createIncludePageOverlay(overlay, ipo.getX(), ipo.getY()); + dataStream.createIncludePageOverlay + (overlay, ipo.getX(), ipo.getY()); } } } diff --git a/src/java/org/apache/fop/render/afp/AFPRenderingContext.java b/src/java/org/apache/fop/render/afp/AFPRenderingContext.java index 35be58c22..22a91dd83 100644 --- a/src/java/org/apache/fop/render/afp/AFPRenderingContext.java +++ b/src/java/org/apache/fop/render/afp/AFPRenderingContext.java @@ -43,6 +43,7 @@ public class AFPRenderingContext extends AbstractRenderingContext { * Main constructor. * @param userAgent the user agent * @param resourceManager the resource manager + * @param paintingState the painting state * @param fontInfo the font list * @param foreignAttributes a map of foreign attributes */ @@ -70,6 +71,7 @@ public class AFPRenderingContext extends AbstractRenderingContext { return this.resourceManager; } + /** @return painting state */ public AFPPaintingState getPaintingState() { return this.paintingState; } diff --git a/src/java/org/apache/fop/render/afp/AFPSVGHandler.java b/src/java/org/apache/fop/render/afp/AFPSVGHandler.java index f76c4a89a..587c57e5b 100644 --- a/src/java/org/apache/fop/render/afp/AFPSVGHandler.java +++ b/src/java/org/apache/fop/render/afp/AFPSVGHandler.java @@ -174,7 +174,8 @@ public class AFPSVGHandler extends AbstractGenericSVGHandler { return objectAreaInfo; } - private AFPGraphicsObjectInfo createGraphicsObjectInfo(AFPPaintingState paintingState, Graphics2DImagePainter painter, + private AFPGraphicsObjectInfo createGraphicsObjectInfo + (AFPPaintingState paintingState, Graphics2DImagePainter painter, FOUserAgent userAgent, AFPResourceInfo resourceInfo, AFPGraphics2D g2d) { AFPGraphicsObjectInfo graphicsObjectInfo = new AFPGraphicsObjectInfo(); @@ -193,6 +194,11 @@ public class AFPSVGHandler extends AbstractGenericSVGHandler { return graphicsObjectInfo; } + /** + * @param userAgent a user agent instance + * @param g2d a graphics context + * @return a bridge context + */ public static BridgeContext createBridgeContext(FOUserAgent userAgent, AFPGraphics2D g2d) { ImageManager imageManager = userAgent.getFactory().getImageManager(); |