12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- import 'package:fis_lib_report/report/element_type.dart';
- import 'package:fis_lib_report/report/interfaces/report_element.dart';
- import 'package:fis_lib_report/report/rt_table.dart';
- import 'package:fis_lib_report/report_info/block_element_info_interface.dart';
- import 'package:fis_lib_report/report_info/element_info.dart';
- import 'package:fis_lib_report/report_info/rt_grid.dart';
- class RTTableInfo extends RTGridInfo implements IBlockElementInfo {
- bool? autoHide;
- bool? isAverageColumnWidth;
- bool? allowBreakAcrossPages;
- bool allowEmptyCell = false;
- @override
- List<ElementInfo>? elementInfos;
- RTTableInfo() : super();
- RTTableInfo.fromElement(
- RTTable table, {
- this.allowEmptyCell = false,
- }) : super.fromElement(table) {
- autoHide = table.autoHide;
- isAverageColumnWidth = table.isAverageColumnWidth;
- allowBreakAcrossPages = table.allowBreakAcrossPages;
- }
- @override
- Map<String, dynamic> toJson() {
- final map = <String, dynamic>{};
- map.addAll(super.toJson());
- return map;
- }
- /// 深拷贝方法
- RTTableInfo clone() {
- final tableInfo = RTTableInfo();
- tableInfo.elementType = elementType;
- tableInfo.index = index;
- tableInfo.measureTag = measureTag;
- tableInfo.parent = parent;
- tableInfo.tag = tag;
- tableInfo.id = id;
- tableInfo.element = element;
- tableInfo.columnDefinitions = columnDefinitions;
- tableInfo.rowDefinitions = rowDefinitions;
- tableInfo.isDelete = isDelete;
- tableInfo.isInsertColumn = isInsertColumn;
- tableInfo.deleteRowIndex = deleteRowIndex;
- tableInfo.deleteColumnIndex = deleteColumnIndex;
- tableInfo.isMergeCell = isMergeCell;
- tableInfo.mergeDeleteStartColumnIndex = mergeDeleteStartColumnIndex;
- tableInfo.mergeDeleteEndColumnIndex = mergeDeleteEndColumnIndex;
- tableInfo.cells = cells;
- tableInfo.autoHide = autoHide;
- tableInfo.isAverageColumnWidth = isAverageColumnWidth;
- tableInfo.allowBreakAcrossPages = allowBreakAcrossPages;
- tableInfo.elementInfos = elementInfos;
- return tableInfo;
- }
- }
|