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

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


    CTFill[] ctFill = createDefaultFills();
    fills.add(new XSSFCellFill(ctFill[0]));
    fills.add(new XSSFCellFill(ctFill[1]));

    CTBorder ctBorder = createDefaultBorder();
    borders.add(new XSSFCellBorder(ctBorder));

    CTXf styleXf = createDefaultXf();
    styleXfs.add(styleXf);
    CTXf xf = createDefaultXf();
View Full Code Here


    ctXf.setFillId(0);
    ctXf.setBorderId(0);
    return ctXf;
  }
  private static CTBorder createDefaultBorder() {
    CTBorder ctBorder = CTBorder.Factory.newInstance();
    ctBorder.addNewBottom();
    ctBorder.addNewTop();
    ctBorder.addNewLeft();
    ctBorder.addNewRight();
    ctBorder.addNewDiagonal();
    return ctBorder;
  }
View Full Code Here

    CTFill[] ctFill = createDefaultFills();
    fills.add(new XSSFCellFill(ctFill[0]));
    fills.add(new XSSFCellFill(ctFill[1]));

    CTBorder ctBorder = createDefaultBorder();
    borders.add(new XSSFCellBorder(ctBorder));

    CTXf styleXf = createDefaultXf();
    styleXfs.add(styleXf);
    CTXf xf = createDefaultXf();
View Full Code Here

    ctXf.setFillId(0);
    ctXf.setBorderId(0);
    return ctXf;
  }
  private static CTBorder createDefaultBorder() {
    CTBorder ctBorder = CTBorder.Factory.newInstance();
    ctBorder.addNewBottom();
    ctBorder.addNewTop();
    ctBorder.addNewLeft();
    ctBorder.addNewRight();
    ctBorder.addNewDiagonal();
    return ctBorder;
  }
View Full Code Here

public class TestXSSFBorder extends TestCase {
 
  public void testGetBorderStyle() {
    CTStylesheet stylesheet = CTStylesheet.Factory.newInstance();
    CTBorder border = stylesheet.addNewBorders().addNewBorder();
    CTBorderPr top = border.addNewTop();
    CTBorderPr right = border.addNewRight();
    CTBorderPr bottom = border.addNewBottom();
    top.setStyle(STBorderStyle.DASH_DOT);
    right.setStyle(STBorderStyle.NONE);
    bottom.setStyle(STBorderStyle.THIN);
    XSSFCellBorder cellBorderStyle = new XSSFCellBorder(border);
    assertEquals("dashDot", cellBorderStyle.getBorderStyle(BorderSide.TOP).toString());
View Full Code Here

      fonts.add(ctFont);
     
      CTFill ctFill = createDefaultFill();
      fills.add(ctFill);
     
      CTBorder ctBorder = createDefaultBorder();
      borders.add(ctBorder);
     
      CTXf styleXf = createDefaultXf();
      styleXfs.add(styleXf);
      CTXf xf = createDefaultXf();
View Full Code Here

      ctXf.setFillId(0);
      ctXf.setBorderId(0);
      return ctXf;
  }
  private CTBorder createDefaultBorder() {
    CTBorder ctBorder = CTBorder.Factory.newInstance();
      ctBorder.addNewBottom();
      ctBorder.addNewTop();
      ctBorder.addNewLeft();
      ctBorder.addNewRight();
      ctBorder.addNewDiagonal();
    return ctBorder;
  }
View Full Code Here

     */
    public short getBorderBottom() {
        if(!_cellXf.getApplyBorder()) return BORDER_NONE;

        int idx = (int)_cellXf.getBorderId();
        CTBorder ct = _stylesSource.getBorderAt(idx).getCTBorder();
        STBorderStyle.Enum ptrn = ct.isSetBottom() ? ct.getBottom().getStyle() : null;
        return ptrn == null ? BORDER_NONE : (short)(ptrn.intValue() - 1);
    }
View Full Code Here

     */
    public short getBorderLeft() {
        if(!_cellXf.getApplyBorder()) return BORDER_NONE;

        int idx = (int)_cellXf.getBorderId();
        CTBorder ct = _stylesSource.getBorderAt(idx).getCTBorder();
        STBorderStyle.Enum ptrn = ct.isSetLeft() ? ct.getLeft().getStyle() : null;
        return ptrn == null ? BORDER_NONE : (short)(ptrn.intValue() - 1);
    }
View Full Code Here

     */
    public short getBorderRight() {
        if(!_cellXf.getApplyBorder()) return BORDER_NONE;

        int idx = (int)_cellXf.getBorderId();
        CTBorder ct = _stylesSource.getBorderAt(idx).getCTBorder();
        STBorderStyle.Enum ptrn = ct.isSetRight() ? ct.getRight().getStyle() : null;
        return ptrn == null ? BORDER_NONE : (short)(ptrn.intValue() - 1);
    }
View Full Code Here

TOP

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

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.