package com.fr.plugin.heatpointmapbox.ui; import com.fr.chart.base.AttrFillStyle; import com.fr.design.gui.icombobox.ColorSchemeComboBox; import com.fr.design.gui.ilable.UILabel; import com.fr.design.i18n.Toolkit; import com.fr.design.mainframe.DesignerBean; import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.predefined.ui.detail.ColorFillStylePane; import com.fr.design.utils.gui.GUICoreUtils; import javax.swing.*; import java.awt.*; /** * @author xx * @date 2022/10/11 */ public class CustomChartFillStylePane extends ColorFillStylePane implements DesignerBean { public static final String name = "customChartFillStyle"; public CustomChartFillStylePane() { DesignerContext.setDesignerBean("customChartFillStyle", this); } @Override protected void styleSelectBoxChange() { super.styleSelectBoxChange(); } @Override protected ColorSchemeComboBox createColorSchemeComboBox() { return new CustomColorSchemeComboBox(); } @Override protected void initLayout() { super.initLayout(); this.add(this.getContentPane(), "Center"); } @Override protected JPanel getContentPane() { JPanel var1 = super.getContentPane(); var1.setBorder(BorderFactory.createEmptyBorder(0, 0, 5, 0)); return var1; } @Override protected Component[][] contentPaneComponents() { return new Component[][]{{null, null}, {new UILabel(Toolkit.i18nText("Fine-Design_Chart_Match_Color_Scheme")), this.getStyleSelectBox()}, {null, this.getCustomPane()}}; } @Override protected String title4PopupWindow() { return Toolkit.i18nText("Fine-Design_Chart_Color"); } public void populateBean(AttrFillStyle var1) { this.populateBean(var1.getColorFillStyle()); } public void updateBean(AttrFillStyle var1) { var1.setColorFillStyle(this.updateBean()); } @Override public void refreshBeanElement() { AttrFillStyle var1 = new AttrFillStyle(); this.updateBean(var1); this.getStyleSelectBox().refresh(); this.populateBean(var1); GUICoreUtils.repaint(this); } }