From 34cfe36db9948152d7b7db4aa2638c215d532999 Mon Sep 17 00:00:00 2001 From: Manuel Mall Date: Wed, 26 Oct 2005 16:13:01 +0000 Subject: [PATCH] Fixed various javadoc problems, fixed a deprecation warning, removed functions not needed any more git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@328666 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/fop/datatypes/LengthBase.java | 14 +++++++------- .../org/apache/fop/fo/flow/AbstractGraphics.java | 4 ++-- .../org/apache/fop/fo/flow/ExternalGraphic.java | 4 ++-- .../apache/fop/fo/flow/InstreamForeignObject.java | 4 ++-- .../fop/fo/properties/BoxPropShorthandParser.java | 2 +- .../fop/fo/properties/ToBeImplementedProperty.java | 2 +- .../org/apache/fop/layoutmgr/LayoutContext.java | 4 ++-- .../inline/AbstractGraphicsLayoutManager.java | 7 +++++-- .../layoutmgr/inline/BasicScaledBaselineTable.java | 2 +- .../layoutmgr/inline/CharacterLayoutManager.java | 10 +++++----- .../fop/layoutmgr/inline/LeaderLayoutManager.java | 8 ++++---- .../layoutmgr/inline/LeafNodeLayoutManager.java | 4 ++-- .../inline/PageNumberCitationLayoutManager.java | 9 ++------- .../layoutmgr/inline/PageNumberLayoutManager.java | 7 +------ .../fop/layoutmgr/inline/TextLayoutManager.java | 6 ++---- .../fop/render/awt/viewer/ImageProxyPanel.java | 4 +++- src/java/org/apache/fop/render/ps/PSRenderer.java | 3 ++- src/java/org/apache/fop/tools/TestConverter.java | 2 +- 18 files changed, 45 insertions(+), 51 deletions(-) diff --git a/src/java/org/apache/fop/datatypes/LengthBase.java b/src/java/org/apache/fop/datatypes/LengthBase.java index 00f03c450..30a93e515 100644 --- a/src/java/org/apache/fop/datatypes/LengthBase.java +++ b/src/java/org/apache/fop/datatypes/LengthBase.java @@ -67,7 +67,7 @@ public class LengthBase implements PercentBase { /** * One of the defined types of LengthBase */ - private /* final */ int iBaseType; + private /* final */ int baseType; /** For percentages based on other length properties */ private Length baseLength; @@ -76,13 +76,13 @@ public class LengthBase implements PercentBase { * Constructor * @param parentFO parent FO for this * @param plist property list for this - * @param iBaseType a member of {@link #PERCENT_BASED_LENGTH_TYPES} + * @param baseType a constant defining the type of teh percent base * @throws PropertyException In case an problem occurs while evaluating values */ - public LengthBase(FObj parentFO, PropertyList plist, int iBaseType) throws PropertyException { + public LengthBase(FObj parentFO, PropertyList plist, int baseType) throws PropertyException { this.fobj = plist.getFObj(); - this.iBaseType = iBaseType; - switch (iBaseType) { + this.baseType = baseType; + switch (baseType) { case FONTSIZE: this.baseLength = plist.get(Constants.PR_FONT_SIZE).getLength(); break; @@ -116,10 +116,10 @@ public class LengthBase implements PercentBase { public int getBaseLength(PercentBaseContext context) throws PropertyException { int baseLen = 0; if (context != null) { - if (iBaseType == FONTSIZE || iBaseType == INH_FONTSIZE) { + if (baseType == FONTSIZE || baseType == INH_FONTSIZE) { return baseLength.getValue(context); } - baseLen = context.getBaseLength(iBaseType, fobj); + baseLen = context.getBaseLength(baseType, fobj); } else { fobj.getLogger().error("getBaseLength called without context"); } diff --git a/src/java/org/apache/fop/fo/flow/AbstractGraphics.java b/src/java/org/apache/fop/fo/flow/AbstractGraphics.java index 493738b12..540f2e616 100644 --- a/src/java/org/apache/fop/fo/flow/AbstractGraphics.java +++ b/src/java/org/apache/fop/fo/flow/AbstractGraphics.java @@ -265,12 +265,12 @@ public abstract class AbstractGraphics extends FObj { } /** - * @see org.apache.fop.fo.IntrinsicSizeAccess#getIntrinsicWidth() + * @return the graphics intrinsic width */ public abstract int getIntrinsicWidth(); /** - * @see org.apache.fop.fo.IntrinsicSizeAccess#getIntrinsicHeight() + * @return the graphics intrinsic height */ public abstract int getIntrinsicHeight(); } diff --git a/src/java/org/apache/fop/fo/flow/ExternalGraphic.java b/src/java/org/apache/fop/fo/flow/ExternalGraphic.java index 5fa54cef4..f761918ca 100644 --- a/src/java/org/apache/fop/fo/flow/ExternalGraphic.java +++ b/src/java/org/apache/fop/fo/flow/ExternalGraphic.java @@ -119,7 +119,7 @@ public class ExternalGraphic extends AbstractGraphics { } /** - * @see org.apache.fop.fo.IntrinsicSizeAccess#getIntrinsicWidth() + * @see org.apache.fop.fo.flow.AbstractGraphics#getIntrinsicWidth() */ public int getIntrinsicWidth() { if (fopimage != null) { @@ -130,7 +130,7 @@ public class ExternalGraphic extends AbstractGraphics { } /** - * @see org.apache.fop.fo.IntrinsicSizeAccess#getIntrinsicHeight() + * @see org.apache.fop.fo.flow.AbstractGraphics#getIntrinsicHeight() */ public int getIntrinsicHeight() { if (fopimage != null) { diff --git a/src/java/org/apache/fop/fo/flow/InstreamForeignObject.java b/src/java/org/apache/fop/fo/flow/InstreamForeignObject.java index e59015947..5b0f76d22 100644 --- a/src/java/org/apache/fop/fo/flow/InstreamForeignObject.java +++ b/src/java/org/apache/fop/fo/flow/InstreamForeignObject.java @@ -109,7 +109,7 @@ public class InstreamForeignObject extends AbstractGraphics { } /** - * @see org.apache.fop.fo.IntrinsicSizeAccess#getIntrinsicWidth() + * @see org.apache.fop.fo.flow.AbstractGraphics#getIntrinsicWidth() */ public int getIntrinsicWidth() { prepareIntrinsicSize(); @@ -121,7 +121,7 @@ public class InstreamForeignObject extends AbstractGraphics { } /** - * @see org.apache.fop.fo.IntrinsicSizeAccess#getIntrinsicHeight() + * @see org.apache.fop.fo.flow.AbstractGraphics#getIntrinsicHeight() */ public int getIntrinsicHeight() { prepareIntrinsicSize(); diff --git a/src/java/org/apache/fop/fo/properties/BoxPropShorthandParser.java b/src/java/org/apache/fop/fo/properties/BoxPropShorthandParser.java index 9d99c0d11..9d7963635 100644 --- a/src/java/org/apache/fop/fo/properties/BoxPropShorthandParser.java +++ b/src/java/org/apache/fop/fo/properties/BoxPropShorthandParser.java @@ -37,7 +37,7 @@ public class BoxPropShorthandParser extends GenericShorthandParser { * Stores 1 to 4 values of same type. * Set the given property based on the number of values set. * Example: padding, border-width, border-color, border-style, margin - * @see org.apache.fop.fo.GenericShorthandParser#convertValueForProperty( + * @see org.apache.fop.fo.properties.GenericShorthandParser#convertValueForProperty( * int, Property, PropertyMaker, PropertyList) */ protected Property convertValueForProperty(int propId, diff --git a/src/java/org/apache/fop/fo/properties/ToBeImplementedProperty.java b/src/java/org/apache/fop/fo/properties/ToBeImplementedProperty.java index c5466e2ac..5a6fb4810 100644 --- a/src/java/org/apache/fop/fo/properties/ToBeImplementedProperty.java +++ b/src/java/org/apache/fop/fo/properties/ToBeImplementedProperty.java @@ -43,7 +43,7 @@ public class ToBeImplementedProperty extends Property { /** * Constructor - * @param propName name of Property + * @param propId id of Property */ public ToBeImplementedProperty(int propId) { diff --git a/src/java/org/apache/fop/layoutmgr/LayoutContext.java b/src/java/org/apache/fop/layoutmgr/LayoutContext.java index e4710b1a1..ef5b818c3 100644 --- a/src/java/org/apache/fop/layoutmgr/LayoutContext.java +++ b/src/java/org/apache/fop/layoutmgr/LayoutContext.java @@ -254,7 +254,7 @@ public class LayoutContext { /** * @return the pending border and padding elements at the after edge - * @see addPendingAfterMark(BorderOrPaddingElement) + * @see #addPendingAfterMark(UnresolvedListElementWithLength) */ public List getPendingAfterMarks() { if (this.pendingAfterMarks != null) { @@ -279,7 +279,7 @@ public class LayoutContext { /** * @return the pending border and padding elements at the before edge - * @see addPendingBeforeMark(BorderOrPaddingElement) + * @see #addPendingBeforeMark(UnresolvedListElementWithLength) */ public List getPendingBeforeMarks() { if (this.pendingBeforeMarks != null) { diff --git a/src/java/org/apache/fop/layoutmgr/inline/AbstractGraphicsLayoutManager.java b/src/java/org/apache/fop/layoutmgr/inline/AbstractGraphicsLayoutManager.java index 8ebe812fd..0f7b35aac 100644 --- a/src/java/org/apache/fop/layoutmgr/inline/AbstractGraphicsLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/inline/AbstractGraphicsLayoutManager.java @@ -208,7 +208,10 @@ public abstract class AbstractGraphicsLayoutManager extends LeafNodeLayoutManage vp.setOffset(0); // Common Border, Padding, and Background Properties - TraitSetter.addBorders(vp, fobj.getCommonBorderPaddingBackground(), this); + TraitSetter.addBorders(vp, fobj.getCommonBorderPaddingBackground() + , false, false, false, false, this); + TraitSetter.addPadding(vp, fobj.getCommonBorderPaddingBackground() + , false, false, false, false, this); TraitSetter.addBackground(vp, fobj.getCommonBorderPaddingBackground(), this); return vp; @@ -225,7 +228,7 @@ public abstract class AbstractGraphicsLayoutManager extends LeafNodeLayoutManage } /** - * @see LeafNodeLayoutManager.makeAlignmentContext(LayoutContext) + * @see LeafNodeLayoutManager#makeAlignmentContext(LayoutContext) */ protected AlignmentContext makeAlignmentContext(LayoutContext context) { return new AlignmentContext( diff --git a/src/java/org/apache/fop/layoutmgr/inline/BasicScaledBaselineTable.java b/src/java/org/apache/fop/layoutmgr/inline/BasicScaledBaselineTable.java index db2b35e22..31d659059 100644 --- a/src/java/org/apache/fop/layoutmgr/inline/BasicScaledBaselineTable.java +++ b/src/java/org/apache/fop/layoutmgr/inline/BasicScaledBaselineTable.java @@ -180,7 +180,7 @@ public class BasicScaledBaselineTable implements ScaledBaselineTable, Constants } /** - * @see ScaledBaselineTable#getScaledBaselineTable(int) + * @see ScaledBaselineTable#deriveScaledBaselineTable(int) */ public ScaledBaselineTable deriveScaledBaselineTable(int baselineIdentifier) { BasicScaledBaselineTable bac diff --git a/src/java/org/apache/fop/layoutmgr/inline/CharacterLayoutManager.java b/src/java/org/apache/fop/layoutmgr/inline/CharacterLayoutManager.java index 4d3a9adc2..c337548fd 100644 --- a/src/java/org/apache/fop/layoutmgr/inline/CharacterLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/inline/CharacterLayoutManager.java @@ -52,14 +52,14 @@ public class CharacterLayoutManager extends LeafNodeLayoutManager { * Constructor * * @param node the fo:character formatting object - * @todo better null checking of node */ public CharacterLayoutManager(Character node) { + // @todo better null checking of node super(node); fobj = node; } - /** @see LayoutManager#initialize */ + /** @see org.apache.fop.layoutmgr.LayoutManager#initialize */ public void initialize() { font = fobj.getCommonFont().getFontState(fobj.getFOEventHandler().getFontInfo(), this); SpaceVal ls = SpaceVal.makeLetterSpacing(fobj.getLetterSpacing()); @@ -80,7 +80,7 @@ public class CharacterLayoutManager extends LeafNodeLayoutManager { return ch; } - /** @see LayoutManager#getNextKnuthElements(LayoutContext, int) */ + /** @see org.apache.fop.layoutmgr.LayoutManager#getNextKnuthElements(LayoutContext, int) */ public LinkedList getNextKnuthElements(LayoutContext context, int alignment) { MinOptMax ipd; curArea = get(context); @@ -162,7 +162,7 @@ public class CharacterLayoutManager extends LeafNodeLayoutManager { hc.updateOffset(1); } - /** @see InlineLevelLayoutManager#applyChanges(list) */ + /** @see InlineLevelLayoutManager#applyChanges(List) */ public boolean applyChanges(List oldList) { setFinished(false); if (isSomethingChanged) { @@ -175,7 +175,7 @@ public class CharacterLayoutManager extends LeafNodeLayoutManager { } } - /** @see LayoutManager#getChangedKnuthElements(List, int) */ + /** @see org.apache.fop.layoutmgr.LayoutManager#getChangedKnuthElements(List, int) */ public LinkedList getChangedKnuthElements(List oldList, int alignment) { if (isFinished()) { return null; diff --git a/src/java/org/apache/fop/layoutmgr/inline/LeaderLayoutManager.java b/src/java/org/apache/fop/layoutmgr/inline/LeaderLayoutManager.java index 502d3ed6f..d7983a9f6 100644 --- a/src/java/org/apache/fop/layoutmgr/inline/LeaderLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/inline/LeaderLayoutManager.java @@ -63,7 +63,7 @@ public class LeaderLayoutManager extends LeafNodeLayoutManager { fobj = node; } - /** @see LayoutManager#initialize */ + /** @see org.apache.fop.layoutmgr.LayoutManager#initialize */ public void initialize() { font = fobj.getCommonFont().getFontState(fobj.getFOEventHandler().getFontInfo(), this); // the property leader-alignment does not affect vertical positioning @@ -213,7 +213,7 @@ public class LeaderLayoutManager extends LeafNodeLayoutManager { } } - /** @see LayoutManager#getNextKnuthElements(LayoutContext, int) */ + /** @see org.apache.fop.layoutmgr.LayoutManager#getNextKnuthElements(LayoutContext, int) */ public LinkedList getNextKnuthElements(LayoutContext context, int alignment) { MinOptMax ipd; @@ -266,13 +266,13 @@ public class LeaderLayoutManager extends LeafNodeLayoutManager { super.hyphenate(pos, hc); } - /** @see InlineLevelLayoutManager#applyChanges(list) */ + /** @see InlineLevelLayoutManager#applyChanges(List) */ public boolean applyChanges(List oldList) { setFinished(false); return false; } - /** @see LayoutManager#getNextKnuthElements(LayoutContext, int) */ + /** @see org.apache.fop.layoutmgr.LayoutManager#getChangedKnuthElements(List, int) */ public LinkedList getChangedKnuthElements(List oldList, int alignment) { if (isFinished()) { diff --git a/src/java/org/apache/fop/layoutmgr/inline/LeafNodeLayoutManager.java b/src/java/org/apache/fop/layoutmgr/inline/LeafNodeLayoutManager.java index ef5bee9fa..f4062a79a 100644 --- a/src/java/org/apache/fop/layoutmgr/inline/LeafNodeLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/inline/LeafNodeLayoutManager.java @@ -247,7 +247,7 @@ public abstract class LeafNodeLayoutManager extends AbstractLayoutManager area.setIPD(width); } - /** @see LayoutManager#getNextKnuthElements(LayoutContext, int) */ + /** @see org.apache.fop.layoutmgr.LayoutManager#getNextKnuthElements(LayoutContext, int) */ public LinkedList getNextKnuthElements(LayoutContext context, int alignment) { curArea = get(context); @@ -311,7 +311,7 @@ public abstract class LeafNodeLayoutManager extends AbstractLayoutManager return false; } - /** @see LayoutManager#getChangedKnuthElements(List, int) */ + /** @see org.apache.fop.layoutmgr.LayoutManager#getChangedKnuthElements(List, int) */ public LinkedList getChangedKnuthElements(List oldList, int alignment) { if (isFinished()) { diff --git a/src/java/org/apache/fop/layoutmgr/inline/PageNumberCitationLayoutManager.java b/src/java/org/apache/fop/layoutmgr/inline/PageNumberCitationLayoutManager.java index 9badf6986..e1c8c29d6 100644 --- a/src/java/org/apache/fop/layoutmgr/inline/PageNumberCitationLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/inline/PageNumberCitationLayoutManager.java @@ -61,7 +61,7 @@ public class PageNumberCitationLayoutManager extends LeafNodeLayoutManager { } /** - * @see LeafNodeLayoutManager.makeAlignmentContext(LayoutContext) + * @see LeafNodeLayoutManager#makeAlignmentContext(LayoutContext) */ protected AlignmentContext makeAlignmentContext(LayoutContext context) { return new AlignmentContext( @@ -92,11 +92,6 @@ public class PageNumberCitationLayoutManager extends LeafNodeLayoutManager { } } - /** @see org.apache.fop.layoutmgr.inline.LeafNodeLayoutManager#getLead() */ - public int getLead() { - return font.getAscender(); - } - /** * if id can be resolved then simply return a word, otherwise * return a resolvable area @@ -145,7 +140,7 @@ public class PageNumberCitationLayoutManager extends LeafNodeLayoutManager { return width; } - /** @see org.apache.fop.layoutmgr.inline.LeafLayoutManager#addId */ + /** @see org.apache.fop.layoutmgr.inline.LeafNodeLayoutManager#addId() */ protected void addId() { getPSLM().addIDToPage(fobj.getId()); } diff --git a/src/java/org/apache/fop/layoutmgr/inline/PageNumberLayoutManager.java b/src/java/org/apache/fop/layoutmgr/inline/PageNumberLayoutManager.java index 2cabaa8a3..7cbcd77c4 100644 --- a/src/java/org/apache/fop/layoutmgr/inline/PageNumberLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/inline/PageNumberLayoutManager.java @@ -89,11 +89,6 @@ public class PageNumberLayoutManager extends LeafNodeLayoutManager { return text; } - /** @see org.apache.fop.layoutmgr.inline.LeafNodeLayoutManager#getLead() */ - public int getLead() { - return font.getAscender(); - } - /** @see org.apache.fop.layoutmgr.inline.LeafNodeLayoutManager#getEffectiveArea() */ protected InlineArea getEffectiveArea() { TextArea baseArea = (TextArea)curArea; @@ -133,7 +128,7 @@ public class PageNumberLayoutManager extends LeafNodeLayoutManager { return width; } - /** @see org.apache.fop.layoutmgr.inline.LeafLayoutManager#addId */ + /** @see org.apache.fop.layoutmgr.inline.LeafNodeLayoutManager#addId() */ protected void addId() { getPSLM().addIDToPage(fobj.getId()); } diff --git a/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java b/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java index 1755dd4fd..f2e1cde33 100644 --- a/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java @@ -393,8 +393,6 @@ public class TextLayoutManager extends LeafNodeLayoutManager { * @param adjust the total ipd adjustment with respect to the optimal width * @param context the layout context * @param spaceDiff unused - * @param firstIndex the index of the first AreaInfo used for the TextArea - * @param lastIndex the index of the last AreaInfo used for the TextArea * @return the new text area */ protected TextArea createTextArea(String str, MinOptMax width, int adjust, @@ -429,7 +427,7 @@ public class TextLayoutManager extends LeafNodeLayoutManager { return textArea; } - /** @see LayoutManager#getNextKnuthElements(LayoutContext, int) */ + /** @see org.apache.fop.layoutmgr.LayoutManager#getNextKnuthElements(LayoutContext, int) */ public LinkedList getNextKnuthElements(LayoutContext context, int alignment) { lineStartBAP = context.getLineStartBorderAndPaddingWidth(); lineEndBAP = context.getLineEndBorderAndPaddingWidth(); @@ -688,7 +686,7 @@ public class TextLayoutManager extends LeafNodeLayoutManager { return bChanged; } - /** @see org.aapache.fop.layoutmgr.LayoutManager#getChangedKnuthElements(List, int) */ + /** @see org.apache.fop.layoutmgr.LayoutManager#getChangedKnuthElements(List, int) */ public LinkedList getChangedKnuthElements(List oldList, int alignment) { if (isFinished()) { diff --git a/src/java/org/apache/fop/render/awt/viewer/ImageProxyPanel.java b/src/java/org/apache/fop/render/awt/viewer/ImageProxyPanel.java index 89cb27feb..e9933b137 100644 --- a/src/java/org/apache/fop/render/awt/viewer/ImageProxyPanel.java +++ b/src/java/org/apache/fop/render/awt/viewer/ImageProxyPanel.java @@ -105,7 +105,9 @@ public class ImageProxyPanel extends JPanel { /** * Gets the image data and paints it on screen. Will make * calls to getPageImage as required. - * @see org.apache.fop.render.java2d.Java2DRenderer#getPageImage() + * @param graphics + * @see javax.swing.JComponent#paintComponent(Graphics) + * @see org.apache.fop.render.java2d.Java2DRenderer#getPageImage(int) */ public synchronized void paintComponent(Graphics graphics) { try { diff --git a/src/java/org/apache/fop/render/ps/PSRenderer.java b/src/java/org/apache/fop/render/ps/PSRenderer.java index 34a5be8cb..98599eeb4 100644 --- a/src/java/org/apache/fop/render/ps/PSRenderer.java +++ b/src/java/org/apache/fop/render/ps/PSRenderer.java @@ -387,7 +387,8 @@ public class PSRenderer extends AbstractPathOrientedRenderer { } } - /** @see org.apache.fop.render.AbstractPathOrientedRenderer */ + /** @see org.apache.fop.render.AbstractPathOrientedRenderer#drawBackAndBorders( + * Area, float, float, float, float) */ protected void drawBackAndBorders(Area area, float startx, float starty, float width, float height) { if (area.hasTrait(Trait.BACKGROUND) diff --git a/src/java/org/apache/fop/tools/TestConverter.java b/src/java/org/apache/fop/tools/TestConverter.java index 04bcac275..802579995 100644 --- a/src/java/org/apache/fop/tools/TestConverter.java +++ b/src/java/org/apache/fop/tools/TestConverter.java @@ -141,7 +141,7 @@ public class TestConverter { /** * Controls whether to set logging to debug level - * @param If true, debug level, if false, error level + * @param debug If true, debug level, if false, error level */ public void setDebug(boolean debug) { if (debug) { -- 2.39.5