2021-03-20 17:16:43 +02:00
|
|
|
import { BorderType } from "./border";
|
2020-04-27 04:41:23 +03:00
|
|
|
|
2021-03-16 09:09:39 +02:00
|
|
|
export type TableCellBorderPosition =
|
2020-04-30 08:38:56 +03:00
|
|
|
| "left"
|
|
|
|
| "right"
|
|
|
|
| "top"
|
|
|
|
| "bottom"
|
|
|
|
| "insideH"
|
2021-03-16 09:09:39 +02:00
|
|
|
| "insideV"
|
|
|
|
| "tl2br"
|
|
|
|
| "tr2bl";
|
2020-04-27 04:41:23 +03:00
|
|
|
|
|
|
|
export class TableCellBorder {
|
|
|
|
_border_type: BorderType;
|
|
|
|
_size = 2;
|
|
|
|
_color = "000000";
|
2021-03-16 09:09:39 +02:00
|
|
|
position: TableCellBorderPosition;
|
2020-04-27 04:41:23 +03:00
|
|
|
space = 0;
|
|
|
|
|
2021-03-16 09:09:39 +02:00
|
|
|
constructor(position: TableCellBorderPosition) {
|
2020-04-27 04:41:23 +03:00
|
|
|
this.position = position;
|
|
|
|
}
|
|
|
|
|
|
|
|
color(color: string) {
|
|
|
|
this._color = color;
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
size(size: number) {
|
|
|
|
this._size = size;
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
border_type(border_type: BorderType) {
|
|
|
|
this._border_type = border_type;
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
}
|