Search in sources :

Example 1 with LineCompound

use of org.apache.poi.sl.usermodel.StrokeStyle.LineCompound in project poi by apache.

the class HSLFTableCell method setBorderStyle.

@Override
public void setBorderStyle(BorderEdge edge, StrokeStyle style) {
    if (style == null) {
        throw new IllegalArgumentException("StrokeStyle needs to be specified.");
    }
    // setting the line cap is not implemented, as the border lines aren't connected
    LineCompound compound = style.getLineCompound();
    if (compound != null) {
        setBorderCompound(edge, compound);
    }
    LineDash dash = style.getLineDash();
    if (dash != null) {
        setBorderDash(edge, dash);
    }
    double width = style.getLineWidth();
    setBorderWidth(edge, width);
}
Also used : LineCompound(org.apache.poi.sl.usermodel.StrokeStyle.LineCompound) LineDash(org.apache.poi.sl.usermodel.StrokeStyle.LineDash)

Example 2 with LineCompound

use of org.apache.poi.sl.usermodel.StrokeStyle.LineCompound in project poi by apache.

the class XSLFTableCell method setBorderStyle.

@Override
public void setBorderStyle(BorderEdge edge, StrokeStyle style) {
    if (style == null) {
        throw new IllegalArgumentException("StrokeStyle needs to be specified.");
    }
    LineCap cap = style.getLineCap();
    if (cap != null) {
        setBorderCap(edge, cap);
    }
    LineCompound compound = style.getLineCompound();
    if (compound != null) {
        setBorderCompound(edge, compound);
    }
    LineDash dash = style.getLineDash();
    if (dash != null) {
        setBorderDash(edge, dash);
    }
    double width = style.getLineWidth();
    setBorderWidth(edge, width);
}
Also used : LineCompound(org.apache.poi.sl.usermodel.StrokeStyle.LineCompound) LineDash(org.apache.poi.sl.usermodel.StrokeStyle.LineDash) LineCap(org.apache.poi.sl.usermodel.StrokeStyle.LineCap) STLineCap(org.openxmlformats.schemas.drawingml.x2006.main.STLineCap)

Aggregations

LineCompound (org.apache.poi.sl.usermodel.StrokeStyle.LineCompound)2 LineDash (org.apache.poi.sl.usermodel.StrokeStyle.LineDash)2 LineCap (org.apache.poi.sl.usermodel.StrokeStyle.LineCap)1 STLineCap (org.openxmlformats.schemas.drawingml.x2006.main.STLineCap)1