我想在标题标题中实现文本换行。我还在顶部列标题层上添加了逐层文本换行在具有以下配置的按标题区域中不起作用。如何在这种情况下实现文本换行
// Column header layer
this.colGrpModel = new ColumnGroupModel();
this.colHeaderLayr =
new ColumnHeaderLayer(this.colHeaderDataLayr, this.bodyLayr, this.bodyLayr.getSelectionLayer());
this.colGrpHeaderLayer =
new ColumnGroupHeaderLayer(this.colHeaderLayr,
this.bodyLayr.getSelectionLayer(), this.colGrpModel, false);
this.colGrpHeaderLayer.setCalculateHeight(true);
// Composite layer
CompositeLayer compositeGridLayer = new CompositeLayer(1, 2);
//Group by header layer
this.groupByHeaderLayer = new GroupByHeaderLayer(groupByModel, this.paramFilterGridLayer,
this.filterGridLayer.getColumnHeaderDataProvider());
compositeGridLayer.setChildLayer(GroupByHeaderLayer.GROUP_BY_REGION, this.groupByHeaderLayer, 0, 0);
compositeGridLayer.setChildLayer("Grid", this.filterGridLayer, 0, 1);
这是 groupBy 配置:
configRegstry.registerConfigAttribute(
GroupByConfigAttributes.GROUP_BY_CHILD_COUNT_PATTERN, "[{0}] - ({1})");
configRegstry.registerConfigAttribute(
GroupByConfigAttributes.GROUP_BY_HINT, "Drag columns here");
// To implement text wrapping in group by header region
configRegstry.registerConfigAttribute(
CellConfigAttributes.CELL_PAINTER,
new TextPainter(true, true, 2),
DisplayMode.NORMAL,
GroupByHeaderLayer.GROUP_BY_REGION);