Browse Source

Pull request #13311: REPORT-109672 控件显示增强-字体颜色优化

Merge in DESIGN/design from ~OBO/design1:feature/x to feature/x

* commit '2409d627dc25bb223217b7adc6c0c72a5bda8afc':
  抽常量、改命名,补充一个下拉框主题刷新类
  1、抽常量 2、删注释
  消除警告
  REPORT-109672 控件显示增强-字体颜色优化
feature/x
Obo-王学仁 1 year ago
parent
commit
993b2ab865
  1. 25
      designer-base/src/main/java/com/fr/design/gui/frpane/FontSizeComboPane.java
  2. 28
      designer-base/src/main/java/com/fr/widgettheme/theme/edit/widget/DesktopWidgetStyleEditPane.java
  3. 13
      designer-base/src/main/java/com/fr/widgettheme/theme/edit/widget/MobileWidgetStyleEditPane.java
  4. 29
      designer-base/src/main/java/com/fr/widgettheme/theme/edit/widget/WidgetStyleEditPane.java
  5. 5
      designer-base/src/main/java/com/fr/widgettheme/theme/panel/ControlPreviewCell.java
  6. 2
      designer-base/src/main/java/com/fr/widgettheme/theme/panel/NormalButtonPreviewCell.java
  7. 70
      designer-base/src/main/java/com/fr/widgettheme/theme/panel/WidgetTextStylePane.java
  8. 2
      designer-form/src/main/java/com/fr/design/widget/ui/designer/CheckBoxDefinePane.java
  9. 2
      designer-form/src/main/java/com/fr/design/widget/ui/designer/FieldEditorDefinePane.java
  10. 2
      designer-form/src/main/java/com/fr/design/widget/ui/designer/MultiFileEditorPane.java
  11. 49
      designer-form/src/main/java/com/fr/design/widgettheme/BaseStyleSettingPane.java
  12. 7
      designer-form/src/main/java/com/fr/design/widgettheme/ParaButtonSettingPane.java
  13. 12
      designer-form/src/main/java/com/fr/design/widgettheme/ParaEditorSettingPane.java
  14. 50
      designer-form/src/main/java/com/fr/design/widgettheme/ParaSelectEditorSettingPane.java
  15. 7
      designer-form/src/main/java/com/fr/design/widgettheme/ParaTreeEditorSettingPane.java
  16. 10
      designer-form/src/main/java/com/fr/design/widgettheme/StyleSetting.java
  17. 56
      designer-form/src/main/java/com/fr/design/widgettheme/common/SelectEditorSettingPane.java
  18. 24
      designer-form/src/main/java/com/fr/design/widgettheme/processor/WidgetThemeCreatorPaneAdder.java
  19. 19
      designer-form/src/main/java/com/fr/design/widgettheme/processor/WidgetThemeParaCreatorPaneAdder.java
  20. 37
      designer-realize/src/main/java/com/fr/design/webattr/EditToolBar.java
  21. 10
      designer-realize/src/main/java/com/fr/design/webattr/FToolBar.java
  22. 2
      designer-realize/src/main/java/com/fr/design/webattr/ToolBarPane.java

25
designer-form/src/main/java/com/fr/design/widget/ui/designer/component/FontSizeComboPane.java → designer-base/src/main/java/com/fr/design/gui/frpane/FontSizeComboPane.java

