Browse Source

CHART-16224 增加富文本条件属性界面事件

final/10.0
Qinghui.Liu 4 years ago
parent
commit
733e04d47c
  1. 26
      designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnPlotLabelDetailPane.java
  2. 14
      designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java

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

@ -5,6 +5,8 @@ import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.plugin.chart.base.AttrLabelDetail; import com.fr.plugin.chart.base.AttrLabelDetail;
import com.fr.plugin.chart.base.AttrTooltipContent; 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.component.VanChartLabelContentPane;
import com.fr.van.chart.designer.component.VanChartTooltipContentPane;
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,6 +16,30 @@ public class VanChartColumnPlotLabelDetailPane extends VanChartPlotLabelDetailPa
super(plot, parent); super(plot, parent);
} }
protected void initToolTipContentPane(Plot plot) {
VanChartLabelContentPane dataLabelContentPane = new VanChartLabelContentPane(getParentPane(), VanChartColumnPlotLabelDetailPane.this) {
protected void checkCardPane() {
super.checkCardPane();
checkOrientationPane();
}
};
setDataLabelContentPane(dataLabelContentPane);
}
private void checkOrientationPane() {
VanChartLabelContentPane dataLabelContentPane = (VanChartLabelContentPane) getDataLabelContentPane();
UIButtonGroup<Integer> content = dataLabelContentPane.getContent();
UIButtonGroup<Integer> orientation = getOrientation();
if (content.getSelectedIndex() == VanChartTooltipContentPane.RICH_EDITOR_INDEX) {
orientation.setSelectedIndex(HORIZONTAL_INDEX);
orientation.setEnabled(false);
} else {
orientation.setEnabled(true);
}
}
protected boolean hasLabelOrientationPane() { protected boolean hasLabelOrientationPane() {
return !((VanChartColumnPlot) this.getPlot()).isBar(); return !((VanChartColumnPlot) this.getPlot()).isBar();
} }

14
designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java

@ -57,10 +57,10 @@ public class VanChartTooltipContentPane extends BasicBeanPane<AttrTooltipContent
private static final int TEXT_ATTR_AUTO_INDEX = 0; private static final int TEXT_ATTR_AUTO_INDEX = 0;
private static final int TEXT_ATTR_CUSTOM_INDEX = 1; private static final int TEXT_ATTR_CUSTOM_INDEX = 1;
// 标签内容button // 标签内容button
private static final int COMMON_INDEX = 0; public static final int COMMON_INDEX = 0;
private static final int RICH_EDITOR_INDEX = 1; public static final int RICH_EDITOR_INDEX = 1;
private static final int CUSTOM_INDEX_WITH_RICH_EDITOR = 2; public static final int CUSTOM_INDEX_WITH_RICH_EDITOR = 2;
private static final int CUSTOM_INDEX_WITHOUT_RICH_EDITOR = 1; public static final int CUSTOM_INDEX_WITHOUT_RICH_EDITOR = 1;
private UIButtonGroup<Integer> content; private UIButtonGroup<Integer> content;
@ -202,6 +202,10 @@ public class VanChartTooltipContentPane extends BasicBeanPane<AttrTooltipContent
this.richTextChangedPercentFormatPane = richTextChangedPercentFormatPane; this.richTextChangedPercentFormatPane = richTextChangedPercentFormatPane;
} }
public UIButtonGroup<Integer> getContent() {
return content;
}
public AttrTooltipRichText getRichTextAttr() { public AttrTooltipRichText getRichTextAttr() {
return richText; return richText;
} }
@ -513,7 +517,7 @@ public class VanChartTooltipContentPane extends BasicBeanPane<AttrTooltipContent
} }
private void checkCardPane() { protected void checkCardPane() {
if (supportRichEditor()) { if (supportRichEditor()) {
checkCardPaneWithRichEditor(); checkCardPaneWithRichEditor();
} else { } else {

Loading…
Cancel
Save