Package org.openxmlformats.schemas.spreadsheetml.x2006.main

Examples of org.openxmlformats.schemas.spreadsheetml.x2006.main.CTFontScheme


    assertEquals(FontFamily.MODERN.getValue(),xssfFont.getFamily());
  }

  public void testScheme() {
    CTFont ctFont=CTFont.Factory.newInstance();
    CTFontScheme scheme=ctFont.addNewScheme();
    scheme.setVal(STFontScheme.MAJOR);
    ctFont.setSchemeArray(0,scheme);

    XSSFFont font=new XSSFFont(ctFont);
    assertEquals(FontScheme.MAJOR,font.getScheme());
View Full Code Here


     *
     * @return FontScheme
     * @see org.apache.poi.xssf.model.StylesTable#createDefaultFont()
     */
    public FontScheme getScheme() {
        CTFontScheme scheme = _ctFont.sizeOfSchemeArray() == 0 ? null : _ctFont.getSchemeArray(0);
        return scheme == null ? FontScheme.NONE : FontScheme.valueOf(scheme.getVal().intValue());
    }
View Full Code Here

     *
     * @param scheme - FontScheme enum value
     * @see FontScheme
     */
    public void setScheme(FontScheme scheme) {
        CTFontScheme ctFontScheme = _ctFont.sizeOfSchemeArray() == 0 ? _ctFont.addNewScheme() : _ctFont.getSchemeArray(0);
        STFontScheme.Enum val = STFontScheme.Enum.forInt(scheme.getValue());
        ctFontScheme.setVal(val);
    }
View Full Code Here

    assertEquals(FontFamily.MODERN.getValue(),xssfFont.getFamily());
  }

  public void testScheme() {
    CTFont ctFont=CTFont.Factory.newInstance();
    CTFontScheme scheme=ctFont.addNewScheme();
    scheme.setVal(STFontScheme.MAJOR);
    ctFont.setSchemeArray(0,scheme);

    XSSFFont font=new XSSFFont(ctFont);
    assertEquals(FontScheme.MAJOR,font.getScheme());
View Full Code Here

     *
     * @return FontScheme
     * @see org.apache.poi.xssf.model.StylesTable#createDefaultFont()
     */
    public FontScheme getScheme() {
        CTFontScheme scheme = _ctFont.sizeOfSchemeArray() == 0 ? null : _ctFont.getSchemeArray(0);
        return scheme == null ? FontScheme.NONE : FontScheme.valueOf(scheme.getVal().intValue());
    }
View Full Code Here

     *
     * @param scheme - FontScheme enum value
     * @see FontScheme
     */
    public void setScheme(FontScheme scheme) {
        CTFontScheme ctFontScheme = _ctFont.sizeOfSchemeArray() == 0 ? _ctFont.addNewScheme() : _ctFont.getSchemeArray(0);
        STFontScheme.Enum val = STFontScheme.Enum.forInt(scheme.getValue());
        ctFontScheme.setVal(val);
    }
View Full Code Here

    assertEquals(FontFamily.MODERN.getValue(),xssfFont.getFamily());
  }

  public void testScheme() {
    CTFont ctFont=CTFont.Factory.newInstance();
    CTFontScheme scheme=ctFont.addNewScheme();
    scheme.setVal(STFontScheme.MAJOR);
    ctFont.setSchemeArray(0,scheme);

    XSSFFont font=new XSSFFont(ctFont);
    assertEquals(FontScheme.MAJOR,font.getScheme());
View Full Code Here

    assertEquals(FontFamily.MODERN.getValue(),xssfFont.getFamily());
  }

  public void testScheme() {
    CTFont ctFont=CTFont.Factory.newInstance();
    CTFontScheme scheme=ctFont.addNewScheme();
    scheme.setVal(STFontScheme.MAJOR);
    ctFont.setSchemeArray(0,scheme);

    XSSFFont font=new XSSFFont(ctFont);
    assertEquals(FontScheme.MAJOR,font.getScheme());
View Full Code Here

    // solo di xssfFont - non di Font-
    //sono utilizzati nel metodo createDefaultFont in StylesTable insta.

    public int getScheme(){
        CTFontScheme scheme=ctFont.sizeOfSchemeArray()==0?null:ctFont.getSchemeArray(0);
        if(scheme!=null){
            int fontScheme = scheme.getVal().intValue();
            switch (fontScheme) {
            case STFontScheme.INT_MAJOR:
                return XSSFFont.SCHEME_MAJOR;
            case STFontScheme.INT_MINOR:
                return XSSFFont.SCHEME_MINOR;
View Full Code Here

        return 0;
    }


      public void setScheme(int scheme){
         CTFontScheme ctFontScheme=ctFont.sizeOfSchemeArray()==0?ctFont.addNewScheme():ctFont.getSchemeArray(0);
        switch (scheme) {
        case XSSFFont.SCHEME_MAJOR:
            ctFontScheme.setVal(STFontScheme.MAJOR);
            break;
        case XSSFFont.SCHEME_MINOR:
            ctFontScheme.setVal(STFontScheme.MINOR);
            break;
        case XSSFFont.SCHEME_NONE:
            ctFontScheme.setVal(STFontScheme.NONE);
            break;
        default:
            throw new RuntimeException("Schema value ["+ scheme +"] not supported in XSSFFont");
        }
    }
View Full Code Here

TOP

Related Classes of org.openxmlformats.schemas.spreadsheetml.x2006.main.CTFontScheme

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.