@ -1,7 +1,9 @@
package com.fr.design.widget.ui.designer.component;
package com.fr.design.gui.frpane;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.stable.collections.CollectionUtils;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.util.Vector;
@ -13,15 +15,22 @@ public class FontSizeComboPane extends JPanel{
private static final int MAX_FONT_SIZE = 100;
private UIComboBox comboBox;
public FontSizeComboPane(){
initComponent();
this(null);
}
public void initComponent(){
this.setLayout(FRGUIPaneFactory.createBorderLayout());
Vector<Integer> integerList = new Vector<Integer>();
for (int i = 1; i < MAX_FONT_SIZE; i++) {
integerList.add(i);
public FontSizeComboPane(Vector<Integer> fontSizes){
initComponent(fontSizes);
}
public void initComponent(Vector<Integer> fontSizes){
if(CollectionUtils.isEmpty(fontSizes)) {
fontSizes = new Vector<>();
for (int i = 1; i < MAX_FONT_SIZE; i++) {
fontSizes.add(i);
}
}
comboBox = new UIComboBox(integerList);
this.setLayout(FRGUIPaneFactory.createBorderLayout());
comboBox = new UIComboBox(fontSizes);
comboBox.setEditable(true);
this.add(comboBox, BorderLayout.CENTER);
}

28
designer-base/src/main/java/com/fr/widgettheme/theme/edit/widget/DesktopWidgetStyleEditPane.java

@ -2,14 +2,15 @@ package com.fr.widgettheme.theme.edit.widget;
import com.fr.base.background.ColorBackground;
import com.fr.base.theme.TemplateTheme;
import com.fr.design.style.color.NewColorSelectBox;
import com.fr.widgettheme.theme.widget.style.BorderStyle;
import com.fr.widgettheme.theme.widget.style.ButtonBackgroundStyle;
import com.fr.widgettheme.theme.widget.style.FontSizeStyle;
import com.fr.widgettheme.theme.widget.style.ThemedWidgetStyle;
import com.fr.design.gui.ibutton.UIRadioButton;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.widgettheme.theme.widget.theme.WidgetThemeDisplayConstants;
import javax.swing.ButtonGroup;
import javax.swing.JPanel;
@ -29,6 +30,10 @@ public class DesktopWidgetStyleEditPane<T extends TemplateTheme> extends WidgetS
// 风格2
protected UIRadioButton style2;
/**
* 下拉面板背景颜色
*/
private NewColorSelectBox selectBackgroundColorBox;
public DesktopWidgetStyleEditPane() {
super();
}
@ -36,19 +41,20 @@ public class DesktopWidgetStyleEditPane<T extends TemplateTheme> extends WidgetS
@Override
public Component[][] generateComponent() {
initStyleEditor();
initSelectBackgroundColorBox();
// 容纳风格1和风格2的panel
JPanel stylePane = new JPanel(FRGUIPaneFactory.createBoxFlowLayout());
stylePane.add(style1);
stylePane.add(style2);
Component[][] components = new Component[][]{
return new Component[][]{
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Widget_Theme_Color")), colorSelectBox},
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Widget_Theme_Style")), stylePane},
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Widget_Theme_Border_Line")), lineComboBox},
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Widget_Theme_Border_Radius")), borderRadiusSpinner},
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Widget_Theme_Font_Size")), fontSizeComoBox}
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Widget_Theme_Text_Style")), textStylePane},
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Widget_Background_Select_Box")), selectBackgroundColorBox}
};
return components;
}
@ -60,6 +66,11 @@ public class DesktopWidgetStyleEditPane<T extends TemplateTheme> extends WidgetS
buttonGroup.add(style2);
}
private void initSelectBackgroundColorBox() {
selectBackgroundColorBox = new NewColorSelectBox(140, true);
selectBackgroundColorBox.setSelectObject(WidgetThemeDisplayConstants.DEFAULT_THEME_COLOR);
}
@Override
public void populateBean(T t) {
ThemedWidgetStyle style = (ThemedWidgetStyle) t.getWidgetStyle();
@ -75,8 +86,8 @@ public class DesktopWidgetStyleEditPane<T extends TemplateTheme> extends WidgetS
colorSelectBox.setSelectObject(style.getThemeColor());
lineComboBox.setSelectedLineStyle(style.getBorderStyle().getLineType());
borderRadiusSpinner.setValue(style.getBorderStyle().getRadius());
fontSizeComoBox.setSelectedItem(style.getFontSizeStyle().getFontSize());
textStylePane.setTextStyle(style.getTextStyle());
selectBackgroundColorBox.setSelectObject(style.getSelectBackgroundColor());
}
@Override
@ -91,9 +102,7 @@ public class DesktopWidgetStyleEditPane<T extends TemplateTheme> extends WidgetS
borderStyle.setLineType(lineComboBox.getSelectedLineStyle());
borderStyle.setRadius((int) borderRadiusSpinner.getValue());
style.setBorderStyle(borderStyle);
FontSizeStyle fontSizeStyle = new FontSizeStyle();
fontSizeStyle.setFontSize((Integer) fontSizeComoBox.getSelectedItem());
style.setFontSizeStyle(fontSizeStyle);
style.setTextStyle(textStylePane.getTextStyle());
ButtonBackgroundStyle buttonBackgroundStyle = new ButtonBackgroundStyle();
ColorBackground buttonBackground = ColorBackground.getInstance(style.getThemeColor());
buttonBackgroundStyle.setInitialBackground(buttonBackground);
@ -101,5 +110,6 @@ public class DesktopWidgetStyleEditPane<T extends TemplateTheme> extends WidgetS
buttonBackgroundStyle.setClickBackground(buttonBackground);
style.setButtonBackgroundStyle(buttonBackgroundStyle);
style.setStyleType(style1.isSelected() ? 1 : 2);
style.setSelectBackgroundColor(selectBackgroundColorBox.getSelectObject());
}
}

13
designer-base/src/main/java/com/fr/widgettheme/theme/edit/widget/MobileWidgetStyleEditPane.java

@ -1,11 +1,10 @@
package com.fr.widgettheme.theme.edit.widget;
import com.fr.base.theme.TemplateTheme;
import com.fr.widgettheme.theme.panel.WidgetTextStylePane;
import com.fr.widgettheme.theme.widget.style.BorderStyle;
import com.fr.widgettheme.theme.widget.style.FontSizeStyle;
import com.fr.widgettheme.theme.widget.style.MobileThemedWidgetStyle;
import com.fr.design.gui.icombobox.LineComboBox;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.widgettheme.theme.widget.theme.WidgetThemeDisplayConstants;
import java.util.Arrays;
@ -39,8 +38,8 @@ public class MobileWidgetStyleEditPane<T extends TemplateTheme> extends WidgetSt
}
@Override
protected void initFontSizeComoBox() {
fontSizeComoBox = new UIComboBox(FONT_SIZES);
protected void initTextStylePane() {
textStylePane = new WidgetTextStylePane(FONT_SIZES, 140);
}
@Override
@ -53,7 +52,7 @@ public class MobileWidgetStyleEditPane<T extends TemplateTheme> extends WidgetSt
colorSelectBox.setSelectObject(style.getThemeColor());
lineComboBox.setSelectedLineStyle(style.getBorderStyle().getLineType());
borderRadiusSpinner.setValue(style.getBorderStyle().getRadius());
fontSizeComoBox.setSelectedItem(style.getFontSizeStyle().getFontSize());
textStylePane.setTextStyle(style.getTextStyle());
}
@Override
@ -68,9 +67,7 @@ public class MobileWidgetStyleEditPane<T extends TemplateTheme> extends WidgetSt
borderStyle.setLineType(lineComboBox.getSelectedLineStyle());
borderStyle.setRadius((int) borderRadiusSpinner.getValue());
style.setBorderStyle(borderStyle);
FontSizeStyle fontSizeStyle = new FontSizeStyle();
fontSizeStyle.setFontSize((Integer) fontSizeComoBox.getSelectedItem());
style.setFontSizeStyle(fontSizeStyle);
style.setTextStyle(textStylePane.getTextStyle());
}
}

29
designer-base/src/main/java/com/fr/widgettheme/theme/edit/widget/WidgetStyleEditPane.java

