Browse Source

Pull request #6345: CHART-21579 模版主题编辑页面-图表-系列-渐变色的色值联动逻辑修改

Merge in DESIGN/design from ~STARRYI/design:final/11.0 to final/11.0

* commit '29814f2081f57569503963b7d67563cb8cf4d40c':
  REPORT-61338 设计器主题-主题配色修改保存后出现异常空白提示框
  CHART-21579 模版主题编辑页面-图表-系列-渐变色的色值联动逻辑修改
new-design
starryi 3 years ago
parent
commit
c9572d151b
  1. 7
      designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeProfilePane.java
  2. 5
      designer-base/src/main/java/com/fr/design/mainframe/theme/edit/chart/ChartSeriesStylePane.java
  3. 6
      designer-base/src/main/java/com/fr/design/style/background/gradient/FixedGradientBar.java

7
designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeProfilePane.java

@ -220,7 +220,12 @@ public abstract class TemplateThemeProfilePane<T extends TemplateTheme> extends
saveButton.setEnabled(false); saveButton.setEnabled(false);
saveAsButton.setEnabled(true); saveAsButton.setEnabled(true);
actionListener.onSaved(config.cachedFetch(getName())); actionListener.onSaved(config.cachedFetch(getName()));
DesignerToastMsgUtil.toastPrompt(Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Profile_Pane_Save_Successfully")); SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
DesignerToastMsgUtil.toastPrompt(Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Profile_Pane_Save_Successfully"));
}
});
} }
}); });
} }

5
designer-base/src/main/java/com/fr/design/mainframe/theme/edit/chart/ChartSeriesStylePane.java

@ -1,5 +1,6 @@
package com.fr.design.mainframe.theme.edit.chart; package com.fr.design.mainframe.theme.edit.chart;
import com.fr.base.FineColor;
import com.fr.base.theme.settings.ThemedChartStyle; import com.fr.base.theme.settings.ThemedChartStyle;
import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
@ -7,12 +8,12 @@ import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.theme.dialog.TemplateThemeProfileDialog; import com.fr.design.mainframe.theme.dialog.TemplateThemeProfileDialog;
import com.fr.design.style.background.gradient.FixedGradientBar; import com.fr.design.style.background.gradient.FixedGradientBar;
import java.util.List;
import java.awt.Color; import java.awt.Color;
import java.awt.Component; import java.awt.Component;
import java.awt.Dimension; import java.awt.Dimension;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
import java.util.List;
/** /**
* @author Bjorn * @author Bjorn
@ -66,7 +67,7 @@ public class ChartSeriesStylePane extends AbstractChartStylePane {
if (chartStyle.getThemedChartSeriesColor().isCombineColor()) { if (chartStyle.getThemedChartSeriesColor().isCombineColor()) {
List<Color> editingColorScheme = TemplateThemeProfileDialog.getEditingColorScheme(); List<Color> editingColorScheme = TemplateThemeProfileDialog.getEditingColorScheme();
colorTypeButton.setSelectedIndex(0); colorTypeButton.setSelectedIndex(0);
gradientBar.updateColor(editingColorScheme.get(0), editingColorScheme.get(1)); gradientBar.updateColor(new FineColor(0, 0, editingColorScheme.get(0)), new FineColor(1, 0, editingColorScheme.get(1)));
} else { } else {
colorTypeButton.setSelectedIndex(1); colorTypeButton.setSelectedIndex(1);
gradientBar.updateColor(chartStyle.getThemedChartSeriesColor().getBeginColor(), chartStyle.getThemedChartSeriesColor().getEndColor()); gradientBar.updateColor(chartStyle.getThemedChartSeriesColor().getBeginColor(), chartStyle.getThemedChartSeriesColor().getEndColor());

6
designer-base/src/main/java/com/fr/design/style/background/gradient/FixedGradientBar.java

@ -14,6 +14,12 @@ public class FixedGradientBar extends GradientBar {
super(minvalue, maxvalue); super(minvalue, maxvalue);
} }
@Override
protected void clickButton(int select) {
setColor(getList().get(select).getColorInner());
super.clickButton(select);
}
@Override @Override
protected void addMouseDragListener() { protected void addMouseDragListener() {
//不添加拖拽事件 //不添加拖拽事件

Loading…
Cancel
Save