Browse Source

CHART-16097 柱形图选择富文本时,文本方向灰化

feature/big-screen
Qinghui.Liu 4 years ago
parent
commit
def7bcf41e
  1. 17
      designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnPlotLabelDetailPane.java
  2. 4
      designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartPlotLabelDetailPane.java

17
designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnPlotLabelDetailPane.java

@ -1,6 +1,8 @@
package com.fr.van.chart.column; package com.fr.van.chart.column;
import com.fr.chart.chartattr.Plot; import com.fr.chart.chartattr.Plot;
import com.fr.plugin.chart.base.AttrLabelDetail;
import com.fr.plugin.chart.base.AttrTooltipContent;
import com.fr.plugin.chart.column.VanChartColumnPlot; import com.fr.plugin.chart.column.VanChartColumnPlot;
import com.fr.van.chart.designer.style.VanChartStylePane; import com.fr.van.chart.designer.style.VanChartStylePane;
import com.fr.van.chart.designer.style.label.VanChartPlotLabelDetailPane; import com.fr.van.chart.designer.style.label.VanChartPlotLabelDetailPane;
@ -14,4 +16,19 @@ public class VanChartColumnPlotLabelDetailPane extends VanChartPlotLabelDetailPa
protected boolean hasLabelOrientationPane() { protected boolean hasLabelOrientationPane() {
return !((VanChartColumnPlot) this.getPlot()).isBar(); return !((VanChartColumnPlot) this.getPlot()).isBar();
} }
private void checkOrientationEnable(AttrLabelDetail detail) {
AttrTooltipContent content = detail.getContent();
getOrientation().setEnabled(content != null && !content.isRichText());
}
public void populate(AttrLabelDetail detail) {
super.populate(detail);
checkOrientationEnable(detail);
}
public void update(AttrLabelDetail detail) {
super.update(detail);
checkOrientationEnable(detail);
}
} }

4
designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartPlotLabelDetailPane.java

@ -88,6 +88,10 @@ public class VanChartPlotLabelDetailPane extends BasicPane {
return plot; return plot;
} }
public UIButtonGroup<Integer> getOrientation() {
return orientation;
}
//默认从factory中取 //默认从factory中取
protected void initToolTipContentPane(Plot plot) { protected void initToolTipContentPane(Plot plot) {
dataLabelContentPane = PlotFactory.createPlotLabelContentPane(plot, parent, VanChartPlotLabelDetailPane.this); dataLabelContentPane = PlotFactory.createPlotLabelContentPane(plot, parent, VanChartPlotLabelDetailPane.this);

Loading…
Cancel
Save