Package org.openxmlformats.schemas.wordprocessingml.x2006.main

Examples of org.openxmlformats.schemas.wordprocessingml.x2006.main.CTFonts


     *
     * @param fontFamily
     */
    public void setFontFamily(String fontFamily) {
        CTRPr pr = run.getRPr();
        CTFonts fonts = pr.isSetRFonts() ? pr.getRFonts() : pr.addNewRFonts();
        fonts.setAscii(fontFamily);
    }
View Full Code Here


    CTDecimalNumber id = sdtPr.addNewId();
    id.setVal(new BigInteger("4844945"));
    sdtPr.addNewDocPartObj().addNewDocPartGallery().setVal("Table of contents");
    CTSdtEndPr sdtEndPr = block.addNewSdtEndPr();
    CTRPr rPr = sdtEndPr.addNewRPr();
    CTFonts fonts = rPr.addNewRFonts();
    fonts.setAsciiTheme(STTheme.MINOR_H_ANSI);
    fonts.setEastAsiaTheme(STTheme.MINOR_H_ANSI);
    fonts.setHAnsiTheme(STTheme.MINOR_H_ANSI);
    fonts.setCstheme(STTheme.MINOR_BIDI);
    rPr.addNewB().setVal(STOnOff.OFF);
    rPr.addNewBCs().setVal(STOnOff.OFF);
    rPr.addNewColor().setVal("auto");
    rPr.addNewSz().setVal(new BigInteger("24"));
    rPr.addNewSzCs().setVal(new BigInteger("24"));
View Full Code Here

     *
     * @param fontFamily
     */
    public void setFontFamily(String fontFamily) {
        CTRPr pr = run.isSetRPr() ? run.getRPr() : run.addNewRPr();
        CTFonts fonts = pr.isSetRFonts() ? pr.getRFonts() : pr.addNewRFonts();
        fonts.setAscii(fontFamily);
    }
View Full Code Here

     *
     * @param fontFamily
     */
    public void setFontFamily(String fontFamily) {
        CTRPr pr = run.isSetRPr() ? run.getRPr() : run.addNewRPr();
        CTFonts fonts = pr.isSetRFonts() ? pr.getRFonts() : pr.addNewRFonts();
        fonts.setAscii(fontFamily);
    }
View Full Code Here

     */
    public String getFontFamily(FontCharRange fcr) {
        CTRPr pr = run.getRPr();
        if (pr == null || !pr.isSetRFonts()) return null;
       
        CTFonts fonts = pr.getRFonts();
        switch (fcr == null ? FontCharRange.ascii : fcr) {
        default:
        case ascii:
            return fonts.getAscii();
        case cs:
            return fonts.getCs();
        case eastAsia:
            return fonts.getEastAsia();
        case hAnsi:
            return fonts.getHAnsi();
        }
    }
View Full Code Here

     * @param fontFamily
     * @param fcr FontCharRange or null for default handling
     */
    public void setFontFamily(String fontFamily, FontCharRange fcr) {
        CTRPr pr = run.isSetRPr() ? run.getRPr() : run.addNewRPr();
        CTFonts fonts = pr.isSetRFonts() ? pr.getRFonts() : pr.addNewRFonts();
       
        if (fcr == null) {
            fonts.setAscii(fontFamily);
            if (!fonts.isSetHAnsi()) {
                fonts.setHAnsi(fontFamily);
            }
            if (!fonts.isSetCs()) {
                fonts.setCs(fontFamily);
            }
            if (!fonts.isSetEastAsia()) {
                fonts.setEastAsia(fontFamily);
            }
        } else {
            switch (fcr) {
            case ascii:
                fonts.setAscii(fontFamily);
                break;
            case cs:
                fonts.setCs(fontFamily);
                break;
            case eastAsia:
                fonts.setEastAsia(fontFamily);
                break;
            case hAnsi:
                fonts.setHAnsi(fontFamily);
                break;
            }
        }
    }
View Full Code Here

     *
     * @param fontFamily
     */
    public void setFontFamily(String fontFamily) {
        CTRPr pr = run.getRPr();
        CTFonts fonts = pr.isSetRFonts() ? pr.getRFonts() : pr.addNewRFonts();
        fonts.setAscii(fontFamily);
    }
View Full Code Here

     *
     * @param fontFamily
     */
    public void setFontFamily(String fontFamily) {
        CTRPr pr = run.getRPr();
        CTFonts fonts = pr.isSetRFonts() ? pr.getRFonts() : pr.addNewRFonts();
        fonts.setAscii(fontFamily);
    }
View Full Code Here

     *
     * @param fontFamily
     */
    public void setFontFamily(String fontFamily) {
        CTRPr pr = run.isSetRPr() ? run.getRPr() : run.addNewRPr();
        CTFonts fonts = pr.isSetRFonts() ? pr.getRFonts() : pr.addNewRFonts();
        fonts.setAscii(fontFamily);
    }
View Full Code Here

     *
     * @param fontFamily
     */
    public void setFontFamily(String fontFamily) {
        CTRPr pr = run.getRPr();
        CTFonts fonts = pr.isSetRFonts() ? pr.getRFonts() : pr.addNewRFonts();
        fonts.setAscii(fontFamily);
    }
View Full Code Here

TOP

Related Classes of org.openxmlformats.schemas.wordprocessingml.x2006.main.CTFonts

Copyright © 2018 www.massapicom. 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.