From: Keiron Liddle Date: Wed, 24 Jan 2001 00:31:39 +0000 (+0000) Subject: changed inline references to layout.inline X-Git-Tag: fop-0_17_0~82 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=166c799ed906666e0e918f5a64c4c2c0e3931663;p=xmlgraphics-fop.git changed inline references to layout.inline also renderers now render a word area git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@193979 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/org/apache/fop/fo/flow/InstreamForeignObject.java b/src/org/apache/fop/fo/flow/InstreamForeignObject.java index 1a8a19ca7..a980d7ef9 100644 --- a/src/org/apache/fop/fo/flow/InstreamForeignObject.java +++ b/src/org/apache/fop/fo/flow/InstreamForeignObject.java @@ -55,6 +55,7 @@ package org.apache.fop.fo.flow; import org.apache.fop.fo.*; import org.apache.fop.fo.properties.*; import org.apache.fop.layout.*; +import org.apache.fop.layout.inline.*; import org.apache.fop.layout.BlockArea; import org.apache.fop.layout.FontState; import org.apache.fop.apps.FOPException; diff --git a/src/org/apache/fop/fo/flow/Leader.java b/src/org/apache/fop/fo/flow/Leader.java index f5792d024..297c82b18 100644 --- a/src/org/apache/fop/fo/flow/Leader.java +++ b/src/org/apache/fop/fo/flow/Leader.java @@ -56,7 +56,7 @@ import org.apache.fop.fo.properties.*; import org.apache.fop.datatypes.*; import org.apache.fop.layout.Area; import org.apache.fop.layout.BlockArea; -import org.apache.fop.layout.LeaderArea; +import org.apache.fop.layout.inline.LeaderArea; import org.apache.fop.layout.FontState; import org.apache.fop.apps.FOPException; import org.apache.fop.messaging.MessageHandler; diff --git a/src/org/apache/fop/layout/LineArea.java b/src/org/apache/fop/layout/LineArea.java index 9aca8b1ee..9b20ed73b 100644 --- a/src/org/apache/fop/layout/LineArea.java +++ b/src/org/apache/fop/layout/LineArea.java @@ -54,7 +54,7 @@ package org.apache.fop.layout; //fop import org.apache.fop.render.Renderer; import org.apache.fop.messaging.MessageHandler; -import org.apache.fop.layout.LeaderArea; +import org.apache.fop.layout.inline.*; import org.apache.fop.datatypes.IDNode; import org.apache.fop.fo.properties.WrapOption; import org.apache.fop.fo.properties.WhiteSpaceCollapse; @@ -289,7 +289,7 @@ public class LineArea extends Area { // add the current word if (wordLength > 0) { - InlineArea ia = new InlineArea(currentFontState, + WordArea ia = new WordArea(currentFontState, this.red, this.green, this.blue, new String(data, wordStart, wordLength), wordWidth); @@ -407,7 +407,7 @@ public class LineArea extends Area { if (prev == TEXT) { - InlineArea pia = new InlineArea(currentFontState, this.red, + WordArea pia = new WordArea(currentFontState, this.red, this.green, this.blue, new String(data, wordStart, wordLength), wordWidth); @@ -441,7 +441,7 @@ public class LineArea extends Area { int leaderLengthOptimum, int leaderLengthMaximum, int ruleStyle, int ruleThickness, int leaderPatternWidth, int leaderAlignment) { - InlineArea leaderPatternArea; + WordArea leaderPatternArea; int leaderLength; int remainingWidth = this.getContentWidth() - this.getCurrentXPosition(); @@ -504,7 +504,7 @@ public class LineArea extends Area { new InlineSpace(leaderPatternWidth - this.currentFontState.width(46), false); leaderPatternArea = - new InlineArea(currentFontState, this.red, + new WordArea(currentFontState, this.red, this.green, this.blue, new String ("."), this.currentFontState.width(46)); int dotsFactor = (int) Math.floor ( @@ -697,8 +697,8 @@ public class LineArea extends Area { for (int i = 0; i < factor; i ++) { leaderChars[i] = fillChar; } - InlineArea leaderPatternArea = - new InlineArea(currentFontState, this.red, this.green, + WordArea leaderPatternArea = + new WordArea(currentFontState, this.red, this.green, this.blue, new String (leaderChars), leaderLength); return leaderPatternArea; } @@ -861,7 +861,7 @@ public class LineArea extends Area { /** adds a single character to the line area tree*/ public int addCharacter (char data, LinkSet ls, boolean ul) { - InlineArea ia = null; + WordArea ia = null; int remainingWidth = this.getContentWidth() - this.getCurrentXPosition(); int width = this.currentFontState.width(data); @@ -874,7 +874,7 @@ public class LineArea extends Area { return org.apache.fop.fo.flow.Character.OK; } //create new InlineArea - ia = new InlineArea(currentFontState, + ia = new WordArea(currentFontState, this.red, this.green, this.blue, new Character(data).toString(),width); ia.setUnderlined(ul); @@ -894,18 +894,18 @@ public class LineArea extends Area { /** adds a InlineArea containing the String startChar+wordBuf to the line area children. */ private void addWord (char startChar, StringBuffer wordBuf) { String word = wordBuf.toString(); - InlineArea hia; + WordArea hia; int startCharWidth = this.currentFontState.width(startChar); if (startChar == ' ') { this.addChild(new InlineSpace(startCharWidth)); } else { - hia = new InlineArea(currentFontState, + hia = new WordArea(currentFontState, this.red, this.green, this.blue, new Character(startChar).toString(),1); this.addChild(hia); } int wordWidth = this.getWordWidth(word); - hia = new InlineArea(currentFontState, + hia = new WordArea(currentFontState, this.red, this.green, this.blue, word,word.length()); this.addChild(hia); diff --git a/src/org/apache/fop/render/Renderer.java b/src/org/apache/fop/render/Renderer.java index fb3bff7a3..5fcf18d16 100644 --- a/src/org/apache/fop/render/Renderer.java +++ b/src/org/apache/fop/render/Renderer.java @@ -55,6 +55,7 @@ import org.apache.fop.dom.svg.SVGArea; import org.apache.fop.image.ImageArea; import org.apache.fop.apps.FOPException; import org.apache.fop.layout.*; +import org.apache.fop.layout.inline.*; // Java import java.io.OutputStream; @@ -102,7 +103,7 @@ public interface Renderer { public void renderImageArea(ImageArea area); /** render the given inline area */ - public void renderInlineArea(InlineArea area); + public void renderWordArea(WordArea area); /** render the given inline space */ public void renderInlineSpace(InlineSpace space); diff --git a/src/org/apache/fop/render/awt/AWTRenderer.java b/src/org/apache/fop/render/awt/AWTRenderer.java index 1d6fd682f..52b90a7b1 100644 --- a/src/org/apache/fop/render/awt/AWTRenderer.java +++ b/src/org/apache/fop/render/awt/AWTRenderer.java @@ -10,6 +10,7 @@ package org.apache.fop.render.awt; */ import org.apache.fop.layout.*; +import org.apache.fop.layout.inline.*; import org.apache.fop.messaging.MessageHandler; import org.apache.fop.datatypes.*; import org.apache.fop.image.*; @@ -542,7 +543,7 @@ public class AWTRenderer implements Renderer, Printable, Pageable { } - public void renderInlineArea(InlineArea area) { + public void renderWordArea(WordArea area) { char ch; StringBuffer pdf = new StringBuffer(); diff --git a/src/org/apache/fop/render/pdf/PDFRenderer.java b/src/org/apache/fop/render/pdf/PDFRenderer.java index 275415462..0f29c65e6 100644 --- a/src/org/apache/fop/render/pdf/PDFRenderer.java +++ b/src/org/apache/fop/render/pdf/PDFRenderer.java @@ -59,6 +59,7 @@ import org.apache.fop.image.FopImage; import org.apache.fop.apps.FOPException; import org.apache.fop.fo.properties.*; import org.apache.fop.layout.*; +import org.apache.fop.layout.inline.*; import org.apache.fop.datatypes.*; import org.apache.fop.svg.PathPoint; import org.apache.fop.pdf.*; @@ -565,7 +566,7 @@ public class PDFRenderer implements Renderer { * * @param area inline area to render */ - public void renderInlineArea(InlineArea area) { + public void renderWordArea(WordArea area) { char ch; StringBuffer pdf = new StringBuffer(); diff --git a/src/org/apache/fop/render/xml/XMLRenderer.java b/src/org/apache/fop/render/xml/XMLRenderer.java index ff8e2defa..767ccab04 100644 --- a/src/org/apache/fop/render/xml/XMLRenderer.java +++ b/src/org/apache/fop/render/xml/XMLRenderer.java @@ -58,6 +58,7 @@ import org.apache.fop.dom.svg.SVGArea; import org.apache.fop.render.Renderer; import org.apache.fop.image.ImageArea; import org.apache.fop.layout.*; +import org.apache.fop.layout.inline.*; import org.apache.fop.pdf.*; import org.apache.fop.fo.properties.LeaderPattern; @@ -279,7 +280,7 @@ public class XMLRenderer implements Renderer { * * @param area the area to render */ - public void renderInlineArea(InlineArea area) { + public void renderWordArea(WordArea area) { String fontWeight = area.getFontState().getFontWeight(); StringBuffer sb = new StringBuffer(); String s = area.getText(); diff --git a/src/org/apache/fop/svg/SVG.java b/src/org/apache/fop/svg/SVG.java index bbf2d3634..b67b8c04e 100644 --- a/src/org/apache/fop/svg/SVG.java +++ b/src/org/apache/fop/svg/SVG.java @@ -55,9 +55,9 @@ package org.apache.fop.svg; import org.apache.fop.fo.*; import org.apache.fop.fo.properties.*; import org.apache.fop.layout.Area; -import org.apache.fop.layout.ForeignObjectArea; import org.apache.fop.layout.FontState; import org.apache.fop.apps.FOPException; +import org.apache.fop.layout.inline.*; import org.apache.fop.dom.svg.*; import org.w3c.dom.svg.*;