aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/tools
diff options
context:
space:
mode:
authorGlen Mazza <gmazza@apache.org>2003-10-28 04:22:14 +0000
committerGlen Mazza <gmazza@apache.org>2003-10-28 04:22:14 +0000
commit153b66c5d6b402f88f10101614c73b2fe188618d (patch)
tree92242a16295065a0ad5b596bc894759dd95bc8c9 /src/java/org/apache/fop/tools
parenta25886fa6eb7c702e71c46e2921e57c449344ee2 (diff)
downloadxmlgraphics-fop-153b66c5d6b402f88f10101614c73b2fe188618d.tar.gz
xmlgraphics-fop-153b66c5d6b402f88f10101614c73b2fe188618d.zip
renamed org.apache.fop.area.inline.Word to .TextArea (.Text not used to avoid
conflicts with org.w3c.dom.Text) changed Renderer.renderWord() method to renderText(). git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@196973 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/tools')
-rw-r--r--src/java/org/apache/fop/tools/AreaTreeBuilder.java26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/java/org/apache/fop/tools/AreaTreeBuilder.java b/src/java/org/apache/fop/tools/AreaTreeBuilder.java
index 244093990..d0fe8f973 100644
--- a/src/java/org/apache/fop/tools/AreaTreeBuilder.java
+++ b/src/java/org/apache/fop/tools/AreaTreeBuilder.java
@@ -99,7 +99,7 @@ import org.apache.fop.area.inline.InlineArea;
import org.apache.fop.area.inline.Leader;
import org.apache.fop.area.inline.Space;
import org.apache.fop.area.inline.Viewport;
-import org.apache.fop.area.inline.Word;
+import org.apache.fop.area.inline.TextArea;
import org.apache.fop.apps.Document;
import org.apache.fop.fonts.Font;
import org.apache.fop.render.Renderer;
@@ -589,13 +589,13 @@ class TreeLoader extends AbstractLogEnabled {
FontMetrics metrics = fontInfo.getMetricsFor(fname);
currentFontState =
new Font(fname, metrics, 12000);
- Word word = getWord((Element) obj);
+ TextArea text = getText((Element) obj);
- word.addTrait(Trait.FONT_NAME, fname);
- word.addTrait(Trait.FONT_SIZE, new Integer(12000));
+ text.addTrait(Trait.FONT_NAME, fname);
+ text.addTrait(Trait.FONT_SIZE, new Integer(12000));
- if (word != null) {
- list.add(word);
+ if (text != null) {
+ list.add(text);
}
} else {
}
@@ -723,19 +723,19 @@ class TreeLoader extends AbstractLogEnabled {
return leader;
}
- Word getWord(Element root) {
+ TextArea getText(Element root) {
String str = getString(root);
- Word word = new Word();
- word.setWord(str);
- addTraits(root, word);
+ TextArea text = new TextArea();
+ text.setTextArea(str);
+ addTraits(root, text);
int width = 0;
for (int count = 0; count < str.length(); count++) {
width += currentFontState.getWidth(str.charAt(count));
}
- word.setWidth(width);
- word.setOffset(currentFontState.getCapHeight());
+ text.setWidth(width);
+ text.setOffset(currentFontState.getCapHeight());
- return word;
+ return text;
}