Examples of CTLineProperties


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

        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.CTLineProperties

    }

    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.CTLineProperties

    }

    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.CTLineProperties

        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.CTLineProperties

    /**
     * The color applied to the lines of this shape.
     */
    public void setLineStyleColor( int red, int green, int blue ) {
        CTShapeProperties props = getShapeProperties();
        CTLineProperties ln = props.isSetLn() ? props.getLn() : props.addNewLn();
        CTSolidColorFillProperties fill = ln.isSetSolidFill() ? ln.getSolidFill() : ln.addNewSolidFill();
        CTSRgbColor rgb = CTSRgbColor.Factory.newInstance();
        rgb.setVal(new byte[]{(byte)red, (byte)green, (byte)blue});
        fill.setSrgbClr(rgb);
    }
View Full Code Here

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

     *
     * @param lineWidth width in points
     */
    public void setLineWidth( double lineWidth ) {
        CTShapeProperties props = getShapeProperties();
        CTLineProperties ln = props.isSetLn() ? props.getLn() : props.addNewLn();
        ln.setW((int)(lineWidth*EMU_PER_POINT));
    }
View Full Code Here

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

     *
     * @param lineStyle
     */
    public void setLineStyle( int lineStyle ) {
        CTShapeProperties props = getShapeProperties();
        CTLineProperties ln = props.isSetLn() ? props.getLn() : props.addNewLn();
        CTPresetLineDashProperties dashStyle = CTPresetLineDashProperties.Factory.newInstance();
        dashStyle.setVal(STPresetLineDashVal.Enum.forInt(lineStyle+1));
        ln.setPrstDash(dashStyle);
    }
View Full Code Here

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

        nvSpPr.addNewNvPr();
        CTShapeProperties spPr = ct.addNewSpPr();
        CTPresetGeometry2D prst = spPr.addNewPrstGeom();
        prst.setPrst(STShapeType.LINE);
        prst.addNewAvLst();
        CTLineProperties ln = spPr.addNewLn();
        return ct;
    }
View Full Code Here

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

    }

    public Paint getLinePaint(final Graphics2D graphics) {
        PropertyFetcher<Paint> fetcher = new PropertyFetcher<Paint>() {
            public boolean fetch(XSLFSimpleShape shape) {
                CTLineProperties spPr = shape.getSpPr().getLn();
                if (spPr != null) {
                    if (spPr.isSetNoFill()) {
                        setValue(NO_PAINT); // use it as 'nofill' value
                        return true;
                    }
                    Paint paint = getPaint(graphics, spPr, null);
                    if (paint != null) {
View Full Code Here

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

    }

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

        CTLineProperties ln = pr.isSetLnL() ? pr.getLnL() : pr.addNewLnL();
        ln.setW(Units.toEMU(width));
    }
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.