|
|
@ -39,6 +39,7 @@ import com.alibaba.excel.metadata.property.StyleProperty; |
|
|
|
* @author jipengfei |
|
|
|
* @author jipengfei |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public class ExcelWriteHeadProperty extends ExcelHeadProperty { |
|
|
|
public class ExcelWriteHeadProperty extends ExcelHeadProperty { |
|
|
|
|
|
|
|
|
|
|
|
private RowHeightProperty headRowHeightProperty; |
|
|
|
private RowHeightProperty headRowHeightProperty; |
|
|
|
private RowHeightProperty contentRowHeightProperty; |
|
|
|
private RowHeightProperty contentRowHeightProperty; |
|
|
|
private OnceAbsoluteMergeProperty onceAbsoluteMergeProperty; |
|
|
|
private OnceAbsoluteMergeProperty onceAbsoluteMergeProperty; |
|
|
@ -49,21 +50,24 @@ public class ExcelWriteHeadProperty extends ExcelHeadProperty { |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
this.headRowHeightProperty = |
|
|
|
this.headRowHeightProperty = |
|
|
|
RowHeightProperty.build((HeadRowHeight)headClazz.getAnnotation(HeadRowHeight.class)); |
|
|
|
RowHeightProperty.build((HeadRowHeight) headClazz.getAnnotation(HeadRowHeight.class)); |
|
|
|
this.contentRowHeightProperty = |
|
|
|
this.contentRowHeightProperty = |
|
|
|
RowHeightProperty.build((ContentRowHeight)headClazz.getAnnotation(ContentRowHeight.class)); |
|
|
|
RowHeightProperty.build((ContentRowHeight) headClazz.getAnnotation(ContentRowHeight.class)); |
|
|
|
this.onceAbsoluteMergeProperty = |
|
|
|
this.onceAbsoluteMergeProperty = |
|
|
|
OnceAbsoluteMergeProperty.build((OnceAbsoluteMerge)headClazz.getAnnotation(OnceAbsoluteMerge.class)); |
|
|
|
OnceAbsoluteMergeProperty.build((OnceAbsoluteMerge) headClazz.getAnnotation(OnceAbsoluteMerge.class)); |
|
|
|
|
|
|
|
|
|
|
|
ColumnWidth parentColumnWidth = (ColumnWidth)headClazz.getAnnotation(ColumnWidth.class); |
|
|
|
ColumnWidth parentColumnWidth = (ColumnWidth) headClazz.getAnnotation(ColumnWidth.class); |
|
|
|
HeadStyle parentHeadStyle = (HeadStyle)headClazz.getAnnotation(HeadStyle.class); |
|
|
|
HeadStyle parentHeadStyle = (HeadStyle) headClazz.getAnnotation(HeadStyle.class); |
|
|
|
HeadFontStyle parentHeadFontStyle = (HeadFontStyle)headClazz.getAnnotation(HeadFontStyle.class); |
|
|
|
HeadFontStyle parentHeadFontStyle = (HeadFontStyle) headClazz.getAnnotation(HeadFontStyle.class); |
|
|
|
ContentStyle parentContentStyle = (ContentStyle)headClazz.getAnnotation(ContentStyle.class); |
|
|
|
ContentStyle parentContentStyle = (ContentStyle) headClazz.getAnnotation(ContentStyle.class); |
|
|
|
ContentFontStyle parentContentFontStyle = (ContentFontStyle)headClazz.getAnnotation(ContentFontStyle.class); |
|
|
|
ContentFontStyle parentContentFontStyle = (ContentFontStyle) headClazz.getAnnotation(ContentFontStyle.class); |
|
|
|
|
|
|
|
|
|
|
|
for (Map.Entry<Integer, ExcelContentProperty> entry : getContentPropertyMap().entrySet()) { |
|
|
|
for (Map.Entry<Integer, ExcelContentProperty> entry : getContentPropertyMap().entrySet()) { |
|
|
|
Integer index = entry.getKey(); |
|
|
|
Integer index = entry.getKey(); |
|
|
|
ExcelContentProperty excelContentPropertyData = entry.getValue(); |
|
|
|
ExcelContentProperty excelContentPropertyData = entry.getValue(); |
|
|
|
|
|
|
|
if (excelContentPropertyData == null) { |
|
|
|
|
|
|
|
throw new IllegalArgumentException("Passing in the class and list the head, the two must be the same size."); |
|
|
|
|
|
|
|
} |
|
|
|
Field field = excelContentPropertyData.getField(); |
|
|
|
Field field = excelContentPropertyData.getField(); |
|
|
|
Head headData = getHeadMap().get(index); |
|
|
|
Head headData = getHeadMap().get(index); |
|
|
|
ColumnWidth columnWidth = field.getAnnotation(ColumnWidth.class); |
|
|
|
ColumnWidth columnWidth = field.getAnnotation(ColumnWidth.class); |
|
|
|