Examples of CTTableCellProperties


Examples of org.openxmlformats.schemas.drawingml.x2006.main.CTTableCellProperties

        CTLineProperties ln = pr.getLnT();
        return ln == null || !ln.isSetW() ? defaultBorderWidth : Units.toPoints(ln.getW());
    }

    public void setBorderTopColor(Color color){
        CTTableCellProperties pr = getXmlObject().getTcPr();
        CTLineProperties ln = pr.isSetLnT() ? pr.getLnT() : pr.addNewLnT();
        setLineColor(ln, color);
    }
View Full Code Here

Examples of org.openxmlformats.schemas.drawingml.x2006.main.CTTableCellProperties

    public Color getBorderTopColor(){
        return getLineColor(getXmlObject().getTcPr().getLnT());
    }

    public void setBorderBottom(double width){
        CTTableCellProperties pr = getXmlObject().getTcPr();

        CTLineProperties ln = pr.isSetLnB() ? pr.getLnB() : pr.addNewLnB();
        ln.setW(Units.toEMU(width));
    }
View Full Code Here

Examples of org.openxmlformats.schemas.drawingml.x2006.main.CTTableCellProperties

        CTLineProperties ln = pr.isSetLnB() ? pr.getLnB() : pr.addNewLnB();
        ln.setW(Units.toEMU(width));
    }

    public double getBorderBottom(){
        CTTableCellProperties pr = getXmlObject().getTcPr();

        CTLineProperties ln = pr.getLnB();
        return ln == null || !ln.isSetW() ? defaultBorderWidth : Units.toPoints(ln.getW());
    }
View Full Code Here

Examples of org.openxmlformats.schemas.drawingml.x2006.main.CTTableCellProperties

        CTLineProperties ln = pr.getLnB();
        return ln == null || !ln.isSetW() ? defaultBorderWidth : Units.toPoints(ln.getW());
    }

    public void setBorderBottomColor(Color color){
        CTTableCellProperties pr = getXmlObject().getTcPr();
        CTLineProperties ln = pr.isSetLnB() ? pr.getLnB() : pr.addNewLnB();
        setLineColor(ln, color);
    }
View Full Code Here

Examples of org.openxmlformats.schemas.drawingml.x2006.main.CTTableCellProperties

     * @param color the solid color fill.
     * The value of <code>null</code> unsets the solidFIll attribute from the underlying xml
     */
    @Override
    public void setFillColor(Color color) {
        CTTableCellProperties spPr = getXmlObject().getTcPr();
        if (color == null) {
            if(spPr.isSetSolidFill()) spPr.unsetSolidFill();
        }
        else {
            CTSolidColorFillProperties fill = spPr.isSetSolidFill() ? spPr.getSolidFill() : spPr.addNewSolidFill();

            CTSRgbColor rgb = CTSRgbColor.Factory.newInstance();
            rgb.setVal(new byte[]{(byte) color.getRed(), (byte) color.getGreen(), (byte) color.getBlue()});

            fill.setSrgbClr(rgb);
View Full Code Here

Examples of org.openxmlformats.schemas.drawingml.x2006.main.CTTableCellProperties

     *
     * @return solid fill color of null if not set
     */
    @Override
    public Color getFillColor(){
        CTTableCellProperties spPr = getXmlObject().getTcPr();
        if(!spPr.isSetSolidFill() ) return null;

        CTSolidColorFillProperties fill = spPr.getSolidFill();
        if(!fill.isSetSrgbClr()) {
            // TODO for now return null for all colors except explicit RGB
            return null;
        }
        byte[] val = fill.getSrgbClr().getVal();
View Full Code Here

Examples of org.openxmlformats.schemas.drawingml.x2006.main.CTTableCellProperties

      getXmlObject().setVMerge(merge_);
    }
   
    @Override
    public void setVerticalAlignment(VerticalAlignment anchor){
      CTTableCellProperties cellProps = getXmlObject().getTcPr();
      if(cellProps != null) {
        if(anchor == null) {
          if(cellProps.isSetAnchor()) {
            cellProps.unsetAnchor();
          }
        } else {
        cellProps.setAnchor(STTextAnchoringType.Enum.forInt(anchor.ordinal() + 1));
      }
      }
    }
View Full Code Here

Examples of org.openxmlformats.schemas.drawingml.x2006.main.CTTableCellProperties

      }
    }

    @Override
    public VerticalAlignment getVerticalAlignment(){
        CTTableCellProperties cellProps = getXmlObject().getTcPr();

        VerticalAlignment align = VerticalAlignment.TOP;
        if(cellProps != null && cellProps.isSetAnchor()) {
            int ival = cellProps.getAnchor().intValue();
            align = VerticalAlignment.values()[ival - 1];
        }
        return align;
     }
View Full Code Here

Examples of org.openxmlformats.schemas.drawingml.x2006.main.CTTableCellProperties

        return txBody;
    }

    static CTTableCell prototype() {
        CTTableCell cell = CTTableCell.Factory.newInstance();
        CTTableCellProperties pr = cell.addNewTcPr();
        pr.addNewLnL().addNewNoFill();
        pr.addNewLnR().addNewNoFill();
        pr.addNewLnT().addNewNoFill();
        pr.addNewLnB().addNewNoFill();
        return cell;
    }
View Full Code Here

Examples of org.openxmlformats.schemas.drawingml.x2006.main.CTTableCellProperties

        return cell;
    }

    @Override
    public void setLeftInset(double margin){
        CTTableCellProperties pr = getXmlObject().getTcPr();
        if(pr == null) pr = getXmlObject().addNewTcPr();

        pr.setMarL(Units.toEMU(margin));
    }
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.