@ -4,7 +4,6 @@ import com.fr.base.theme.TemplateTheme;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.designer.IntervalConstants;
import com.fr.design.gui.icombobox.LineComboBox;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ispinner.UISpinner;
import com.fr.design.gui.style.FRFontPane;
@ -14,6 +13,7 @@ import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.style.color.NewColorSelectBox;
import com.fr.stable.StringUtils;
import com.fr.widgettheme.theme.panel.WidgetTextStylePane;
import com.fr.widgettheme.theme.widget.theme.WidgetThemeDisplayConstants;
import org.jetbrains.annotations.Nullable;
@ -39,9 +39,10 @@ public class WidgetStyleEditPane<T extends TemplateTheme> extends BasicBeanPane<
protected LineComboBox lineComboBox;
// 圆角边框
protected UISpinner borderRadiusSpinner;
// 字体大小
protected UIComboBox fontSizeComoBox;
/**
* 文本样式面板
*/
protected WidgetTextStylePane textStylePane;
public WidgetStyleEditPane() {
initComponents();
@ -52,9 +53,9 @@ public class WidgetStyleEditPane<T extends TemplateTheme> extends BasicBeanPane<
initCommonStyleEditor();
double f = TableLayout.PREFERRED;
final double p = TableLayout.PREFERRED;
double[] rowSize = {p, p, p, p, p};
double[] rowSize = {p, p, p, p, p, p};
double[] columnSize = {p, p};
int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}};
int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}};
Component[][] components = generateComponent();
JPanel customPane = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W1, IntervalConstants.INTERVAL_L1);
customPane.setBorder(BorderFactory.createEmptyBorder(20, 10, 0, 10));
@ -67,25 +68,25 @@ public class WidgetStyleEditPane<T extends TemplateTheme> extends BasicBeanPane<
* @return components
*/
public Component[][] generateComponent() {
Component[][] components = new Component[][]{new Component[]{
return new Component[][]{new Component[]{
new UILabel(Toolkit.i18nText("Fine-Design_Widget_Theme_Color")), colorSelectBox},
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Widget_Theme_Border_Line")), lineComboBox},
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Widget_Theme_Border_Radius")), borderRadiusSpinner},
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Widget_Theme_Font_Size")), fontSizeComoBox}};
return components;
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Widget_Theme_Text_Style")), textStylePane}
};
}
private void initCommonStyleEditor() {
colorSelectBox = new NewColorSelectBox(140, true);
colorSelectBox = new NewColorSelectBox(WidgetThemeDisplayConstants.THEME_WIDGET_COMPONENT_WIDTH, true);
colorSelectBox.setSelectObject(WidgetThemeDisplayConstants.DEFAULT_THEME_COLOR);
initLineBox();
borderRadiusSpinner = new UISpinner(0, Integer.MAX_VALUE, 1);
initFontSizeComoBox();
fontSizeComoBox.setSelectedItem(16);
initTextStylePane();
textStylePane.setFontSizeValue(16);
}
protected void initFontSizeComoBox() {
fontSizeComoBox = new UIComboBox(FRFontPane.getFontSizes());
protected void initTextStylePane() {
textStylePane = new WidgetTextStylePane(FRFontPane.getFontSizes(), WidgetThemeDisplayConstants.THEME_WIDGET_COMPONENT_WIDTH);
}
/**

5
designer-base/src/main/java/com/fr/widgettheme/theme/panel/ControlPreviewCell.java

@ -6,7 +6,6 @@ import com.fr.base.theme.TemplateTheme;
import com.fr.widgettheme.theme.widget.style.ThemedWidgetStyle;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.general.FRFont;
import com.fr.widgettheme.theme.widget.theme.WidgetThemeDisplayConstants;
import com.fr.stable.Constants;
import javax.swing.Icon;
@ -119,7 +118,7 @@ public class ControlPreviewCell extends JPanel {
g.fillRoundRect(0, 0, getSize().width - 1, getSize().height - 1, widgetStyle.getBorderStyle().getRadius(), widgetStyle.getBorderStyle().getRadius());
//需要重新绘制一遍字体,否则会被颜色填充给遮住
Graphics2D g2d = (Graphics2D) g.create();
FRFont font = FRFont.getInstance(FRFont.DEFAULT_FONTNAME, Font.PLAIN, widgetStyle.getFontSizeStyle().getFontSize(), textColor);
FRFont font = FRFont.getInstance(FRFont.DEFAULT_FONTNAME, Font.PLAIN, widgetStyle.getTextStyle().getFontSize(), textColor);
BaseUtils.drawStringStyleInRotation(g2d, getWidth(), getHeight(), this.value,
Style.getInstance(font).deriveHorizontalAlignment(Constants.LEFT)
.deriveTextStyle(Style.TEXTSTYLE_SINGLELINE), NO_SCALE_RESOLUTION);
@ -133,7 +132,7 @@ public class ControlPreviewCell extends JPanel {
}
Graphics2D g2d = (Graphics2D) g.create();
ThemedWidgetStyle widgetStyle = (ThemedWidgetStyle) reportTheme.getWidgetStyle();
FRFont font = FRFont.getInstance(FRFont.DEFAULT_FONTNAME, Font.PLAIN, widgetStyle.getFontSizeStyle().getFontSize(), textColor);
FRFont font = FRFont.getInstance(FRFont.DEFAULT_FONTNAME, Font.PLAIN, widgetStyle.getTextStyle().getFontSize(), textColor);
//每个预览格子通用的字体绘制
BaseUtils.drawStringStyleInRotation(g2d, getWidth(), getHeight(), this.value,
Style.getInstance(font).deriveHorizontalAlignment(Constants.LEFT)

2
designer-base/src/main/java/com/fr/widgettheme/theme/panel/NormalButtonPreviewCell.java

@ -43,7 +43,7 @@ public class NormalButtonPreviewCell extends ControlPreviewCell {
ThemedWidgetStyle widgetStyle = (ThemedWidgetStyle) reportTheme.getWidgetStyle();
paintBgColor(g, widgetStyle);
uiLabel.setForeground(Color.WHITE);
FRFont font = FRFont.getInstance(FRFont.DEFAULT_FONTNAME, Font.PLAIN, widgetStyle.getFontSizeStyle().getFontSize(), Color.WHITE);
FRFont font = FRFont.getInstance(FRFont.DEFAULT_FONTNAME, Font.PLAIN, widgetStyle.getTextStyle().getFontSize(), Color.WHITE);
uiLabel.setFont(font);
this.add(uiLabel, BorderLayout.CENTER);
}

70
designer-base/src/main/java/com/fr/widgettheme/theme/panel/WidgetTextStylePane.java

@ -0,0 +1,70 @@
package com.fr.widgettheme.theme.panel;
import com.fr.design.gui.ibutton.UIColorButton;
import com.fr.design.gui.frpane.FontSizeComboPane;
import com.fr.widgettheme.theme.widget.style.ThemeTextStyle;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.util.Vector;
/**
* 控件文本样式配置面板
* 包含文本字体大小和字体颜色
*
* @author oBo
* @since 11.0
* Created on 2023/12/13
*/
public class WidgetTextStylePane extends JPanel {
private final FontSizeComboPane fontSizePane;
private final UIColorButton fontColorButton;
public WidgetTextStylePane(int preferredWidth) {
this(null, preferredWidth);
}
public WidgetTextStylePane(Vector<Integer> fontSizes, int preferredWidth) {
this.setLayout(new FlowLayout(FlowLayout.LEFT));
this.setBorder(BorderFactory.createEmptyBorder());
fontSizePane = new FontSizeComboPane(fontSizes);
fontColorButton = new UIColorButton();
fontSizePane.setPreferredSize(new Dimension(preferredWidth, fontSizePane.getPreferredSize().height));
this.add(fontSizePane);
this.add(fontColorButton);
}
public void setTextStyle(ThemeTextStyle themeTextStyle) {
this.fontSizePane.setValue(themeTextStyle.getFontSize());
this.fontColorButton.setColor(themeTextStyle.getFontColor());
}
public ThemeTextStyle getTextStyle() {
ThemeTextStyle themeTextStyle = new ThemeTextStyle();
themeTextStyle.setFontSize(this.fontSizePane.getValue());
themeTextStyle.setFontColor(this.fontColorButton.getColor());
return themeTextStyle;
}
public void setFontSizeValue(int fontSize) {
this.fontSizePane.setValue(fontSize);
}
public void setFontColorValue(Color fontColor) {
this.fontColorButton.setColor(fontColor);
}
public int getFontSizeValue() {
return this.fontSizePane.getValue();
}
public Color getFontColorValue() {
return this.fontColorButton.getColor();
}
}

2
designer-form/src/main/java/com/fr/design/widget/ui/designer/CheckBoxDefinePane.java

@ -13,7 +13,7 @@ import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.widgettheme.processor.WidgetThemeParaCreatorPaneAdder;
import com.fr.design.widget.ui.designer.component.FontSizeComboPane;
import com.fr.design.gui.frpane.FontSizeComboPane;
import com.fr.design.widget.ui.designer.component.FormWidgetValuePane;
import com.fr.form.ui.CheckBox;
import com.fr.general.GeneralContext;

2
designer-form/src/main/java/com/fr/design/widget/ui/designer/FieldEditorDefinePane.java

@ -20,7 +20,7 @@ import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.widget.ui.designer.component.FontSizeComboPane;
import com.fr.design.gui.frpane.FontSizeComboPane;
import com.fr.form.ui.FieldEditor;
import com.fr.general.GeneralContext;
import com.fr.log.FineLoggerFactory;

2
designer-form/src/main/java/com/fr/design/widget/ui/designer/MultiFileEditorPane.java

@ -10,7 +10,7 @@ import com.fr.design.gui.ispinner.UISpinner;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.widget.ui.designer.component.FontSizeComboPane;
import com.fr.design.gui.frpane.FontSizeComboPane;
import com.fr.form.ui.MultiFileEditor;

49
designer-form/src/main/java/com/fr/design/widgettheme/BaseStyleSettingPane.java

@ -1,8 +1,9 @@
package com.fr.design.widgettheme;
import com.fr.base.theme.TemplateTheme;
import com.fr.widgettheme.theme.panel.WidgetTextStylePane;
import com.fr.widgettheme.theme.widget.style.BorderStyle;
import com.fr.widgettheme.theme.widget.style.FontSizeStyle;
import com.fr.widgettheme.theme.widget.style.ThemeTextStyle;
import com.fr.widgettheme.theme.widget.style.ThemedWidgetStyle;
import com.fr.widgettheme.theme.bean.ButtonBackground;
import com.fr.design.beans.BasicBeanPane;
@ -19,7 +20,6 @@ import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.JTemplate;
import com.fr.design.style.color.NewColorSelectBox;
import com.fr.design.widget.ui.designer.component.FontSizeComboPane;
import com.fr.design.widget.ui.designer.component.UIBoundSpinner;
import com.fr.form.ui.Widget;
import com.fr.general.FRFont;
@ -59,12 +59,16 @@ public abstract class BaseStyleSettingPane<T extends Widget> extends BasicBeanPa
protected LineComboBox lineComboBox;
// 圆角边框
protected UIBoundSpinner borderRadiusSpinner;
// 字体大小
protected FontSizeComboPane fontSizePane;
// 字体详细设置
protected FRFontPane frFontPane;
// 按钮背景设置
protected ButtonStyleDefinedPane buttonStyleDefinedPane;
/**
* 文本样式
* 包含字体大小字体颜色
*/
protected WidgetTextStylePane textStylePane;
protected NewColorSelectBox selectBgColorBox;
private final Map<StyleSetting, UILabel> labelMap = new HashMap<>();
private final Map<StyleSetting, Component> paneMap = new HashMap<>();
@ -87,17 +91,19 @@ public abstract class BaseStyleSettingPane<T extends Widget> extends BasicBeanPa
initStyle();
colorSelectBox = new NewColorSelectBox(160, true);
lineComboBox = new LineComboBox(WidgetThemeDisplayConstants.BORDER_LINE_STYLE_ARRAY);
fontSizePane = new FontSizeComboPane();
borderRadiusSpinner = new UIBoundSpinner(0, Integer.MAX_VALUE, 1);
frFontPane = new FRFontPane();
buttonStyleDefinedPane = new ButtonStyleDefinedPane();
textStylePane = new WidgetTextStylePane(100);
selectBgColorBox = new NewColorSelectBox(160, true);
paneMap.put(StyleSetting.STYLE_TYPE, createStyleTypePane());
paneMap.put(StyleSetting.THEME_COLOR, colorSelectBox);
paneMap.put(StyleSetting.LINE_TYPE, lineComboBox);
paneMap.put(StyleSetting.FONT_SIZE, fontSizePane);
paneMap.put(StyleSetting.TEXT_STYLE, textStylePane);
paneMap.put(StyleSetting.BORDER_RADIUS, borderRadiusSpinner);
paneMap.put(StyleSetting.FONT, frFontPane);
paneMap.put(StyleSetting.BTN_BACKGROUND, buttonStyleDefinedPane);
paneMap.put(StyleSetting.SELECT_COLOR, selectBgColorBox);
}
/**
@ -200,9 +206,10 @@ public abstract class BaseStyleSettingPane<T extends Widget> extends BasicBeanPa
setStyle(widgetStyle);
setLineComboBox(widgetStyle);
setBorderRadiusSpinner(widgetStyle);
setFontSizePane(widgetStyle);
setFrFontPane(widgetStyle);
setTextStylePane(widgetStyle);
setFrFontPane();
setButtonStyleDefinedPane(widgetStyle);
setSelectBgColor(widgetStyle);
}
private void setColorSelectBox(ThemedWidgetStyle widgetStyle) {
@ -234,15 +241,13 @@ public abstract class BaseStyleSettingPane<T extends Widget> extends BasicBeanPa
}
}
private void setFontSizePane(ThemedWidgetStyle widgetStyle) {
if (fontSizePane != null) {
fontSizePane.setValue(widgetStyle.getFontSizeStyle().getFontSize());
}
private void setTextStylePane(ThemedWidgetStyle widgetStyle) {
this.textStylePane.setTextStyle(widgetStyle.getTextStyle());
}
private void setFrFontPane(ThemedWidgetStyle widgetStyle) {
private void setFrFontPane() {
if (frFontPane != null) {
frFontPane.populateBean(widgetStyle.getFontStyle().getFont());
frFontPane.populateBean(FRFont.getInstance());
}
}
@ -264,12 +269,21 @@ public abstract class BaseStyleSettingPane<T extends Widget> extends BasicBeanPa
if (borderRadiusSpinner != null) {
borderRadiusSpinner.setValue(BorderStyle.DEFAULT_BORDER_RADIUS);
}
if (fontSizePane != null) {
fontSizePane.setValue(FontSizeStyle.DEFAULT_FONT_SIZE);
if (textStylePane != null) {
textStylePane.setTextStyle(new ThemeTextStyle());
}
if (frFontPane != null) {
frFontPane.populateBean(FRFont.getInstance());
}
if (selectBgColorBox != null) {
selectBgColorBox.setSelectObject(null);
}
}
private void setSelectBgColor(ThemedWidgetStyle widgetStyle) {
if(selectBgColorBox != null) {
selectBgColorBox.setSelectObject(widgetStyle.getSelectBackgroundColor());
}
}
/**
@ -277,11 +291,12 @@ public abstract class BaseStyleSettingPane<T extends Widget> extends BasicBeanPa
*/
private void initLabelMap() {
labelMap.put(StyleSetting.THEME_COLOR, new UILabel(Toolkit.i18nText("Fine-Design_Widget_Theme_Color")));
labelMap.put(StyleSetting.FONT_SIZE, new UILabel(Toolkit.i18nText("Fine-Design_Widget_Theme_Font_Size")));
labelMap.put(StyleSetting.TEXT_STYLE, new UILabel(Toolkit.i18nText("Fine-Design_Widget_Theme_Text_Style")));
labelMap.put(StyleSetting.FONT, new UILabel(Toolkit.i18nText("Fine-Design_Widget_Theme_Font")));
labelMap.put(StyleSetting.STYLE_TYPE, new UILabel(Toolkit.i18nText("Fine-Design_Widget_Theme_Style")));
labelMap.put(StyleSetting.LINE_TYPE, new UILabel(Toolkit.i18nText("Fine-Design_Widget_Theme_Border_Line")));
labelMap.put(StyleSetting.BORDER_RADIUS, new UILabel(Toolkit.i18nText("Fine-Design_Widget_Theme_Border_Radius")));
labelMap.put(StyleSetting.BTN_BACKGROUND, new UILabel(Toolkit.i18nText("Fine-Design_Theme_Widget_Background")));
labelMap.put(StyleSetting.SELECT_COLOR, new UILabel(Toolkit.i18nText("Fine-Design_Widget_Background_Select_Box")));
}
}

7
designer-form/src/main/java/com/fr/design/widgettheme/ParaButtonSettingPane.java

@ -1,6 +1,5 @@
package com.fr.design.widgettheme;
import com.fr.widgettheme.theme.widget.style.FontSizeStyle;
import com.fr.design.widgettheme.common.ButtonSettingPane;
import com.fr.form.ui.Widget;
import com.fr.widgettheme.theme.widget.theme.ParaButtonTheme;
@ -22,7 +21,7 @@ public class ParaButtonSettingPane<T extends Widget> extends ButtonSettingPane<T
super(Arrays.asList(
StyleSetting.THEME_COLOR,
StyleSetting.STYLE_TYPE,
StyleSetting.FONT_SIZE
StyleSetting.TEXT_STYLE
));
}
@ -34,13 +33,13 @@ public class ParaButtonSettingPane<T extends Widget> extends ButtonSettingPane<T
@Override
protected void assignFontSizePane(ButtonTheme buttonTheme) {
ParaButtonTheme paraButtonTheme = (ParaButtonTheme) buttonTheme;
fontSizePane.setValue(paraButtonTheme.getFontSizeStyle().getFontSize());
textStylePane.setTextStyle(paraButtonTheme.getTextStyle());
}
@Override
protected void assignFontSizeStyle(ButtonTheme buttonTheme) {
ParaButtonTheme paraButtonTheme = (ParaButtonTheme) buttonTheme;
paraButtonTheme.setFontSizeStyle(new FontSizeStyle(fontSizePane.getValue()));
paraButtonTheme.setTextStyle(textStylePane.getTextStyle());
}
}

