Examples of CTIntProperty


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

    assertEquals(true, ctFont.getBArray(0).getVal());
  }

  public void testCharSet() {
    CTFont ctFont=CTFont.Factory.newInstance();
    CTIntProperty prop=ctFont.addNewCharset();
    prop.setVal(FontCharset.ANSI.getValue());

    ctFont.setCharsetArray(0,prop);
    XSSFFont xssfFont=new XSSFFont(ctFont);
    assertEquals(Font.ANSI_CHARSET,xssfFont.getCharSet());
View Full Code Here

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

    assertEquals(IndexedColors.RED.getIndex(),ctFont.getColorArray(0).getTheme());
  }

  public void testFamily() {
    CTFont ctFont=CTFont.Factory.newInstance();
    CTIntProperty family=ctFont.addNewFamily();
    family.setVal(FontFamily.MODERN.getValue());
    ctFont.setFamilyArray(0,family);

    XSSFFont xssfFont=new XSSFFont(ctFont);
    assertEquals(FontFamily.MODERN.getValue(),xssfFont.getFamily());
  }
View Full Code Here

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

     *
     * @return byte - character-set
     * @see org.apache.poi.ss.usermodel.FontCharset
     */
    public byte getCharSet() {
        CTIntProperty charset = _ctFont.sizeOfCharsetArray() == 0 ? null : _ctFont.getCharsetArray(0);
        int val = charset == null ? FontCharset.ANSI.getValue() : FontCharset.valueOf(charset.getVal()).getValue();
        return (byte)val;
    }
View Full Code Here

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

     *
     * @param charset - charset
     * @see FontCharset
     */
    public void setCharSet(byte charset) {
        CTIntProperty charsetProperty = _ctFont.sizeOfCharsetArray() == 0 ? _ctFont.addNewCharset() : _ctFont.getCharsetArray(0);
        switch (charset) {
            case Font.ANSI_CHARSET:
                charsetProperty.setVal(FontCharset.ANSI.getValue());
                break;
            case Font.SYMBOL_CHARSET:
                charsetProperty.setVal(FontCharset.SYMBOL.getValue());
                break;
            case Font.DEFAULT_CHARSET:
                charsetProperty.setVal(FontCharset.DEFAULT.getValue());
                break;
            default:
                throw new POIXMLException("Attention: an attempt to set a type of unknow charset and charset");
        }
    }
View Full Code Here

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

     *
     * @return the font family to use
     * @see org.apache.poi.ss.usermodel.FontFamily
     */
    public int getFamily() {
        CTIntProperty family = _ctFont.sizeOfFamilyArray() == 0 ? _ctFont.addNewFamily() : _ctFont.getFamilyArray(0);
        return family == null ? FontFamily.NOT_APPLICABLE.getValue() : FontFamily.valueOf(family.getVal()).getValue();
    }
View Full Code Here

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

     *
     * @param value - font family
     * @see FontFamily
     */
    public void setFamily(int value) {
        CTIntProperty family = _ctFont.sizeOfFamilyArray() == 0 ? _ctFont.addNewFamily() : _ctFont.getFamilyArray(0);
        family.setVal(value);
    }
View Full Code Here

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

    assertEquals(true, ctFont.getBArray(0).getVal());
  }

  public void testCharSet() {
    CTFont ctFont=CTFont.Factory.newInstance();
    CTIntProperty prop=ctFont.addNewCharset();
    prop.setVal(FontCharset.ANSI.getValue());

    ctFont.setCharsetArray(0,prop);
    XSSFFont xssfFont=new XSSFFont(ctFont);
    assertEquals(Font.ANSI_CHARSET,xssfFont.getCharSet());
View Full Code Here

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

    assertEquals(IndexedColors.RED.getIndex(),ctFont.getColorArray(0).getTheme());
  }

  public void testFamily() {
    CTFont ctFont=CTFont.Factory.newInstance();
    CTIntProperty family=ctFont.addNewFamily();
    family.setVal(FontFamily.MODERN.getValue());
    ctFont.setFamilyArray(0,family);

    XSSFFont xssfFont=new XSSFFont(ctFont);
    assertEquals(FontFamily.MODERN.getValue(),xssfFont.getFamily());
  }
View Full Code Here

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

    assertEquals(true, ctFont.getBArray(0).getVal());
  }

  public void testCharSet() {
    CTFont ctFont=CTFont.Factory.newInstance();
    CTIntProperty prop=ctFont.addNewCharset();
    prop.setVal(FontCharset.ANSI.getValue());

    ctFont.setCharsetArray(0,prop);
    XSSFFont xssfFont=new XSSFFont(ctFont);
    assertEquals(Font.ANSI_CHARSET,xssfFont.getCharSet());
View Full Code Here

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

    assertEquals(IndexedColors.RED.getIndex(),ctFont.getColorArray(0).getTheme());
  }

  public void testFamily() {
    CTFont ctFont=CTFont.Factory.newInstance();
    CTIntProperty family=ctFont.addNewFamily();
    family.setVal(FontFamily.MODERN.getValue());
    ctFont.setFamilyArray(0,family);

    XSSFFont xssfFont=new XSSFFont(ctFont);
    assertEquals(FontFamily.MODERN.getValue(),xssfFont.getFamily());
  }
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.