diff --git a/designer-base/src/main/java/com/fr/design/i18n/DesignSizeI18nManager.java b/designer-base/src/main/java/com/fr/design/i18n/DesignSizeI18nManager.java index 8b0e8739cf..88c6e30b5f 100644 --- a/designer-base/src/main/java/com/fr/design/i18n/DesignSizeI18nManager.java +++ b/designer-base/src/main/java/com/fr/design/i18n/DesignSizeI18nManager.java @@ -53,6 +53,6 @@ public class DesignSizeI18nManager { if (arr.length < SPLIT_LENGTH) { return BasicDialog.DEFAULT; } - return FineUIScale.scale(new Dimension(Integer.parseInt(arr[WIDTH_INDEX]), Integer.parseInt(arr[HEIGHT_INDEX]))); + return new Dimension(Integer.parseInt(arr[WIDTH_INDEX]), Integer.parseInt(arr[HEIGHT_INDEX])); } } 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 14183ed2e6..280ebcb9f2 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 @@ -1,10 +1,11 @@ package com.fr.design.widgettheme; import com.fine.swing.ui.layout.Column; +import com.fine.theme.icon.LazyIcon; +import com.fine.theme.utils.FineLayoutBuilder; import com.fr.base.background.ColorBackground; import com.fr.base.theme.TemplateTheme; import com.fr.design.beans.BasicBeanPane; -import com.fr.design.designer.IntervalConstants; import com.fr.design.file.HistoryTemplateListCache; import com.fr.design.gui.frpane.FontSizeComboPane; import com.fr.design.gui.frpane.UIPercentDragPane; @@ -18,15 +19,12 @@ import com.fr.design.gui.ispinner.UISpinner; import com.fr.design.gui.style.FRFontPane; 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.mainframe.JTemplate; import com.fr.design.style.color.NewColorSelectBox; import com.fr.design.utils.DesignUtils; import com.fr.design.widget.FRWidgetFactory; import com.fr.form.ui.Widget; import com.fr.general.FRFont; -import com.fr.general.IOUtils; import com.fr.util.ColorUtils; import com.fr.widgettheme.theme.bean.ButtonBackground; import com.fr.widgettheme.theme.panel.ButtonStyleDefinedPane; @@ -38,7 +36,6 @@ import com.fr.widgettheme.theme.widget.theme.WidgetThemeDisplayConstants; import com.fr.widgettheme.util.WidgetStyleComponentCombiner; import com.fr.widgettheme.util.WidgetThemeDesignerUtils; -import javax.swing.BorderFactory; import javax.swing.JPanel; import java.awt.BorderLayout; import java.awt.Color; @@ -130,8 +127,9 @@ public abstract class BaseStyleSettingPane extends BasicBeanPa protected void initPane() { this.setLayout(FRGUIPaneFactory.createBorderLayout()); - this.add(createHeadPane(), BorderLayout.NORTH); - this.add(createCustomPane(), BorderLayout.CENTER); + this.add(column(10, + cell(createHeadPane()), cell(createCustomPane()) + ).getComponent(), BorderLayout.CENTER); } @@ -145,8 +143,8 @@ public abstract class BaseStyleSettingPane extends BasicBeanPa 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")); - italic = new UIToggleButton(IOUtils.readIcon("/com/fr/design/images/m_format/cellstyle/italic.png")); + bold = new UIToggleButton(new LazyIcon("bold")); + italic = new UIToggleButton(new LazyIcon("italic")); widgetBgColorSelectBox = new NewColorSelectBox(WidgetThemeDisplayConstants.THEME_WIDGET_COMPONENT_WIDTH, true); widgetBgAlphaDragPane = new UIPercentDragPane(); paneMap.put(StyleSetting.THEME_COLOR, colorSelectBox); @@ -180,34 +178,14 @@ public abstract class BaseStyleSettingPane extends BasicBeanPa switchCard(); } }; - JPanel headPane = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{ - new Component[]{headLabel, styleSettingHead}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_W1, IntervalConstants.INTERVAL_L1); - headPane.setBorder(BorderFactory.createEmptyBorder(0, 0, IntervalConstants.INTERVAL_L1, 0)); - return headPane; + + return FineLayoutBuilder.createHorizontalLayout(0, new double[] {1.2, 3}, headLabel, styleSettingHead); } protected JPanel createCustomPane() { int size = styleSettingList.size(); - double f = TableLayout.FILL; - double p = TableLayout.PREFERRED; - int columnCount = 2; - double[] rowSize = new double[size]; - for (int i = 0; i < size; i++) { - rowSize[i] = p; - } - - double[] columnSize = {p, f}; - - int[][] rowCount = new int[size][columnCount]; - for (int i = 0; i < size; i++) { - for (int j = 0; j < columnCount; j++) { - rowCount[i][j] = 1; - } - } - - customPane = TableLayoutHelper.createGapTableLayoutPane(createComponents(size), rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W1, IntervalConstants.INTERVAL_L1); - customPane.setBorder(BorderFactory.createEmptyBorder(0, 0, IntervalConstants.INTERVAL_L1, 0)); + customPane = FineLayoutBuilder.compatibleTableLayout(10, createComponents(size), new double[]{1.2, 3}); return customPane; } diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/form/FormReportComponentComposite.java b/designer-realize/src/main/java/com/fr/design/mainframe/form/FormReportComponentComposite.java index 5fdc4b011b..27d0a202a4 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/form/FormReportComponentComposite.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/form/FormReportComponentComposite.java @@ -1,5 +1,6 @@ package com.fr.design.mainframe.form; +import com.formdev.flatlaf.ui.FlatRoundBorder; import com.fr.base.DynamicUnitList; import com.fr.base.ScreenResolution; import com.fr.design.cell.bar.DynamicScrollBar; @@ -11,9 +12,7 @@ import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerUIModeConfig; import com.fr.design.mainframe.ElementCasePane; import com.fr.design.mainframe.JDashboard; -import com.fr.design.mainframe.JForm; import com.fr.design.mainframe.JFormSliderPane; -import com.fr.design.mainframe.JTemplate; import com.fr.design.mainframe.JTemplateProvider; import com.fr.design.mainframe.toolbar.ToolBarMenuDockPlus; import com.fr.form.FormElementCaseContainerProvider; @@ -59,6 +58,7 @@ public class FormReportComponentComposite extends JComponent implements TargetMo this.elementCaseDesigner.elementCasePane.getGrid().addMouseWheelListener(new FormReportComponentCompositeMouseWheelHandler(this)); elementCaseDesigner.addTargetModifiedListener(this); this.jSliderContainer.setShowValue((ScreenResolution.getScreenResolution() * HUND) / Constants.DEFAULT_WEBWRITE_AND_SCREEN_RESOLUTION); + setBorder(new FlatRoundBorder()); } public FormReportComponentComposite(BaseJForm jform, FormElementCaseDesigner elementCaseDesign, FormElementCaseContainerProvider ecContainer) { diff --git a/designer-realize/src/main/java/com/fr/design/report/freeze/FormECRepeatAndFreezeSettingPane.java b/designer-realize/src/main/java/com/fr/design/report/freeze/FormECRepeatAndFreezeSettingPane.java index 6e53599492..7ccc8771c6 100644 --- a/designer-realize/src/main/java/com/fr/design/report/freeze/FormECRepeatAndFreezeSettingPane.java +++ b/designer-realize/src/main/java/com/fr/design/report/freeze/FormECRepeatAndFreezeSettingPane.java @@ -30,6 +30,7 @@ public class FormECRepeatAndFreezeSettingPane extends RepeatAndFreezeSettingPane protected void addWriteFrozen(JPanel freezePanel, JPanel pagePanel) { super.initWriteFrozenPane(); + this.add(pagePanel); } } \ No newline at end of file diff --git a/designer-realize/src/main/java/com/fr/design/widget/ui/CheckBoxDefinePane.java b/designer-realize/src/main/java/com/fr/design/widget/ui/CheckBoxDefinePane.java index 85e5272eb5..51a4c6e117 100644 --- a/designer-realize/src/main/java/com/fr/design/widget/ui/CheckBoxDefinePane.java +++ b/designer-realize/src/main/java/com/fr/design/widget/ui/CheckBoxDefinePane.java @@ -7,7 +7,6 @@ import com.fr.design.fun.WidgetAdvancedPaneProvider; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.itextfield.UITextField; import com.fr.design.layout.FRGUIPaneFactory; -import com.fr.design.layout.TableLayout; import com.fr.design.widgettheme.processor.WidgetThemeCreatorPaneAdder; import com.fr.form.ui.CheckBox; import com.fr.general.GeneralContext; @@ -37,8 +36,6 @@ public class CheckBoxDefinePane extends AbstractDataModify { protected final List> extraPaneList = new ArrayList<>(); protected JPanel extraPane; - protected static double F = TableLayout.FILL; - protected static double P = TableLayout.PREFERRED; public CheckBoxDefinePane() { this.iniComponents(); @@ -51,24 +48,16 @@ public class CheckBoxDefinePane extends AbstractDataModify { JPanel content = new JPanel(new BorderLayout()); - if (extraPane == null) { - content.add( - row( - cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Text"))).weight(LEFT_WEIGHT), - cell(text).weight(RIGHT_WEIGHT) - ).getComponent() - ); - } else { - content.add( - column( - 10, - row( - cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Text"))).weight(LEFT_WEIGHT), - cell(text)).weight(RIGHT_WEIGHT), - row(cell(extraPane)) - ).getComponent() - ); - } + content.add( + column( + 10, + row( + cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Text"))).weight(LEFT_WEIGHT), + cell(text).weight(RIGHT_WEIGHT) + ), + cell(extraPane) + ).getComponent() + ); UIExpandablePane uiExpandablePane = new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Advanced"), 280, 24, content); this.add(uiExpandablePane); } diff --git a/designer-realize/src/main/java/com/fr/start/module/optimized/ConfigurationActivator4Designer.java b/designer-realize/src/main/java/com/fr/start/module/optimized/ConfigurationActivator4Designer.java index 5a01fed354..60ad6922bb 100644 --- a/designer-realize/src/main/java/com/fr/start/module/optimized/ConfigurationActivator4Designer.java +++ b/designer-realize/src/main/java/com/fr/start/module/optimized/ConfigurationActivator4Designer.java @@ -1,11 +1,7 @@ package com.fr.start.module.optimized; import com.fr.config.activator.ConfigurationActivator; -import com.fr.config.dao.DaoContext; import com.fr.config.dao.DaoSelectorFactory; -import com.fr.config.dao.impl.remote.PropertiesClassHelperDao; -import com.fr.config.dao.impl.remote.PropertiesEntityDao; -import com.fr.config.dao.impl.remote.PropertiesXmlEntityDao; import com.fr.transaction.PropertiesTransactor; import com.fr.transaction.TransactorFactory; @@ -20,9 +16,6 @@ public class ConfigurationActivator4Designer extends ConfigurationActivator { protected void initLocalDao() { if (DaoSelectorFactory.getDaoSelector().useCacheDao()) { TransactorFactory.setTransactor(new PropertiesTransactor()); - DaoContext.setClassHelperDao(new PropertiesClassHelperDao()); - DaoContext.setEntityDao(new PropertiesEntityDao()); - DaoContext.setXmlEntityDao(new PropertiesXmlEntityDao()); } else { super.initLocalDao(); }