12
designer-form/src/main/java/com/fr/design/widgettheme/ParaEditorSettingPane.java

@ -1,12 +1,12 @@
package com.fr.design.widgettheme;
import com.fr.widgettheme.theme.widget.style.FontSizeStyle;
import com.fr.design.widgettheme.common.EditorSettingPane;
import com.fr.form.ui.Widget;
import com.fr.widgettheme.theme.widget.theme.ParaEditorTheme;
import com.fr.widgettheme.theme.widget.theme.cell.EditorTheme;
import java.util.Arrays;
import java.util.List;
/**
@ -25,20 +25,24 @@ public class ParaEditorSettingPane<T extends Widget> extends EditorSettingPane<T
StyleSetting.STYLE_TYPE,
StyleSetting.LINE_TYPE,
StyleSetting.BORDER_RADIUS,
StyleSetting.FONT_SIZE
StyleSetting.TEXT_STYLE
));
}
public ParaEditorSettingPane(List<StyleSetting> styleSettingList) {
super(styleSettingList);
}
@Override
protected void assignFontSizePane(EditorTheme widgetTheme) {
ParaEditorTheme paraEditorTheme= (ParaEditorTheme) widgetTheme;
fontSizePane.setValue(paraEditorTheme.getFontSizeStyle().getFontSize());
textStylePane.setTextStyle(paraEditorTheme.getTextStyle());
}
@Override
protected void assignFontSizeStyle(EditorTheme widgetTheme) {
ParaEditorTheme paraEditorTheme= (ParaEditorTheme) widgetTheme;
paraEditorTheme.setFontSizeStyle(new FontSizeStyle(fontSizePane.getValue()));
paraEditorTheme.setTextStyle(textStylePane.getTextStyle());
}
@Override

50
designer-form/src/main/java/com/fr/design/widgettheme/ParaSelectEditorSettingPane.java

@ -0,0 +1,50 @@
package com.fr.design.widgettheme;
import com.fr.form.ui.Widget;
import com.fr.widgettheme.theme.widget.theme.ParaEditorTheme;
import com.fr.widgettheme.theme.widget.theme.ParaSelectEditorTheme;
import com.fr.widgettheme.theme.widget.theme.cell.EditorTheme;
import java.util.Arrays;
/**
* 参数面板下拉框编辑控件配置面板
* 继承自编辑控件配置面板添加一个下拉框背景色
*
* @author obo
* @since 11.0
* Created on 2023/12/13
*/
public class ParaSelectEditorSettingPane<T extends Widget> extends ParaEditorSettingPane<T> {
public ParaSelectEditorSettingPane() {
super(Arrays.asList(
StyleSetting.THEME_COLOR,
StyleSetting.SELECT_COLOR,
StyleSetting.STYLE_TYPE,
StyleSetting.LINE_TYPE,
StyleSetting.BORDER_RADIUS,
StyleSetting.TEXT_STYLE
));
}
@Override
protected void populateEditorBean(EditorTheme editorTheme) {
ParaSelectEditorTheme paraSelectEditorTheme= new ParaSelectEditorTheme(editorTheme);
if (!editorTheme.isFollowTheme()) {
selectBgColorBox.setSelectObject(paraSelectEditorTheme.getSelectBoxBgColor());
}
super.populateEditorBean(editorTheme);
}
@Override
protected void updateEditorStyleBean(EditorTheme editorTheme) {
ParaSelectEditorTheme paraSelectEditorTheme= new ParaSelectEditorTheme(editorTheme);
paraSelectEditorTheme.setSelectBoxBgColor(selectBgColorBox.getSelectObject());
super.updateEditorStyleBean(editorTheme);
}
@Override
protected EditorTheme getEditorTheme() {
return new ParaSelectEditorTheme();
}
}

