Browse Source

Pull request #5857: CHART-20522 && REPORT-59010 final传一份

Merge in DESIGN/design from ~KERRY/design_10.0:final/11.0 to final/11.0

* commit 'c2c669a7c64649fa4f662c3847c59f6cc19ce3e4':
  CHART-20522 && REPORT-59010 final传一份
fix-lag
kerry 3 years ago
parent
commit
bdce92941f
  1. 4
      designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeProfilePane.java
  2. 5
      designer-base/src/main/java/com/fr/design/style/color/ColorSelectDialog.java
  3. 7
      designer-form/src/main/java/com/fr/design/designer/creator/XCreatorUtils.java

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

@ -1,5 +1,6 @@
package com.fr.design.mainframe.theme; package com.fr.design.mainframe.theme;
import com.fr.base.theme.FineColorFlushUtils;
import com.fr.base.theme.FineColorManager; import com.fr.base.theme.FineColorManager;
import com.fr.base.theme.TemplateTheme; import com.fr.base.theme.TemplateTheme;
import com.fr.base.theme.TemplateThemeConfig; import com.fr.base.theme.TemplateThemeConfig;
@ -319,13 +320,14 @@ public abstract class TemplateThemeProfilePane<T extends TemplateTheme> extends
colorListExtendedPane.populate(colors); colorListExtendedPane.populate(colors);
FineColorManager.FineColorReplaceByColorScheme replaceByColorScheme = new FineColorManager.FineColorReplaceByColorScheme(colors); FineColorManager.FineColorReplaceByColorScheme replaceByColorScheme = new FineColorManager.FineColorReplaceByColorScheme(colors);
T theme = updateBean(); T theme = updateBean();
FineColorFlushUtils.replaceCacheObject(theme, replaceByColorScheme);
FineColorManager.traverse(theme, replaceByColorScheme); FineColorManager.traverse(theme, replaceByColorScheme);
populateBean4CustomEditors(theme); populateBean4CustomEditors(theme);
//图表渐变色 //图表渐变色
chartStyleSettingPane.populateGradientBar(colors); chartStyleSettingPane.populateGradientBar(colors);
themePreviewPane.refresh(theme); themePreviewPane.refresh(theme);
this.repaint();
} }
public void populateBean(T theme) { public void populateBean(T theme) {

5
designer-base/src/main/java/com/fr/design/style/color/ColorSelectDialog.java

@ -1,6 +1,7 @@
package com.fr.design.style.color; package com.fr.design.style.color;
import com.fr.base.chart.BaseChartCollection; import com.fr.base.chart.BaseChartCollection;
import com.fr.design.DesignerEnvManager;
import com.fr.design.gui.chart.MiddleChartDialog; import com.fr.design.gui.chart.MiddleChartDialog;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
@ -101,7 +102,9 @@ public class ColorSelectDialog extends MiddleChartDialog{
ok.setActionCommand("OK"); ok.setActionCommand("OK");
ok.addActionListener(new ActionListener() { ok.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
seletePane.setColor(okListener.getColor()); Color color = okListener.getColor();
seletePane.setColor(color);
DesignerEnvManager.getEnvManager().getColorConfigManager().addToColorQueue(color);
doOK(); doOK();
} }
}); });

7
designer-form/src/main/java/com/fr/design/designer/creator/XCreatorUtils.java

@ -3,6 +3,8 @@
*/ */
package com.fr.design.designer.creator; package com.fr.design.designer.creator;
import com.fr.base.theme.FineColorFlushUtils;
import com.fr.base.theme.FineColorGather;
import com.fr.base.theme.FineColorManager; import com.fr.base.theme.FineColorManager;
import com.fr.base.theme.FormTheme; import com.fr.base.theme.FormTheme;
import com.fr.base.theme.TemplateTheme; import com.fr.base.theme.TemplateTheme;
@ -377,8 +379,7 @@ public class XCreatorUtils {
} }
public static void setupTemplateTheme(XCreator container, final FormTheme currentTemplateUsingTheme, TemplateThemeCompatible compatible) { public static void setupTemplateTheme(XCreator container, final FormTheme currentTemplateUsingTheme, TemplateThemeCompatible compatible) {
FineColorManager.traverse(container.toData(), new FineColorManager.FineColorReplaceByTheme(currentTemplateUsingTheme, compatible)); FineColorGather colorGather = new FineColorManager.FineColorReplaceByTheme(currentTemplateUsingTheme, compatible);
Form.traversalWidget(container.toData(), new WidgetGather() { Form.traversalWidget(container.toData(), new WidgetGather() {
@Override @Override
public void dealWith(Widget widget) { public void dealWith(Widget widget) {
@ -391,5 +392,7 @@ public class XCreatorUtils {
return true; return true;
} }
}, TemplateThemeAware.class); }, TemplateThemeAware.class);
FineColorFlushUtils.replaceCacheObject(container.toData(), colorGather);
FineColorManager.traverse(container.toData(), colorGather);
} }
} }
Loading…
Cancel
Save