diff --git a/designer-base/src/main/java/com/fr/widgettheme/widget/mobile/pane/FileEditorMobileStyleDefinePane.java b/designer-base/src/main/java/com/fr/widgettheme/widget/mobile/pane/FileEditorMobileStyleDefinePane.java index 801585f429..a56e84aaa6 100644 --- a/designer-base/src/main/java/com/fr/widgettheme/widget/mobile/pane/FileEditorMobileStyleDefinePane.java +++ b/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(); diff --git a/designer-base/src/main/java/com/fr/widgettheme/widget/mobile/provider/WidgetThemeMobileStyleDefinePaneCreator.java b/designer-base/src/main/java/com/fr/widgettheme/widget/mobile/provider/WidgetThemeMobileStyleDefinePaneCreator.java index 840d67ba92..a8aca84dcc 100644 --- a/designer-base/src/main/java/com/fr/widgettheme/widget/mobile/provider/WidgetThemeMobileStyleDefinePaneCreator.java +++ b/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); } /** * 创建移动端控件样式属性窗口 diff --git a/designer-form/src/main/java/com/fr/design/widgettheme/BaseStyleSettingPane.java b/designer-form/src/main/java/com/fr/design/widgettheme/BaseStyleSettingPane.java index 100098a446..ef93914823 100644 --- a/designer-form/src/main/java/com/fr/design/widgettheme/BaseStyleSettingPane.java +++ b/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 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 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) {