7
designer-form/src/main/java/com/fr/design/widgettheme/ParaTreeEditorSettingPane.java

@ -1,6 +1,5 @@
package com.fr.design.widgettheme;
import com.fr.widgettheme.theme.widget.style.FontSizeStyle;
import com.fr.design.widgettheme.common.TreeEditorSettingPane;
import com.fr.form.ui.TreeEditor;
import com.fr.widgettheme.theme.widget.theme.ParaTreeTheme;
@ -22,7 +21,7 @@ public class ParaTreeEditorSettingPane<T extends TreeEditor> extends TreeEditorS
super(Arrays.asList(
StyleSetting.THEME_COLOR,
StyleSetting.STYLE_TYPE,
StyleSetting.FONT_SIZE
StyleSetting.TEXT_STYLE
));
}
@ -34,12 +33,12 @@ public class ParaTreeEditorSettingPane<T extends TreeEditor> extends TreeEditorS
@Override
protected void assignFontSizePane(TreeTheme widgetTheme) {
ParaTreeTheme paraTreeTheme= (ParaTreeTheme) widgetTheme;
fontSizePane.setValue(paraTreeTheme.getFontSizeStyle().getFontSize());
textStylePane.setTextStyle(paraTreeTheme.getTextStyle());
}
@Override
protected void assignFontSizeStyle(TreeTheme widgetTheme) {
ParaTreeTheme paraTreeTheme= (ParaTreeTheme) widgetTheme;
paraTreeTheme.setFontSizeStyle(new FontSizeStyle(fontSizePane.getValue()));
paraTreeTheme.setTextStyle(textStylePane.getTextStyle());
}
}

