一般解决方案,第一步:将特殊样式脚本添加到样式文件中。
mx|AdvancedDataGrid{
columnDropIndicatorSkin: ClassReference("mx.skins.halo.DataGridColumnDropIndicator");
columnResizeSkin: ClassReference("mx.skins.halo.DataGridColumnResizeSkin");
headerColors: #FFFFFF, #E6E6E6;
headerDragProxyStyleName: "headerDragProxyStyle";
headerBackgroundSkin: ClassReference("mx.skins.halo.DataGridHeaderBackgroundSkin");
headerSeparatorSkin: ClassReference("mx.skins.halo.DataGridHeaderSeparator");
headerHorizontalSeparatorSkin: ClassReference("mx.skins.halo.AdvancedDataGridHeaderHorizontalSeparator");
headerStyleName: "advancedDataGridStyles";
sortArrowSkin: ClassReference("mx.skins.halo.DataGridSortArrow");
stretchCursor: Embed(source="Assets.swf",symbol="cursorStretch");
}
mx|AdvancedDataGridSortItemRenderer{
paddingTop: 0;
paddingBottom: 0;
paddingLeft: 0;
paddingRight: 0;
horizontalGap: 0;
color: #0B333C;
icon: ClassReference("mx.skins.halo.DataGridSortArrow");
}
mx|PrintAdvancedDataGrid{
alternatingItemColors: #FFFFFF, #FFFFFF;
borderColor: 0;
columnResizeSkin: ClassReference("mx.skins.halo.DataGridColumnResizeSkin");
headerColors: #FFFFFF, #FFFFFF;
headerSeparatorSkin: ClassReference("mx.skins.halo.DataGridHeaderSeparator");
headerStyleName: "advancedDataGridStyles";
horizontalGridLineColor: 0;
horizontalGridLines: true;
sortArrowSkin: ClassReference("mx.skins.halo.DataGridSortArrow");
stretchCursor: Embed(source="Assets.swf",symbol="cursorStretch");
verticalGridLineColor: #000000;
}
mx|PrintOLAPDataGrid{
alternatingItemColors: #FFFFFF, #FFFFFF;
borderColor: 0;
columnResizeSkin: ClassReference("mx.skins.halo.DataGridColumnResizeSkin");
headerColors: #FFFFFF, #FFFFFF;
headerSeparatorSkin: ClassReference("mx.skins.halo.DataGridHeaderSeparator");
headerStyleName: "advancedDataGridStyles";
horizontalGridLineColor: 0;
horizontalGridLines: true;
stretchCursor: Embed(source="Assets.swf",symbol="cursorStretch");
verticalGridLineColor: #000000;
}
第 2 步:将脚本添加到 pom.xml
<compilerWarnings>
<show-unused-type-selector-warnings>false</show-unused-type-selector-warnings>
</compilerWarnings>