Browse Source

CHART-22465 提示颜色不需要新增自动

bugfix/11.0
方磊 3 years ago
parent
commit
105fac05d5
  1. 17
      designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartLabelContentPane.java
  2. 32
      designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java

17
designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartLabelContentPane.java

@ -1,13 +1,17 @@
package com.fr.van.chart.designer.component;
import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPane;
import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPaneWithAuto;
import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPaneWithThemeStyle;
import com.fr.design.mainframe.chart.mode.ChartEditContext;
import com.fr.plugin.chart.base.AttrTooltipContent;
import com.fr.plugin.chart.type.FontAutoType;
import com.fr.plugin.chart.type.TextAlign;
import com.fr.van.chart.designer.style.VanChartStylePane;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.Component;
public class VanChartLabelContentPane extends VanChartTooltipContentPane {
@ -37,6 +41,19 @@ public class VanChartLabelContentPane extends VanChartTooltipContentPane {
return stylePanel;
}
@Override
protected ChartTextAttrPane createChartTextAttrPane() {
return new ChartTextAttrPaneWithAuto(FontAutoType.COLOR) {
protected Component[][] getComponents(JPanel buttonPane) {
return new Component[][]{
new Component[]{null, null},
new Component[]{null, getFontNameComboBox()},
new Component[]{null, buttonPane}
};
}
};
}
public void updateTextAttr(AttrTooltipContent attrTooltipContent) {
if (isInCondition() || !ChartEditContext.supportTheme()) {
super.updateTextAttr(attrTooltipContent);

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

@ -11,7 +11,6 @@ import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPane;
import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPaneWithAuto;
import com.fr.design.ui.ModernUIPane;
import com.fr.general.ComparatorUtils;
import com.fr.plugin.chart.base.AttrTooltipContent;
@ -22,7 +21,6 @@ import com.fr.plugin.chart.base.format.AttrTooltipFormat;
import com.fr.plugin.chart.base.format.AttrTooltipPercentFormat;
import com.fr.plugin.chart.base.format.AttrTooltipSeriesFormat;
import com.fr.plugin.chart.base.format.AttrTooltipValueFormat;
import com.fr.plugin.chart.type.FontAutoType;
import com.fr.stable.StringUtils;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import com.fr.van.chart.designer.component.format.CategoryNameFormatPaneWithCheckBox;
@ -41,10 +39,6 @@ import com.fr.van.chart.designer.style.VanChartStylePane;
import javax.swing.JComponent;
import javax.swing.JPanel;
import javax.swing.SwingUtilities;
import java.util.Arrays;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.awt.BorderLayout;
import java.awt.CardLayout;
import java.awt.Component;
@ -53,6 +47,10 @@ import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.util.Arrays;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
/**
* 数据点提示内容界面含有通用设置富文本编辑器自定义JS界面
@ -317,15 +315,7 @@ public class VanChartTooltipContentPane extends BasicBeanPane<AttrTooltipContent
Toolkit.i18nText("Fine-Design_Chart_Custom")
});
textAttrPane = new ChartTextAttrPaneWithAuto(FontAutoType.COLOR) {
protected Component[][] getComponents(JPanel buttonPane) {
return new Component[][]{
new Component[]{null, null},
new Component[]{null, getFontNameComboBox()},
new Component[]{null, buttonPane}
};
}
};
textAttrPane = createChartTextAttrPane();
JPanel buttonPane = TableLayout4VanChartHelper.createGapTableLayoutPane(Toolkit.i18nText("Fine-Design_Chart_Widget_Style"), styleButton);
@ -338,6 +328,18 @@ public class VanChartTooltipContentPane extends BasicBeanPane<AttrTooltipContent
return stylePanel;
}
protected ChartTextAttrPane createChartTextAttrPane() {
return new ChartTextAttrPane() {
protected Component[][] getComponents(JPanel buttonPane) {
return new Component[][]{
new Component[]{null, null},
new Component[]{null, getFontNameComboBox()},
new Component[]{null, buttonPane}
};
}
};
}
private void initStyleButtonListener() {
styleButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {

Loading…
Cancel
Save