10
designer-form/src/main/java/com/fr/design/widgettheme/StyleSetting.java

@ -26,9 +26,9 @@ public enum StyleSetting {
*/
BORDER_RADIUS,
/**
* 字体大小
* 文本样式
*/
FONT_SIZE,
TEXT_STYLE,
/**
* 字体
*/
@ -36,6 +36,10 @@ public enum StyleSetting {
/**
* 按钮背景
*/
BTN_BACKGROUND
BTN_BACKGROUND,
/**
* 自定义下拉框颜色
*/
SELECT_COLOR
}

56
designer-form/src/main/java/com/fr/design/widgettheme/common/SelectEditorSettingPane.java

@ -0,0 +1,56 @@
package com.fr.design.widgettheme.common;
import com.fr.design.widgettheme.StyleSetting;
import com.fr.form.ui.Widget;
import com.fr.widgettheme.theme.widget.theme.cell.EditorTheme;
import com.fr.widgettheme.theme.widget.theme.cell.SelectEditTheme;
import java.util.Arrays;
import java.util.List;
/**
* 单元格下拉框编辑控件配置面板
* 继承自编辑控件配置面板添加一个下拉框背景色
*
* @author obo
* @since 11.0
* Created on 2023/12/13
*/
public class SelectEditorSettingPane <T extends Widget> extends EditorSettingPane<T> {
public SelectEditorSettingPane() {
super(Arrays.asList(
StyleSetting.THEME_COLOR,
StyleSetting.SELECT_COLOR,
StyleSetting.STYLE_TYPE,
StyleSetting.LINE_TYPE,
StyleSetting.BORDER_RADIUS
));
}
@Override
protected String title4PopupWindow() {
return "selectEditorSetting";
}
@Override
protected EditorTheme getEditorTheme() {
return new SelectEditTheme();
}
@Override
protected void populateEditorBean(EditorTheme editorTheme) {
SelectEditTheme selectEditTheme = new SelectEditTheme(editorTheme);
if (!selectEditTheme.isFollowTheme()) {
selectBgColorBox.setSelectObject(selectEditTheme.getSelectBoxBgColor());
}
super.populateEditorBean(selectEditTheme);
}
@Override
protected void updateEditorStyleBean(EditorTheme editorTheme) {
SelectEditTheme selectEditTheme = new SelectEditTheme(editorTheme);
selectEditTheme.setSelectBoxBgColor(selectBgColorBox.getSelectObject());
super.updateEditorStyleBean(selectEditTheme);
}
}

24
designer-form/src/main/java/com/fr/design/widgettheme/processor/WidgetThemeCreatorPaneAdder.java

@ -1,5 +1,6 @@
package com.fr.design.widgettheme.processor;
import com.fr.design.widgettheme.common.SelectEditorSettingPane;
import com.fr.widgettheme.util.WidgetThemeDesignerUtils;
import com.fr.design.beans.BasicBeanPane;
import com.fr.form.parameter.FormSubmitButton;
@ -50,11 +51,7 @@ public class WidgetThemeCreatorPaneAdder {
TextArea.class,
TextEditor.class,
NumberEditor.class,
Password.class,
ComboBox.class,
ComboCheckBox.class,
DateEditor.class,
TreeComboBoxEditor.class
Password.class
));
/**
@ -69,6 +66,16 @@ public class WidgetThemeCreatorPaneAdder {
Button.class
));
/**
* 下拉框相关控件类
*/
private static final Set<Class<?>> SELECT_SET = new HashSet<>(Arrays.asList(
DateEditor.class,
TreeComboBoxEditor.class,
ComboBox.class,
ComboCheckBox.class
));
/**
* 遍历判断当前控件creator类型将符合条件的窗口添加到extraPaneList中
*
@ -81,6 +88,7 @@ public class WidgetThemeCreatorPaneAdder {
acceptTree(creator, extraPaneList);
acceptNormal(creator, extraPaneList);
acceptButton(creator, extraPaneList);
acceptSelect(creator, extraPaneList);
}
}
@ -117,4 +125,10 @@ public class WidgetThemeCreatorPaneAdder {
}
}
private static <T> void acceptSelect(Class<?> creator, List<BasicBeanPane<T>> extraPaneList) {
boolean accept = SELECT_SET.contains(creator);
if (accept) {
insertShortCut(extraPaneList, new SelectEditorSettingPane<>());
}
}
}

19
designer-form/src/main/java/com/fr/design/widgettheme/processor/WidgetThemeParaCreatorPaneAdder.java

@ -1,5 +1,6 @@
package com.fr.design.widgettheme.processor;
import com.fr.design.widgettheme.ParaSelectEditorSettingPane;
import com.fr.widgettheme.util.WidgetThemeDesignerUtils;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.designer.creator.XButton;
@ -47,6 +48,7 @@ public class WidgetThemeParaCreatorPaneAdder {
public static <T> void add(XCreator creator, List<BasicBeanPane<T>> extraPaneList) {
if (WidgetThemeDesignerUtils.enableWidgetEnhance()) {
acceptEditor(creator, extraPaneList);
acceptSelect(creator, extraPaneList);
acceptRoot(creator, extraPaneList);
acceptTree(creator, extraPaneList);
acceptLabel(creator, extraPaneList);
@ -60,17 +62,22 @@ public class WidgetThemeParaCreatorPaneAdder {
}
private static <T> void acceptEditor(XCreator creator, List<BasicBeanPane<T>> extraPaneList) {
boolean accept = creator instanceof XWrapperedFieldEditor
|| creator instanceof XTextArea
|| creator instanceof XComboBox
|| creator instanceof XDateEditor
|| creator instanceof XTreeComboBoxEditor
|| WidgetThemeServerUtils.isNewComboBoxTreeEditor(creator);
boolean accept = creator instanceof XWrapperedFieldEditor || creator instanceof XTextArea;
if (accept) {
insertShortCut(extraPaneList, new ParaEditorSettingPane<>());
}
}
private static <T> void acceptSelect(XCreator creator, List<BasicBeanPane<T>> extraPaneList) {
boolean accept = creator instanceof XComboBox
|| creator instanceof XDateEditor
|| creator instanceof XTreeComboBoxEditor
|| WidgetThemeServerUtils.isNewComboBoxTreeEditor(creator);
if (accept) {
insertShortCut(extraPaneList, new ParaSelectEditorSettingPane<>());
}
}
private static <T> void acceptRoot(XCreator creator, List<BasicBeanPane<T>> extraPaneList) {
boolean accept = creator instanceof XWParameterLayout;
if (accept) {

37
designer-realize/src/main/java/com/fr/design/webattr/EditToolBar.java

@ -3,6 +3,7 @@ package com.fr.design.webattr;
import com.fr.base.BaseUtils;
import com.fr.design.ExtraDesignClassManager;
import com.fr.design.actions.UpdateAction;
import com.fr.design.designer.IntervalConstants;
import com.fr.design.dialog.BasicDialog;
import com.fr.design.dialog.BasicPane;
import com.fr.design.dialog.DialogActionAdapter;
@ -10,11 +11,13 @@ import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.fun.ExportToolBarProvider;
import com.fr.design.fun.ExtraButtonToolBarProvider;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ispinner.UIBasicSpinner;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.gui.itoolbar.UIToolbar;
import com.fr.design.i18n.Toolkit;
import com.fr.design.javascript.JavaScriptActionPane;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout;
@ -38,6 +41,7 @@ import com.fr.report.web.button.write.AppendColumnRow;
import com.fr.report.web.button.write.Submit;
import com.fr.stable.ArrayUtils;
import com.fr.stable.StringUtils;
import com.fr.widgettheme.util.WidgetThemeDesignerUtils;
import com.fr.write.JavaScriptResourceInfo;
import javax.swing.BorderFactory;
@ -86,6 +90,8 @@ public class EditToolBar extends BasicPane {
private Background background = null;
private UICheckBox defaultCheckBox;
private UIButtonGroup<String> bgColorButtonGroup;
private ListSelectionListener listSelectionListener = new ListSelectionListener() {
public void valueChanged(ListSelectionEvent evt) {
if (lastButton != null) {
@ -163,12 +169,19 @@ public class EditToolBar extends BasicPane {
splitPane.setDividerLocation(120);
this.add(splitPane);
list.addListSelectionListener(listSelectionListener);
JPanel backgroundPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
JPanel backgroundPane = FRGUIPaneFactory.createVerticalFlowLayout_Pane(true, 0, 0, 0);
UIButton bgButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Set_Background"));
defaultCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Default_Background"));
bgButton.addActionListener(actioner);
backgroundPane.add(defaultCheckBox);
backgroundPane.add(bgButton);
JPanel bgPanel = new JPanel();
bgPanel.add(defaultCheckBox);
bgPanel.add(bgButton);
backgroundPane.add(bgPanel);
if(WidgetThemeDesignerUtils.enableWidgetEnhance()) {
backgroundPane.add(createButtonColorGroup());
}
backgroundPane.setBorder(BorderFactory.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Set_Background")));
this.add(backgroundPane, BorderLayout.SOUTH);
}
@ -213,6 +226,9 @@ public class EditToolBar extends BasicPane {
this.background = ftoolbar.getBackground();
this.defaultCheckBox.setSelected(ftoolbar.isDefault() ? true : false);
if (bgColorButtonGroup != null) {
this.bgColorButtonGroup.setSelectedIndex(ftoolbar.isBgColorLight() ? 0 : 1);
}
}
public FToolBar update() {
@ -246,6 +262,9 @@ public class EditToolBar extends BasicPane {
if (!ftoolBar.isDefault()) {
ftoolBar.setBackground(this.background);
}
if (bgColorButtonGroup != null) {
ftoolBar.setBgColorLight(bgColorButtonGroup.getSelectedIndex() == 0);
}
return ftoolBar;
}
@ -708,4 +727,20 @@ public class EditToolBar extends BasicPane {
}
}
private JPanel createButtonColorGroup() {
UILabel headLabel = new UILabel(Toolkit.i18nText("Fine-Design_ToolBar_Button_Color"));
String[] titles = new String[]{Toolkit.i18nText("Fine-Design_ToolBar_Button_Color_Light"), Toolkit.i18nText("Fine-Design_ToolBar_Button_Color_Dark")};
bgColorButtonGroup = new UIButtonGroup<String>(titles) {
@Override
public void setSelectedIndex(int newSelectedIndex, boolean fireChanged) {
super.setSelectedIndex(newSelectedIndex, fireChanged);
}
};
bgColorButtonGroup.setPreferredSize(new Dimension(135, bgColorButtonGroup.getPreferredSize().height));
JPanel headPane = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane(IntervalConstants.INTERVAL_L5, 0);
headPane.add(headLabel);
headPane.add(bgColorButtonGroup);
headPane.setBorder(BorderFactory.createEmptyBorder(0, IntervalConstants.INTERVAL_L2, 0, 0));
return headPane;
}
}

10
designer-realize/src/main/java/com/fr/design/webattr/FToolBar.java

@ -12,6 +12,7 @@ public class FToolBar {
private Background background = null;
private boolean isDefault = true;
private boolean buttonBgColorLight = true;
public List<ToolBarButton> getButtonlist() {
return buttonlist;
}
@ -52,6 +53,14 @@ public class FToolBar {
this.isDefault = isDefault;
}
public boolean isBgColorLight() {
return buttonBgColorLight;
}
public void setBgColorLight(boolean bgColorLight) {
this.buttonBgColorLight = bgColorLight;
}
public ToolBar getToolBar() {
Widget[] n = new Widget[this.getButtonlist().size()];
for (int j = 0; j < this.getButtonlist().size(); j++) {
@ -60,6 +69,7 @@ public class FToolBar {
ToolBar toolBar = new ToolBar(n);
toolBar.setBackground(this.background);
toolBar.setDefault(this.isDefault);
toolBar.setButtonBgColorLight(this.buttonBgColorLight);
return toolBar;
}
}

2
designer-realize/src/main/java/com/fr/design/webattr/ToolBarPane.java

@ -12,7 +12,6 @@ import com.fr.form.ui.Widget;
import com.fr.report.web.annotation.OldPrintMethod;
import javax.swing.BorderFactory;
import javax.swing.JOptionPane;
import javax.swing.SwingUtilities;
import javax.swing.TransferHandler;
import java.awt.Component;
@ -158,6 +157,7 @@ public class ToolBarPane extends BasicBeanPane<ToolBar> {
}
this.getFToolBar().setBackground(toolbar.getBackground());
this.getFToolBar().setDefault(toolbar.isDefault());
this.getFToolBar().setBgColorLight(toolbar.isButtonBgColorLight());
setPopulateFinished(true);
}

Loading…
Cancel
Save