Package org.apache.fop.area.inline

Examples of org.apache.fop.area.inline.TextArea.addWord()


        } else if (fobj.getLeaderPattern() == EN_DOTS) {
            TextArea t = new TextArea();
            char dot = '.'; // userAgent.getLeaderDotCharacter();

            int width = font.getCharWidth(dot);
            t.addWord("" + dot, 0);
            t.setIPD(width);
            t.setBPD(width);
            t.setBaselineOffset(width);
            t.addTrait(Trait.FONT_NAME, font.getFontName());
            t.addTrait(Trait.FONT_SIZE, new Integer(font.getFontSize()));
View Full Code Here


                        && i == lastIndex
                        && areaInfo.bHyphenated) {
                        // add the hyphenation character
                        wordChars += foText.getCommonHyphenation().hyphenationCharacter;
                    }
                    textArea.addWord(wordChars, 0);
                    wordStartIndex = -1;
                }
            }
        }
        textArea.addTrait(Trait.FONT_NAME, font.getFontName());
View Full Code Here

    public InlineArea get(LayoutContext context) {
        // get page string from parent, build area
        TextArea text = new TextArea();
        String str = getCurrentPV().getPageNumberString();
        int width = getStringWidth(str);
        text.addWord(str, 0);
        text.setIPD(width);
        text.setBPD(font.getAscender() - font.getDescender());
        text.setBaselineOffset(font.getAscender());
        text.addTrait(Trait.FONT_NAME, font.getFontName());
        text.addTrait(Trait.FONT_SIZE,
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.