From 2fd5bef6309e0db0e1e014f4374047dce9ce5dc5 Mon Sep 17 00:00:00 2001 From: "coral.chen@fanruan.com" Date: Wed, 12 Apr 2023 16:02:54 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-90316=20=E5=89=8D=E7=AB=AF=E5=BB=B6?= =?UTF-8?q?=E6=9C=9F=EF=BC=8C=E5=90=8E=E7=AB=AF=E4=BB=A3=E7=A0=81=E5=9B=9E?= =?UTF-8?q?=E9=80=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../designer/creator/XNumberEditor.java | 6 - .../fr/design/designer/creator/XPassword.java | 6 - .../fr/design/designer/creator/XTextArea.java | 11 +- .../mobile/NumberEditorMobilePropertyUI.java | 37 ------ .../mobile/PasswordMobilePropertyUI.java | 37 ------ ...yUI.java => ScanCodeMobilePropertyUI.java} | 15 +-- .../mobile/TextAreaMobilePropertyUI.java | 37 ------ .../BaseTextEditorMobileDefinePane.java | 94 --------------- .../mobile/NumberEditorMobileDefinePane.java | 33 ------ .../mobile/PasswordMobileDefinePane.java | 25 ---- .../mobile/ScanCodeMobileDefinePane.java | 63 ++++++++++ .../mobile/TextAreaAdvancedDefinePane.java | 25 ---- .../mobile/TextEditorMobileDefinePane.java | 55 --------- .../MobilePasswordEditSettingPane.java | 43 ------- .../component/MobileTextAreaSettingPane.java | 38 ------ .../component/MobileTextEditSettingPane.java | 59 ---------- .../MobileTextFieldInputSettingPane.java | 109 +----------------- .../widget/WidgetMobilePaneFactory.java | 13 +-- .../ui/mobile/NumberEditorMobilePane.java | 41 ------- .../widget/ui/mobile/PasswordMobilePane.java | 42 ------- .../widget/ui/mobile/ScanCodeMobilePane.java | 39 +++++++ .../widget/ui/mobile/TextAreaMobilePane.java | 42 ------- .../ui/mobile/TextEditorMobilePane.java | 59 ---------- 23 files changed, 114 insertions(+), 815 deletions(-) delete mode 100644 designer-form/src/main/java/com/fr/design/designer/properties/mobile/NumberEditorMobilePropertyUI.java delete mode 100644 designer-form/src/main/java/com/fr/design/designer/properties/mobile/PasswordMobilePropertyUI.java rename designer-form/src/main/java/com/fr/design/designer/properties/mobile/{TextEditorMobilePropertyUI.java => ScanCodeMobilePropertyUI.java} (65%) delete mode 100644 designer-form/src/main/java/com/fr/design/designer/properties/mobile/TextAreaMobilePropertyUI.java delete mode 100644 designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/BaseTextEditorMobileDefinePane.java delete mode 100644 designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/NumberEditorMobileDefinePane.java delete mode 100644 designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/PasswordMobileDefinePane.java create mode 100644 designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ScanCodeMobileDefinePane.java delete mode 100644 designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/TextAreaAdvancedDefinePane.java delete mode 100644 designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/TextEditorMobileDefinePane.java delete mode 100644 designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/component/MobilePasswordEditSettingPane.java delete mode 100644 designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/component/MobileTextAreaSettingPane.java delete mode 100644 designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/component/MobileTextEditSettingPane.java delete mode 100644 designer-realize/src/main/java/com/fr/design/widget/ui/mobile/NumberEditorMobilePane.java delete mode 100644 designer-realize/src/main/java/com/fr/design/widget/ui/mobile/PasswordMobilePane.java create mode 100644 designer-realize/src/main/java/com/fr/design/widget/ui/mobile/ScanCodeMobilePane.java delete mode 100644 designer-realize/src/main/java/com/fr/design/widget/ui/mobile/TextAreaMobilePane.java delete mode 100644 designer-realize/src/main/java/com/fr/design/widget/ui/mobile/TextEditorMobilePane.java diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XNumberEditor.java b/designer-form/src/main/java/com/fr/design/designer/creator/XNumberEditor.java index 8861d6fcbc..fc359976e2 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XNumberEditor.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XNumberEditor.java @@ -6,9 +6,7 @@ package com.fr.design.designer.creator; import com.fr.base.BaseUtils; import com.fr.base.ScreenResolution; import com.fr.base.Style; -import com.fr.design.designer.properties.mobile.NumberEditorMobilePropertyUI; import com.fr.design.form.util.XCreatorConstants; -import com.fr.design.fun.WidgetPropertyUIProvider; import com.fr.design.mainframe.widget.editors.InChangeBooleanEditor; import com.fr.design.mainframe.widget.editors.SpinnerMaxNumberEditor; import com.fr.design.mainframe.widget.editors.SpinnerMinNumberEditor; @@ -104,8 +102,4 @@ public class XNumberEditor extends XWrapperedFieldEditor { return "number_field_16.png"; } - @Override - public WidgetPropertyUIProvider[] getWidgetPropertyUIProviders() { - return new WidgetPropertyUIProvider[]{new NumberEditorMobilePropertyUI(this)}; - } } diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XPassword.java b/designer-form/src/main/java/com/fr/design/designer/creator/XPassword.java index 29de6c9d05..4194e4be03 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XPassword.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XPassword.java @@ -3,9 +3,7 @@ */ package com.fr.design.designer.creator; -import com.fr.design.designer.properties.mobile.PasswordMobilePropertyUI; import com.fr.design.form.util.XCreatorConstants; -import com.fr.design.fun.WidgetPropertyUIProvider; import com.fr.design.gui.ibutton.UIPasswordField; import com.fr.design.mainframe.widget.editors.RegexEditor; import com.fr.design.mainframe.widget.editors.WidgetValueEditor; @@ -70,8 +68,4 @@ public class XPassword extends XWrapperedFieldEditor { (CRPropertyDescriptor[]) ArrayUtils.addAll(sup, new CRPropertyDescriptor[]{regex, waterMark}); } - @Override - public WidgetPropertyUIProvider[] getWidgetPropertyUIProviders() { - return new WidgetPropertyUIProvider[]{new PasswordMobilePropertyUI(this)}; - } } diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XTextArea.java b/designer-form/src/main/java/com/fr/design/designer/creator/XTextArea.java index 88d0391ceb..845fe43d9e 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XTextArea.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XTextArea.java @@ -6,9 +6,7 @@ package com.fr.design.designer.creator; import com.fr.base.BaseUtils; import com.fr.base.ScreenResolution; import com.fr.base.Style; -import com.fr.design.designer.properties.mobile.TextAreaMobilePropertyUI; import com.fr.design.form.util.XCreatorConstants; -import com.fr.design.fun.WidgetPropertyUIProvider; import com.fr.design.mainframe.widget.editors.RegexEditor; import com.fr.design.mainframe.widget.editors.WidgetValueEditor; import com.fr.design.mainframe.widget.renderer.RegexCellRencerer; @@ -27,9 +25,8 @@ import java.beans.IntrospectionException; /** * @author richer * @since 6.5.3 - * Created on 2016/3/29 */ -public class XTextArea extends XWrapperedFieldEditor { +public class XTextArea extends XFieldEditor { public XTextArea(TextArea widget, Dimension initSize) { super(widget, initSize); @@ -84,10 +81,4 @@ public class XTextArea extends XWrapperedFieldEditor { protected String getIconName() { return "text_area_16.png"; } - - @Override - public WidgetPropertyUIProvider[] getWidgetPropertyUIProviders() { - return new WidgetPropertyUIProvider[]{new TextAreaMobilePropertyUI(this)}; - } - } diff --git a/designer-form/src/main/java/com/fr/design/designer/properties/mobile/NumberEditorMobilePropertyUI.java b/designer-form/src/main/java/com/fr/design/designer/properties/mobile/NumberEditorMobilePropertyUI.java deleted file mode 100644 index 67a8569f72..0000000000 --- a/designer-form/src/main/java/com/fr/design/designer/properties/mobile/NumberEditorMobilePropertyUI.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.fr.design.designer.properties.mobile; - -import com.fr.design.designer.creator.XCreator; -import com.fr.design.dialog.BasicPane; -import com.fr.design.fun.impl.AbstractWidgetPropertyUIProvider; -import com.fr.design.gui.itable.AbstractPropertyTable; -import com.fr.design.widget.ui.designer.mobile.NumberEditorMobileDefinePane; - -/** - * 数字控件属性面板注册 - * - * @author Coral.Chen - * @since 11.0 - * Created on 2023/3/30 - */ -public class NumberEditorMobilePropertyUI extends AbstractWidgetPropertyUIProvider { - private XCreator xCreator; - - public NumberEditorMobilePropertyUI(XCreator xCreator) { - this.xCreator = xCreator; - } - - @Override - public AbstractPropertyTable createWidgetAttrTable() { - return null; - } - - @Override - public BasicPane createWidgetAttrPane() { - return new NumberEditorMobileDefinePane(xCreator); - } - - @Override - public String tableTitle() { - return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Mobile_Attr"); - } -} \ No newline at end of file diff --git a/designer-form/src/main/java/com/fr/design/designer/properties/mobile/PasswordMobilePropertyUI.java b/designer-form/src/main/java/com/fr/design/designer/properties/mobile/PasswordMobilePropertyUI.java deleted file mode 100644 index 2c3b3b2270..0000000000 --- a/designer-form/src/main/java/com/fr/design/designer/properties/mobile/PasswordMobilePropertyUI.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.fr.design.designer.properties.mobile; - -import com.fr.design.designer.creator.XCreator; -import com.fr.design.dialog.BasicPane; -import com.fr.design.fun.impl.AbstractWidgetPropertyUIProvider; -import com.fr.design.gui.itable.AbstractPropertyTable; -import com.fr.design.widget.ui.designer.mobile.PasswordMobileDefinePane; - -/** - * 密码控件移动端属性注册 - * - * @author Coral.Chen - * @since 11.0 - * Created on 2023/3/30 - */ -public class PasswordMobilePropertyUI extends AbstractWidgetPropertyUIProvider { - private XCreator xCreator; - - public PasswordMobilePropertyUI(XCreator xCreator) { - this.xCreator = xCreator; - } - - @Override - public AbstractPropertyTable createWidgetAttrTable() { - return null; - } - - @Override - public BasicPane createWidgetAttrPane() { - return new PasswordMobileDefinePane(xCreator); - } - - @Override - public String tableTitle() { - return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Mobile_Attr"); - } -} \ No newline at end of file diff --git a/designer-form/src/main/java/com/fr/design/designer/properties/mobile/TextEditorMobilePropertyUI.java b/designer-form/src/main/java/com/fr/design/designer/properties/mobile/ScanCodeMobilePropertyUI.java similarity index 65% rename from designer-form/src/main/java/com/fr/design/designer/properties/mobile/TextEditorMobilePropertyUI.java rename to designer-form/src/main/java/com/fr/design/designer/properties/mobile/ScanCodeMobilePropertyUI.java index 531e2c4fc8..85011ee2b9 100644 --- a/designer-form/src/main/java/com/fr/design/designer/properties/mobile/TextEditorMobilePropertyUI.java +++ b/designer-form/src/main/java/com/fr/design/designer/properties/mobile/ScanCodeMobilePropertyUI.java @@ -5,20 +5,13 @@ import com.fr.design.designer.creator.XTextEditor; import com.fr.design.dialog.BasicPane; import com.fr.design.fun.impl.AbstractWidgetPropertyUIProvider; import com.fr.design.gui.itable.AbstractPropertyTable; -import com.fr.design.widget.ui.designer.mobile.TextEditorMobileDefinePane; +import com.fr.design.widget.ui.designer.mobile.ScanCodeMobileDefinePane; -/** - * 文本控件 - * - * @author Coral.Chen - * @since 11.0 - * Created on 2023/3/30 - */ -public class TextEditorMobilePropertyUI extends AbstractWidgetPropertyUIProvider { +public class ScanCodeMobilePropertyUI extends AbstractWidgetPropertyUIProvider { private XCreator xCreator; - public TextEditorMobilePropertyUI(XTextEditor xTextEditor) { + public ScanCodeMobilePropertyUI(XTextEditor xTextEditor) { this.xCreator = xTextEditor; } @@ -29,7 +22,7 @@ public class TextEditorMobilePropertyUI extends AbstractWidgetPropertyUIProvider @Override public BasicPane createWidgetAttrPane() { - return new TextEditorMobileDefinePane(xCreator); + return new ScanCodeMobileDefinePane(xCreator); } @Override diff --git a/designer-form/src/main/java/com/fr/design/designer/properties/mobile/TextAreaMobilePropertyUI.java b/designer-form/src/main/java/com/fr/design/designer/properties/mobile/TextAreaMobilePropertyUI.java deleted file mode 100644 index 1c24e06bce..0000000000 --- a/designer-form/src/main/java/com/fr/design/designer/properties/mobile/TextAreaMobilePropertyUI.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.fr.design.designer.properties.mobile; - -import com.fr.design.designer.creator.XCreator; -import com.fr.design.dialog.BasicPane; -import com.fr.design.fun.impl.AbstractWidgetPropertyUIProvider; -import com.fr.design.gui.itable.AbstractPropertyTable; -import com.fr.design.widget.ui.designer.mobile.TextAreaAdvancedDefinePane; - -/** - * 文本域控件移动端属性 - * - * @author Coral.Chen - * @since 11.0 - * Created on 2023/3/29 - */ -public class TextAreaMobilePropertyUI extends AbstractWidgetPropertyUIProvider { - private XCreator xCreator; - - public TextAreaMobilePropertyUI(XCreator xCreator) { - this.xCreator = xCreator; - } - - @Override - public AbstractPropertyTable createWidgetAttrTable() { - return null; - } - - @Override - public BasicPane createWidgetAttrPane() { - return new TextAreaAdvancedDefinePane(xCreator); - } - - @Override - public String tableTitle() { - return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Mobile_Attr"); - } -} \ No newline at end of file diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/BaseTextEditorMobileDefinePane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/BaseTextEditorMobileDefinePane.java deleted file mode 100644 index 57faab6a72..0000000000 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/BaseTextEditorMobileDefinePane.java +++ /dev/null @@ -1,94 +0,0 @@ -package com.fr.design.widget.ui.designer.mobile; - -import com.fr.design.designer.creator.XCreator; -import com.fr.design.foldablepane.UIExpandablePane; -import com.fr.design.gui.frpane.AttributeChangeListener; -import com.fr.design.i18n.Toolkit; -import com.fr.design.layout.FRGUIPaneFactory; -import com.fr.design.mainframe.DesignerContext; -import com.fr.design.mainframe.FormDesigner; -import com.fr.design.widget.ui.designer.mobile.component.MobileTextEditSettingPane; -import com.fr.form.ui.TextEditor; - -import javax.swing.JPanel; -import java.awt.BorderLayout; -import java.awt.FlowLayout; - -/** - *

文本类组件移动端高级属性的定义面板,基础扩展可以直接继承此面板 - *

往内部添加其他配置 - * - * @author Coral.Chen - * @since 11.0 - * Created on 2023/3/30 - */ -public class BaseTextEditorMobileDefinePane extends MobileWidgetDefinePane { - - private XCreator xCreator; - protected MobileTextEditSettingPane textSettingPane; - - public BaseTextEditorMobileDefinePane(XCreator xCreator) { - this.xCreator = xCreator; - } - - @Override - public void initPropertyGroups(Object source) { - this.setLayout(FRGUIPaneFactory.createBorderLayout()); - JPanel container = FRGUIPaneFactory.createVerticalFlowLayout_Pane(true, FlowLayout.LEADING, 0, 5); - addPropertyPanesToContainer(container); - this.add(new UIExpandablePane(Toolkit.i18nText("Fine-Design_Report_Advanced"), 280, 20, container), BorderLayout.NORTH); - this.repaint(); - } - - /** - * 添加其他属性面板 - * - * @param container 展开容器 - */ - protected void addPropertyPanesToContainer(JPanel container) { - initSettingPane(container); - } - - /** - * 初始化文本类基础面板 - * - * @param container - */ - protected void initSettingPane(JPanel container) { - textSettingPane = new MobileTextEditSettingPane(); - container.add(textSettingPane); - } - - @Override - public void populate(FormDesigner designer) { - TextEditor textEditor = (TextEditor) xCreator.toData(); - textSettingPane.populateBean(textEditor.getMobileTextEditAttr()); - this.bindListeners2Widgets(); - } - - protected void bindListeners2Widgets() { - reInitAllListeners(); - AttributeChangeListener changeListener = new AttributeChangeListener() { - @Override - public void attributeChange() { - update(); - } - }; - this.addAttributeChangeListener(changeListener); - } - - private void reInitAllListeners() { - initListener(this); - } - - @Override - public void update() { - TextEditor textEditor = (TextEditor) xCreator.toData(); - textSettingPane.updateBean(textEditor.getMobileTextEditAttr()); - DesignerContext.getDesignerFrame().getSelectedJTemplate().fireTargetModified(); - } - - public XCreator getxCreator() { - return xCreator; - } -} \ No newline at end of file diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/NumberEditorMobileDefinePane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/NumberEditorMobileDefinePane.java deleted file mode 100644 index 75c6dbefc0..0000000000 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/NumberEditorMobileDefinePane.java +++ /dev/null @@ -1,33 +0,0 @@ -package com.fr.design.widget.ui.designer.mobile; - -import com.fr.design.designer.creator.XCreator; -import com.fr.design.mainframe.DesignerContext; -import com.fr.design.mainframe.FormDesigner; -import com.fr.form.ui.NumberEditor; - -/** - * 数字控件 - * - * @author Coral.Chen - * @since 11.0 - * Created on 2023/3/30 - */ -public class NumberEditorMobileDefinePane extends BaseTextEditorMobileDefinePane { - public NumberEditorMobileDefinePane(XCreator xCreator) { - super(xCreator); - } - - @Override - public void populate(FormDesigner designer) { - NumberEditor numberEditor = (NumberEditor) getxCreator().toData(); - textSettingPane.populateBean(numberEditor.getMobileTextEditAttr()); - this.bindListeners2Widgets(); - } - - @Override - public void update() { - NumberEditor numberEditor = (NumberEditor) getxCreator().toData(); - textSettingPane.updateBean(numberEditor.getMobileTextEditAttr()); - DesignerContext.getDesignerFrame().getSelectedJTemplate().fireTargetModified(); - } -} \ No newline at end of file diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/PasswordMobileDefinePane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/PasswordMobileDefinePane.java deleted file mode 100644 index 68c878b459..0000000000 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/PasswordMobileDefinePane.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.fr.design.widget.ui.designer.mobile; - -import com.fr.design.designer.creator.XCreator; -import com.fr.design.widget.ui.designer.mobile.component.MobilePasswordEditSettingPane; - -import javax.swing.JPanel; - -/** - * 密码控件移动端高级属性 - * - * @author Coral.Chen - * @since 11.0 - * Created on 2023/3/30 - */ -public class PasswordMobileDefinePane extends BaseTextEditorMobileDefinePane { - public PasswordMobileDefinePane(XCreator xCreator) { - super(xCreator); - } - - @Override - protected void initSettingPane(JPanel container) { - textSettingPane = new MobilePasswordEditSettingPane(); - container.add(textSettingPane); - } -} \ No newline at end of file diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ScanCodeMobileDefinePane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ScanCodeMobileDefinePane.java new file mode 100644 index 0000000000..71c35574a3 --- /dev/null +++ b/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ScanCodeMobileDefinePane.java @@ -0,0 +1,63 @@ +package com.fr.design.widget.ui.designer.mobile; + +import com.fr.base.mobile.MobileScanCodeAttr; +import com.fr.design.designer.creator.XCreator; +import com.fr.design.foldablepane.UIExpandablePane; +import com.fr.design.gui.frpane.AttributeChangeListener; +import com.fr.design.i18n.Toolkit; +import com.fr.design.layout.FRGUIPaneFactory; +import com.fr.design.mainframe.DesignerContext; +import com.fr.design.mainframe.FormDesigner; +import com.fr.design.widget.ui.designer.mobile.component.MobileTextFieldInputSettingPane; +import com.fr.form.ui.TextEditor; + +import java.awt.BorderLayout; + + +public class ScanCodeMobileDefinePane extends MobileWidgetDefinePane { + + private XCreator xCreator; + private MobileTextFieldInputSettingPane settingPane; + + public ScanCodeMobileDefinePane(XCreator xCreator) { + this.xCreator = xCreator; + } + + @Override + public void initPropertyGroups(Object source) { + this.setLayout(FRGUIPaneFactory.createBorderLayout()); + settingPane = new MobileTextFieldInputSettingPane(); + this.add(new UIExpandablePane(Toolkit.i18nText("Fine-Design_Report_Advanced"), 280, 20, settingPane), BorderLayout.NORTH); + this.repaint(); + } + + private void bindListeners2Widgets() { + reInitAllListeners(); + AttributeChangeListener changeListener = new AttributeChangeListener() { + @Override + public void attributeChange() { + update(); + } + }; + this.addAttributeChangeListener(changeListener); + } + + private void reInitAllListeners() { + initListener(this); + } + + @Override + public void populate(FormDesigner designer) { + MobileScanCodeAttr mobileScanCodeAttr = ((TextEditor) xCreator.toData()).getMobileScanCodeAttr(); + settingPane.populateBean(mobileScanCodeAttr); + this.bindListeners2Widgets(); + } + + @Override + public void update() { + MobileScanCodeAttr mobileScanCodeAttr = ((TextEditor) xCreator.toData()).getMobileScanCodeAttr(); + settingPane.updateBean(mobileScanCodeAttr); + DesignerContext.getDesignerFrame().getSelectedJTemplate().fireTargetModified(); + } + +} diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/TextAreaAdvancedDefinePane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/TextAreaAdvancedDefinePane.java deleted file mode 100644 index ccc3194f9f..0000000000 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/TextAreaAdvancedDefinePane.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.fr.design.widget.ui.designer.mobile; - -import com.fr.design.designer.creator.XCreator; -import com.fr.design.widget.ui.designer.mobile.component.MobileTextAreaSettingPane; - -import javax.swing.JPanel; - -/** - * 文本域控件 - * - * @author Coral.Chen - * @since 11.0 - * Created on 2023/3/29 - */ -public class TextAreaAdvancedDefinePane extends BaseTextEditorMobileDefinePane { - public TextAreaAdvancedDefinePane(XCreator xCreator) { - super(xCreator); - } - - @Override - protected void initSettingPane(JPanel container) { - textSettingPane = new MobileTextAreaSettingPane(); - container.add(textSettingPane); - } -} \ No newline at end of file diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/TextEditorMobileDefinePane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/TextEditorMobileDefinePane.java deleted file mode 100644 index 17342a372c..0000000000 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/TextEditorMobileDefinePane.java +++ /dev/null @@ -1,55 +0,0 @@ -package com.fr.design.widget.ui.designer.mobile; - -import com.fr.design.designer.creator.XCreator; -import com.fr.design.mainframe.DesignerContext; -import com.fr.design.mainframe.FormDesigner; -import com.fr.design.widget.ui.designer.mobile.component.MobileTextEditSettingPane; -import com.fr.design.widget.ui.designer.mobile.component.MobileTextFieldInputSettingPane; -import com.fr.form.ui.TextEditor; - -import javax.swing.JPanel; - -/** - * 文本控件移动端属性 - * 输入方式: - * 输入框属性: - * - * @author hades - * @since 11.0 - * Created on 2018/11/27 - */ -public class TextEditorMobileDefinePane extends BaseTextEditorMobileDefinePane { - /** - * 输入方式 - */ - private MobileTextFieldInputSettingPane inputSettingPane; - - public TextEditorMobileDefinePane(XCreator xCreator) { - super(xCreator); - } - - @Override - protected void initSettingPane(JPanel container) { - inputSettingPane = new MobileTextFieldInputSettingPane(); - textSettingPane = new MobileTextEditSettingPane(); - container.add(inputSettingPane); - container.add(textSettingPane); - } - - - @Override - public void populate(FormDesigner designer) { - super.populate(designer); - TextEditor textEditor = (TextEditor) getxCreator().toData(); - inputSettingPane.populateBean(textEditor.getMobileScanCodeAttr()); - this.bindListeners2Widgets(); - } - @Override - public void update() { - super.update(); - TextEditor textEditor = (TextEditor) getxCreator().toData(); - inputSettingPane.updateBean(textEditor.getMobileScanCodeAttr()); - DesignerContext.getDesignerFrame().getSelectedJTemplate().fireTargetModified(); - } - -} diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/component/MobilePasswordEditSettingPane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/component/MobilePasswordEditSettingPane.java deleted file mode 100644 index db475dc569..0000000000 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/component/MobilePasswordEditSettingPane.java +++ /dev/null @@ -1,43 +0,0 @@ -package com.fr.design.widget.ui.designer.mobile.component; - -import com.fr.base.mobile.MobileTextEditAttr; -import com.fr.design.gui.icheckbox.UICheckBox; -import com.fr.design.i18n.Toolkit; - -import java.awt.BorderLayout; - -/** - * 密码控件编辑属性设置面板 - * - * @author Coral.Chen - * @since 11.0 - * Created on 2023/3/30 - */ -public class MobilePasswordEditSettingPane extends MobileTextEditSettingPane { - // 显示字数统计 - private UICheckBox showPassword; - - public MobilePasswordEditSettingPane() { - super(); - showPassword = new UICheckBox(Toolkit.i18nText("Fine-Design_Mobile_Show_Password"), false); - this.add(showPassword, BorderLayout.NORTH); - } - - @Override - protected boolean getClearDefaultState() { - return true; - } - - @Override - public void populateBean(MobileTextEditAttr ob) { - super.populateBean(ob); - // 要兼容处理一下,为null 的话赋默认值,默认开启 - this.showPassword.setSelected(ob.isShowPassword() == null || ob.isShowPassword()); - } - - @Override - public void updateBean(MobileTextEditAttr ob) { - super.updateBean(ob); - ob.setShowPassword(showPassword.isSelected()); - } -} \ No newline at end of file diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/component/MobileTextAreaSettingPane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/component/MobileTextAreaSettingPane.java deleted file mode 100644 index d660508e6e..0000000000 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/component/MobileTextAreaSettingPane.java +++ /dev/null @@ -1,38 +0,0 @@ -package com.fr.design.widget.ui.designer.mobile.component; - -import com.fr.base.mobile.MobileTextEditAttr; -import com.fr.design.gui.icheckbox.UICheckBox; -import com.fr.design.i18n.Toolkit; - -import java.awt.BorderLayout; - -/** - * 文本域控件 - * - * @author Coral.Chen - * @since 11.0 - * Created on 2023/3/29 - */ -public class MobileTextAreaSettingPane extends MobileTextEditSettingPane { - // 显示字数统计 - private UICheckBox showWordCount; - - public MobileTextAreaSettingPane() { - super(); - showWordCount = new UICheckBox(Toolkit.i18nText("Fine-Design_Mobile_Show_Word_Count"), false); - this.add(showWordCount, BorderLayout.NORTH); - } - - @Override - public void populateBean(MobileTextEditAttr ob) { - super.populateBean(ob); - // 要兼容处理一下,为null 的话赋默认值,默认不开启 - this.showWordCount.setSelected(ob.isShowWordCount() != null && ob.isShowWordCount()); - } - - @Override - public void updateBean(MobileTextEditAttr ob) { - super.updateBean(ob); - ob.setShowWordCount(showWordCount.isSelected()); - } -} \ No newline at end of file diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/component/MobileTextEditSettingPane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/component/MobileTextEditSettingPane.java deleted file mode 100644 index 56d340e4d0..0000000000 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/component/MobileTextEditSettingPane.java +++ /dev/null @@ -1,59 +0,0 @@ -package com.fr.design.widget.ui.designer.mobile.component; - -import com.fr.base.mobile.MobileTextEditAttr; -import com.fr.design.beans.BasicBeanPane; -import com.fr.design.gui.icheckbox.UICheckBox; -import com.fr.design.i18n.Toolkit; -import com.fr.design.layout.VerticalFlowLayout; - -import java.awt.BorderLayout; -import java.awt.FlowLayout; - -/** - * 文本类基础设置 - * - * @author Coral.Chen - * @since 11.0 - * Created on 2023/3/29 - */ -public class MobileTextEditSettingPane extends BasicBeanPane { - // 允许一键清空 - protected UICheckBox allowOneClickClear; - - public MobileTextEditSettingPane() { - initLayout(); - allowOneClickClear = new UICheckBox(Toolkit.i18nText("Fine-Design_Mobile_Allow_One_Click_Clear"), getClearDefaultState()); - this.add(allowOneClickClear, BorderLayout.NORTH); - } - - protected boolean getClearDefaultState() { - return false; - } - - protected void initLayout() { - VerticalFlowLayout verticalFlowLayout = new VerticalFlowLayout(FlowLayout.LEADING, 0, 5); - verticalFlowLayout.setAlignLeft(true); - this.setLayout(verticalFlowLayout); - } - - @Override - public void populateBean(MobileTextEditAttr ob) { - allowOneClickClear.setSelected(ob.isAllowOneClickClear() != null && ob.isAllowOneClickClear()); - } - - @Override - public MobileTextEditAttr updateBean() { - // do nothing - return null; - } - - @Override - public void updateBean(MobileTextEditAttr ob) { - ob.setAllowOneClickClear(allowOneClickClear.isSelected()); - } - - @Override - protected String title4PopupWindow() { - return null; - } -} \ No newline at end of file diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/component/MobileTextFieldInputSettingPane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/component/MobileTextFieldInputSettingPane.java index b736230dd7..cdddc3e79f 100644 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/component/MobileTextFieldInputSettingPane.java +++ b/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/component/MobileTextFieldInputSettingPane.java @@ -2,20 +2,13 @@ package com.fr.design.widget.ui.designer.mobile.component; import com.fr.base.mobile.MobileScanCodeAttr; import com.fr.design.beans.BasicBeanPane; -import com.fr.design.constants.LayoutConstants; -import com.fr.design.gui.ibutton.UIRadioButton; import com.fr.design.gui.icheckbox.UICheckBox; -import com.fr.design.gui.ilable.UILabel; import com.fr.design.i18n.Toolkit; import com.fr.design.layout.FRGUIPaneFactory; -import com.fr.design.layout.TableLayout; -import com.fr.design.layout.TableLayoutHelper; -import com.fr.design.layout.VerticalFlowLayout; -import javax.swing.ButtonGroup; import javax.swing.JPanel; import java.awt.BorderLayout; -import java.awt.Component; +import java.awt.FlowLayout; /** * @author hades @@ -28,39 +21,15 @@ public class MobileTextFieldInputSettingPane extends BasicBeanPane { - UICheckBox source = (UICheckBox) e.getSource(); - // 更新面板是否可见 - updateNfcContentTypePane(source.isSelected(), nfcContentTypePane.getSelectedType()); - }); - initComponents(); - // 初始状态,内容类型面板不可见 - nfcContentTypePane.setVisible(false); - } - - private void initComponents() { - Component[][] components = new Component[][]{ - new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Mobile_Input_Way")), manualInputCheckBox}, - new Component[]{null, scanCodeCheckBox}, - new Component[]{null, nfcInputCheckBox}, - new Component[]{null, nfcContentTypePane}, - }; - double p = TableLayout.PREFERRED; - double f = TableLayout.FILL; - double[] rowSize = {p, p, p, p}; - double[] columnSize = {p, f}; - int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}, {1, 1}}; - JPanel settingPane = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, LayoutConstants.HGAP_LARGE, LayoutConstants.VGAP_LARGE); + settingPane.add(manualInputCheckBox); + settingPane.add(scanCodeCheckBox); + settingPane.add(nfcInputCheckBox); this.add(settingPane, BorderLayout.NORTH); } @@ -69,7 +38,6 @@ public class MobileTextFieldInputSettingPane extends BasicBeanPane