diff --git a/designer-base/src/main/java/com/fr/widgettheme/widget/mobile/pane/MobileStyleFontConfigPane.java b/designer-base/src/main/java/com/fr/widgettheme/widget/mobile/pane/MobileStyleFontConfigPane.java index 6a6ad694de..6b02ec9ff0 100644 --- a/designer-base/src/main/java/com/fr/widgettheme/widget/mobile/pane/MobileStyleFontConfigPane.java +++ b/designer-base/src/main/java/com/fr/widgettheme/widget/mobile/pane/MobileStyleFontConfigPane.java @@ -33,19 +33,23 @@ import java.util.Vector; * @since 11.0 * Created on 2023/5/22 */ - public class MobileStyleFontConfigPane extends JPanel { public static final int FONT_NONE = 0; private static final int MAX_FONT_SIZE = 18; private static final int MIN_FONT_SIZE = 12; private static final Dimension BUTTON_SIZE = new Dimension(20, 18); + /** + * 获取字体大小集合 + * + * @return 字体大小集合 + */ public static Vector getFontSizes() { - Vector FONT_SIZES = new Vector(); + Vector fontSizes = new Vector(); for (int i = MIN_FONT_SIZE; i <= MAX_FONT_SIZE; i++) { - FONT_SIZES.add(i); + fontSizes.add(i); } - return FONT_SIZES; + return fontSizes; } private UIComboBox fontSizeComboBox; @@ -75,12 +79,12 @@ public class MobileStyleFontConfigPane extends JPanel { this.setButtonsTips(); this.setButtonsSize(BUTTON_SIZE); - Component[] components_font = new Component[]{ + Component[] componentFont = new Component[]{ fontSizeComboBox, color, italic, bold }; JPanel buttonPane = new JPanel(new BorderLayout()); - JPanel flowPane = GUICoreUtils.createFlowPane(components_font, FlowLayout.LEFT, LayoutConstants.HGAP_LARGE); + JPanel flowPane = GUICoreUtils.createFlowPane(componentFont, FlowLayout.LEFT, LayoutConstants.HGAP_LARGE); // 4是flowPane的默认横向gap,但会导致最左边的控件和边上也有4的间隙,调整一下 flowPane.setBorder(new EmptyBorder(0, -LayoutConstants.HGAP_LARGE, 0, 0)); buttonPane.add(flowPane); @@ -101,7 +105,11 @@ public class MobileStyleFontConfigPane extends JPanel { bold.setPreferredSize(size); } - + /** + * 填充字体 + * + * @param frFont 字体 + */ public void populateBean(FRFont frFont) { fontSizeComboBox.setSelectedItem(frFont.getSize()); color.setColor(frFont.getForeground()); @@ -109,6 +117,9 @@ public class MobileStyleFontConfigPane extends JPanel { italic.setSelected(frFont.isItalic()); } + /** + * 更新字体 + */ public FRFont updateBean() { int style = Font.PLAIN; style += this.bold.isSelected() ? Font.BOLD : Font.PLAIN; 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 371d0ae579..a40199327b 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 @@ -29,6 +29,14 @@ public class WidgetThemeMobileStyleDefinePaneCreator { private WidgetThemeMobileStyleDefinePaneCreator() { } + /** + * 创建移动端控件样式属性窗口 + * + * @param widget 控件 + * @param customDefinePane 窗口类 + * @param mobileStyle 样式类 + * @return 窗口 + */ public static BasicBeanPane createBaseBeanPane(Widget widget, Class customDefinePane, Class mobileStyle) { try { JTemplate jTemplate = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate(); @@ -49,6 +57,12 @@ public class WidgetThemeMobileStyleDefinePaneCreator { return null; } + /** + * 根据控件获取通用扩展属性类 + * + * @param widget 控件 + * @return class + */ public static @NotNull Class classForCommonExtraStyle(Widget widget) { if (commonWidget(widget)) { return WidgetThemeMobileCommonExtraStyle.class; diff --git a/designer-form/src/main/java/com/fr/design/parameter/RootDesignDefinePane.java b/designer-form/src/main/java/com/fr/design/parameter/RootDesignDefinePane.java index 008b855ea4..c4331a74c2 100644 --- a/designer-form/src/main/java/com/fr/design/parameter/RootDesignDefinePane.java +++ b/designer-form/src/main/java/com/fr/design/parameter/RootDesignDefinePane.java @@ -28,7 +28,7 @@ import com.fr.design.mainframe.FormDesigner; import com.fr.design.mainframe.FormSelection; import com.fr.design.mainframe.JTemplate; import com.fr.design.mainframe.widget.accessibles.AccessibleBackgroundEditor; -import com.fr.design.widgettheme.processor.WidgetThemeXCreaterPaneAcceptor; +import com.fr.design.widgettheme.processor.WidgetThemeParaCreatorPaneAcceptor; import com.fr.design.utils.gui.LayoutUtils; import com.fr.design.utils.gui.UIComponentUtils; import com.fr.design.widget.ui.designer.AbstractDataModify; @@ -204,7 +204,7 @@ public class RootDesignDefinePane extends AbstractDataModify { private void refreshExtraAdvancedPane() { extraPaneList.clear(); backgroundPane.removeAll(); - new WidgetThemeXCreaterPaneAcceptor().accept(creator, extraPaneList); + new WidgetThemeParaCreatorPaneAcceptor().accept(creator, extraPaneList); Set> providers = ExtraDesignClassManager.getInstance().getArray(WidgetAdvancedPaneProvider.XML_TAG); for (WidgetAdvancedPaneProvider provider : providers) { if (!provider.accept(creator)) { diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/ButtonDefinePane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/ButtonDefinePane.java index c1ab2e0f53..89915e0fe7 100644 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/ButtonDefinePane.java +++ b/designer-form/src/main/java/com/fr/design/widget/ui/designer/ButtonDefinePane.java @@ -12,7 +12,7 @@ import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.design.mainframe.widget.accessibles.AccessibleIconEditor; -import com.fr.design.widgettheme.processor.WidgetThemeXCreaterPaneAcceptor; +import com.fr.design.widgettheme.processor.WidgetThemeParaCreatorPaneAcceptor; import com.fr.design.widget.btn.ButtonConstants; import com.fr.form.ui.Button; import com.fr.general.GeneralContext; @@ -66,7 +66,7 @@ public abstract class ButtonDefinePane extends AbstractDataMod private void refreshAdvancedPane() { extraPaneList.clear(); - new WidgetThemeXCreaterPaneAcceptor().accept(creator, extraPaneList); + new WidgetThemeParaCreatorPaneAcceptor().accept(creator, extraPaneList); containsExtraPane = !CollectionUtils.isEmpty(extraPaneList); Set> providers = ExtraDesignClassManager.getInstance().getArray(WidgetAdvancedPaneProvider.XML_TAG); for (WidgetAdvancedPaneProvider provider : providers) { diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/CheckBoxDefinePane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/CheckBoxDefinePane.java index 9517a8b911..aea3d20a69 100644 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/CheckBoxDefinePane.java +++ b/designer-form/src/main/java/com/fr/design/widget/ui/designer/CheckBoxDefinePane.java @@ -11,7 +11,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.widgettheme.processor.WidgetThemeXCreaterPaneAcceptor; +import com.fr.design.widgettheme.processor.WidgetThemeParaCreatorPaneAcceptor; import com.fr.design.widget.ui.designer.component.FontSizeComboPane; import com.fr.design.widget.ui.designer.component.FormWidgetValuePane; import com.fr.form.ui.CheckBox; @@ -78,7 +78,7 @@ public class CheckBoxDefinePane extends AbstractDataModify { protected void refreshExtraAdvancedPane() { extraPaneList.clear(); - new WidgetThemeXCreaterPaneAcceptor().accept(creator, extraPaneList); + new WidgetThemeParaCreatorPaneAcceptor().accept(creator, extraPaneList); boolean containsExtraPane = !CollectionUtils.isEmpty(extraPaneList); Set> providers = ExtraDesignClassManager.getInstance().getArray(WidgetAdvancedPaneProvider.XML_TAG); for (WidgetAdvancedPaneProvider provider : providers) { diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/DateEditorDefinePane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/DateEditorDefinePane.java index 7111db110c..e256d5eade 100644 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/DateEditorDefinePane.java +++ b/designer-form/src/main/java/com/fr/design/widget/ui/designer/DateEditorDefinePane.java @@ -14,7 +14,7 @@ import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.ilable.UILabel; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.TableLayoutHelper; -import com.fr.design.widgettheme.processor.WidgetThemeXCreaterPaneAcceptor; +import com.fr.design.widgettheme.processor.WidgetThemeParaCreatorPaneAcceptor; import com.fr.design.widget.component.DateValuePane; import com.fr.design.widget.component.UIComboBoxNoArrow; import com.fr.design.widget.ui.designer.component.FormWidgetValuePane; @@ -100,7 +100,7 @@ public class DateEditorDefinePane extends DirectWriteEditorDefinePane().accept(creator, extraPaneList); + new WidgetThemeParaCreatorPaneAcceptor().accept(creator, extraPaneList); boolean containsExtraPane = !CollectionUtils.isEmpty(extraPaneList); Set> providers = ExtraDesignClassManager.getInstance().getArray(WidgetAdvancedPaneProvider.XML_TAG); for (WidgetAdvancedPaneProvider provider : providers) { diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/DirectWriteEditorDefinePane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/DirectWriteEditorDefinePane.java index c16498f4d3..6d49a507a6 100644 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/DirectWriteEditorDefinePane.java +++ b/designer-form/src/main/java/com/fr/design/widget/ui/designer/DirectWriteEditorDefinePane.java @@ -9,7 +9,7 @@ import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.ilable.UILabel; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.TableLayoutHelper; -import com.fr.design.widgettheme.processor.WidgetThemeXCreaterPaneAcceptor; +import com.fr.design.widgettheme.processor.WidgetThemeParaCreatorPaneAcceptor; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.widget.ui.designer.component.FormWidgetValuePane; import com.fr.form.ui.DirectWriteEditor; @@ -68,7 +68,7 @@ public abstract class DirectWriteEditorDefinePane e protected void refreshExtraAdvancedPane() { extraPaneList.clear(); - new WidgetThemeXCreaterPaneAcceptor().accept(creator, extraPaneList); + new WidgetThemeParaCreatorPaneAcceptor().accept(creator, extraPaneList); boolean containsExtraPane = !CollectionUtils.isEmpty(extraPaneList); Set> providers = ExtraDesignClassManager.getInstance().getArray(WidgetAdvancedPaneProvider.XML_TAG); for (WidgetAdvancedPaneProvider provider : providers) { diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/LabelDefinePane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/LabelDefinePane.java index 310c3d8dd6..aad06d2a23 100644 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/LabelDefinePane.java +++ b/designer-form/src/main/java/com/fr/design/widget/ui/designer/LabelDefinePane.java @@ -15,7 +15,7 @@ import com.fr.design.gui.style.FRFontPane; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; -import com.fr.design.widgettheme.processor.WidgetThemeXCreaterPaneAcceptor; +import com.fr.design.widgettheme.processor.WidgetThemeParaCreatorPaneAcceptor; import com.fr.design.widget.FRWidgetFactory; import com.fr.design.widget.ui.designer.component.FormWidgetValuePane; import com.fr.form.ui.Label; @@ -111,7 +111,7 @@ public class LabelDefinePane extends AbstractDataModify