|
|
|
@ -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(); |
|
|
|
|