|
|
|
@ -42,13 +42,10 @@ import java.util.List;
|
|
|
|
|
* Created by Starryi on 2021/8/13 |
|
|
|
|
*/ |
|
|
|
|
public abstract class TemplateThemeEditorPane<T extends TemplateTheme> extends JPanel { |
|
|
|
|
public static final int TITLE_BORDER_FONT = 12; |
|
|
|
|
public static final int LEFT_TITLE_PANE_HEIGHT = 539; |
|
|
|
|
|
|
|
|
|
public static final int RIGHT_PANE_WIDTH = 362; |
|
|
|
|
public static final int RIGHT_PANE_HEIGHT = LEFT_TITLE_PANE_HEIGHT; |
|
|
|
|
public static final int COLOR_SCHEME_TITLE_PANE_WIDTH = 298; |
|
|
|
|
public static final int COLOR_SCHEME_TITLE_PANE_HEIGHT = 174 + TITLE_BORDER_FONT / 2; |
|
|
|
|
|
|
|
|
|
protected AutoCheckThemeNameTextField<T> nameTextField; |
|
|
|
|
private UILabel nameErrorLabel; |
|
|
|
@ -122,12 +119,14 @@ public abstract class TemplateThemeEditorPane<T extends TemplateTheme> extends J
|
|
|
|
|
colorListPane = new ColorListPane(); |
|
|
|
|
colorListExtendedPane = new ColorListExtendedPane(); |
|
|
|
|
|
|
|
|
|
JPanel extendedContainer = FRGUIPaneFactory.createBorderLayout_S_Pane(); |
|
|
|
|
colorListExtendedPane.setBackground(null); |
|
|
|
|
colorListExtendedPane.setOpaque(false); |
|
|
|
|
extendedContainer.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); |
|
|
|
|
extendedContainer.setBackground(Color.WHITE); |
|
|
|
|
extendedContainer.add(colorListExtendedPane); |
|
|
|
|
JPanel extendedBackgroundContainer = FRGUIPaneFactory.createBorderLayout_S_Pane(); |
|
|
|
|
extendedBackgroundContainer.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); |
|
|
|
|
extendedBackgroundContainer.setBackground(Color.WHITE); |
|
|
|
|
extendedBackgroundContainer.add(colorListExtendedPane, BorderLayout.WEST); |
|
|
|
|
JPanel extendedContainer = FRGUIPaneFactory.createBorderLayout_S_Pane(); |
|
|
|
|
extendedContainer.add(extendedBackgroundContainer, BorderLayout.WEST); |
|
|
|
|
|
|
|
|
|
double p = TableLayout.PREFERRED; |
|
|
|
|
double[] rowSize = new double[]{p, p, p}; |
|
|
|
@ -151,12 +150,11 @@ public abstract class TemplateThemeEditorPane<T extends TemplateTheme> extends J
|
|
|
|
|
content.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); |
|
|
|
|
|
|
|
|
|
JPanel borderContainer = new JPanel(new BorderLayout()); |
|
|
|
|
borderContainer.setPreferredSize(new Dimension(COLOR_SCHEME_TITLE_PANE_WIDTH, COLOR_SCHEME_TITLE_PANE_HEIGHT)); |
|
|
|
|
borderContainer.setBorder(BorderUtils.createTitleBorder(Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Edit_Pane_Color_Scheme_Title"))); |
|
|
|
|
borderContainer.add(content); |
|
|
|
|
|
|
|
|
|
JPanel container = new JPanel(new BorderLayout()); |
|
|
|
|
container.add(borderContainer, BorderLayout.WEST); |
|
|
|
|
container.add(borderContainer, BorderLayout.CENTER); |
|
|
|
|
|
|
|
|
|
colorListPane.addColorChangeListener(new ChangeListener() { |
|
|
|
|
@Override |
|
|
|
@ -193,18 +191,17 @@ public abstract class TemplateThemeEditorPane<T extends TemplateTheme> extends J
|
|
|
|
|
|
|
|
|
|
uiTabbedPane = new UITabbedPane(); |
|
|
|
|
uiTabbedPane.setBorder(BorderFactory.createEmptyBorder(10, 5, 10, 1)); |
|
|
|
|
container.add(uiTabbedPane, BorderLayout.NORTH); |
|
|
|
|
container.add(uiTabbedPane, BorderLayout.CENTER); |
|
|
|
|
|
|
|
|
|
return container; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void addCustomEditorPane(String title, final Component component) { |
|
|
|
|
component.setPreferredSize(new Dimension(317, 239)); |
|
|
|
|
AbstractAttrNoScrollPane settingPane = new NoBorderAbstractAttrNoScrollPane() { |
|
|
|
|
@Override |
|
|
|
|
protected JPanel createContentPane() { |
|
|
|
|
JPanel contentPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); |
|
|
|
|
contentPane.add(component, BorderLayout.NORTH); |
|
|
|
|
contentPane.add(component, BorderLayout.CENTER); |
|
|
|
|
return contentPane; |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|