|
|
|
@ -18,6 +18,8 @@ import com.fr.log.FineLoggerFactory;
|
|
|
|
|
|
|
|
|
|
import javax.swing.BorderFactory; |
|
|
|
|
import javax.swing.JPanel; |
|
|
|
|
import javax.swing.event.ChangeEvent; |
|
|
|
|
import javax.swing.event.ChangeListener; |
|
|
|
|
import java.awt.BorderLayout; |
|
|
|
|
import java.awt.Dimension; |
|
|
|
|
import java.awt.Label; |
|
|
|
@ -33,6 +35,7 @@ public class PredefinedStyleEditPane extends AbstractAttrNoScrollPane {
|
|
|
|
|
private ComponentStyleSettingPane componentStyleSettingPane; |
|
|
|
|
private PredefinedStyleSelectPane selectPane; |
|
|
|
|
private boolean isPopulating = false; |
|
|
|
|
private UITabbedPane uiTabbedPane; |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
protected JPanel createContentPane() { |
|
|
|
@ -52,7 +55,8 @@ public class PredefinedStyleEditPane extends AbstractAttrNoScrollPane {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void valueChangeAction() { |
|
|
|
|
previewPane.refresh(this.update()); |
|
|
|
|
boolean displayFormBackground = backgroundSettingPane.currentFormBackground() || uiTabbedPane.getSelectedIndex() == 3; |
|
|
|
|
previewPane.refresh(this.update(), displayFormBackground); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@ -122,12 +126,17 @@ public class PredefinedStyleEditPane extends AbstractAttrNoScrollPane {
|
|
|
|
|
JPanel titlePane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Predefined_Custom_Detail")); |
|
|
|
|
titlePane.setLayout(FRGUIPaneFactory.createLeftZeroLayout()); |
|
|
|
|
jPanel.add(titlePane, BorderLayout.CENTER); |
|
|
|
|
UITabbedPane uiTabbedPane = new UITabbedPane(); |
|
|
|
|
uiTabbedPane = new UITabbedPane(); |
|
|
|
|
uiTabbedPane.addTab(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Predefined_Template_Background"), createTemplateBackgroundSettingPane()); |
|
|
|
|
uiTabbedPane.addTab(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Predefined_Cell_Style"), createCellStyleSettingPane()); |
|
|
|
|
uiTabbedPane.addTab(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Predefined_Chart_Style"), createChartStyleSettingPane()); |
|
|
|
|
uiTabbedPane.addTab(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Predefined_Component_Style"), createComponentStyleSettingPane()); |
|
|
|
|
|
|
|
|
|
uiTabbedPane.addChangeListener(new ChangeListener() { |
|
|
|
|
@Override |
|
|
|
|
public void stateChanged(ChangeEvent e) { |
|
|
|
|
valueChangeAction(); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
titlePane.add(uiTabbedPane); |
|
|
|
|
titlePane.setPreferredSize(new Dimension(333, 320)); |
|
|
|
|
return jPanel; |
|
|
|
@ -175,6 +184,7 @@ public class PredefinedStyleEditPane extends AbstractAttrNoScrollPane {
|
|
|
|
|
this.backgroundSettingPane.populateBean(previewObject.getPredefinedBackground()); |
|
|
|
|
this.cellStyleSettingPane.populateBean(previewObject.getCellStyleMap()); |
|
|
|
|
this.componentStyleSettingPane.populateBean(previewObject.getComponentStyle()); |
|
|
|
|
previewPane.refresh(previewObject); |
|
|
|
|
isPopulating = false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|