Browse Source

Pull request #13564: REPORT-111619 控件增强-更多的样式配置--报表支撑 自测问题修复

Merge in DESIGN/design from ~OBO/design1:release/11.0 to release/11.0

* commit 'b269562fa7af7d6138d497150df45b2e1e6f82df':
  REPORT-111619 控件基础面板的字体名面板初始化
  REPORT-111619 控件增强-更多的样式配置--报表支撑 自测问题修复
release/11.0
Obo-王学仁 9 months ago
parent
commit
1dfb1851f1
  1. 10
      designer-base/src/main/java/com/fr/widgettheme/widget/mobile/pane/FileEditorMobileStyleDefinePane.java
  2. 2
      designer-base/src/main/java/com/fr/widgettheme/widget/mobile/provider/WidgetThemeMobileStyleDefinePaneCreator.java
  3. 11
      designer-form/src/main/java/com/fr/design/widgettheme/BaseStyleSettingPane.java

10
designer-base/src/main/java/com/fr/widgettheme/widget/mobile/pane/FileEditorMobileStyleDefinePane.java

@ -1,6 +1,7 @@
package com.fr.widgettheme.widget.mobile.pane;
import com.fr.base.background.ColorBackground;
import com.fr.util.ColorUtils;
import com.fr.widgettheme.theme.widget.mobile.style.FileEditorStyle;
import com.fr.design.mainframe.mobile.ui.MobileStyleCustomDefinePane;
import com.fr.form.ui.Widget;
@ -8,6 +9,8 @@ import com.fr.form.ui.mobile.MobileCommonExtraStyle;
import com.fr.form.ui.mobile.MobileStyle;
import com.fr.invoke.Reflect;
import java.awt.Color;
/**
* 文件属性定义面板
*
@ -28,7 +31,9 @@ public class FileEditorMobileStyleDefinePane extends DisplayEnhanceMobileStyleDe
FileEditorStyle style = (FileEditorStyle) extraStyle;
customCombo.setSelectedIndex(style.isCustom() ? 1 : 0);
if (style.getWidgetBackground() != null) {
widgetBackgroundSelectBox.setSelectObject(((ColorBackground) style.getWidgetBackground()).getColor());
Color widgetBackgroundColor = ((ColorBackground) style.getWidgetBackground()).getColor();
widgetBackgroundSelectBox.setSelectObject(ColorUtils.ignoreColorAlpha(widgetBackgroundColor));
widgetBgAlphaDragPane.populateBean(ColorUtils.roundColorAlphaDouble(widgetBackgroundColor));
}
borderType.setSelectedLineStyle(style.getBorderType());
borderRadius.setValue(style.getBorderRadius());
@ -41,9 +46,10 @@ public class FileEditorMobileStyleDefinePane extends DisplayEnhanceMobileStyleDe
mobileStyle = Reflect.on(mobileStyleClazz).create().get();
FileEditorStyle extraStyle = new FileEditorStyle();
extraStyle.setCustom(customCombo.getSelectedIndex() == 1);
extraStyle.setWidgetBackground(ColorBackground.getInstance(widgetBackgroundSelectBox.getSelectObject()));
extraStyle.setWidgetBackground(ColorUtils.createColorBackgroundWithAlpha(widgetBackgroundSelectBox.getSelectObject(), widgetBgAlphaDragPane.updateBean()));
extraStyle.setBorderType(borderType.getSelectedLineStyle());
extraStyle.setBorderRadius(borderRadius.getValue());
extraStyle.setBorderColor(borderColorSelectBox.getSelectObject());
mobileStyle.setMobileCommonExtraStyle(extraStyle);
this.widget.setMobileStyle(mobileStyle);
this.customBeanPane.updateBean();

2
designer-base/src/main/java/com/fr/widgettheme/widget/mobile/provider/WidgetThemeMobileStyleDefinePaneCreator.java

@ -8,6 +8,7 @@ import com.fr.form.ui.Password;
import com.fr.form.ui.TextArea;
import com.fr.form.ui.TextEditor;
import com.fr.form.ui.TreeComboBoxEditor;
import com.fr.form.ui.TreeEditor;
import com.fr.widgettheme.util.WidgetThemeDesignerUtils;
import com.fr.widgettheme.utils.WidgetThemeServerUtils;
import com.fr.widgettheme.widget.mobile.pane.DisplayEnhanceMobileStyleDefinePane;
@ -60,6 +61,7 @@ public class WidgetThemeMobileStyleDefinePaneCreator {
ICON_WIDGET_SET.add(ComboBox.class);
ICON_WIDGET_SET.add(ComboCheckBox.class);
ICON_WIDGET_SET.add(TreeComboBoxEditor.class);
ICON_WIDGET_SET.add(TreeEditor.class);
}
/**
* 创建移动端控件样式属性窗口

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

@ -7,6 +7,7 @@ import com.fr.design.gui.frpane.UIPercentDragPane;
import com.fr.design.gui.ibutton.UIColorButton;
import com.fr.design.gui.ibutton.UIToggleButton;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.utils.DesignUtils;
import com.fr.general.IOUtils;
import com.fr.util.ColorUtils;
import com.fr.widgettheme.theme.widget.style.BorderStyle;
@ -136,6 +137,7 @@ public abstract class BaseStyleSettingPane<T extends Widget> extends BasicBeanPa
buttonStyleDefinedPane = new ButtonStyleDefinedPane();
selectBgColorBox = new NewColorSelectBox(WidgetThemeDisplayConstants.THEME_WIDGET_COMPONENT_WIDTH, true);
iconColorSelectBox = new NewColorSelectBox(WidgetThemeDisplayConstants.THEME_WIDGET_COMPONENT_WIDTH, true);
fontNameSelectBox = new UIComboBox(DesignUtils.getAvailableFontFamilyNames4Report());
fontSizePane = new FontSizeComboPane();
fontColorButton = new UIColorButton();
bold = new UIToggleButton(IOUtils.readIcon("/com/fr/design/images/m_format/cellstyle/bold.png"));
@ -268,6 +270,15 @@ public abstract class BaseStyleSettingPane<T extends Widget> extends BasicBeanPa
if (fontColorButton != null) {
this.fontColorButton.setColor(textStyle.getFontColor());
}
if (bold != null) {
this.bold.setSelected(textStyle.isBold());
}
if (italic != null) {
this.italic.setSelected(textStyle.isItalic());
}
if (fontNameSelectBox != null) {
this.fontNameSelectBox.setSelectedItem(textStyle.getName());
}
}
private void setFrFontPane(FRFont font) {

Loading…
Cancel
Save