diff --git a/designer-base/src/main/java/com/fr/design/condition/DSColumnLiteConditionPane.java b/designer-base/src/main/java/com/fr/design/condition/DSColumnLiteConditionPane.java index 6ae84c14cb..cee0410a95 100644 --- a/designer-base/src/main/java/com/fr/design/condition/DSColumnLiteConditionPane.java +++ b/designer-base/src/main/java/com/fr/design/condition/DSColumnLiteConditionPane.java @@ -123,12 +123,12 @@ public class DSColumnLiteConditionPane extends LiteConditionPane { private List dbmPaneList = new ArrayList(); private CommitTabbedPane commitTabbedPane; @@ -50,13 +55,18 @@ public class Commit2DBJavaScriptPane extends FurtherBasicBeanPane extends JPanel { JPanel infoPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); infoPane.setPreferredSize(new Dimension(CONTENT_WIDTH, INFO_HEIGHT)); infoPane.setBackground(Color.WHITE); - infoPane.setBorder(BorderFactory.createEmptyBorder(0, IntervalConstants.INTERVAL_L7,0,IntervalConstants.INTERVAL_L7)); + infoPane.setBorder(new ScaledEmptyBorder(0, IntervalConstants.INTERVAL_L7,0,IntervalConstants.INTERVAL_L7)); UILabel titleLabel = new UILabel(name); titleLabel.setToolTipText(name); diff --git a/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeGridPagesPane.java b/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeGridPagesPane.java index 704f9c1a35..508eb7e2de 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeGridPagesPane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeGridPagesPane.java @@ -1,5 +1,6 @@ package com.fr.design.mainframe.theme; +import com.formdev.flatlaf.util.ScaledEmptyBorder; import com.fr.base.ScreenResolution; import com.fr.base.theme.FormTheme; import com.fr.base.theme.FormThemeConfig; @@ -73,16 +74,16 @@ public class TemplateThemeGridPagesPane extends JPanel { private void initializePane(@Nullable Window window) { setLayout(new BorderLayout()); - setBorder(BorderFactory.createEmptyBorder(10, 10, 0, 10)); + setBorder(new ScaledEmptyBorder(10, 10, 0, 10)); breadcrumbBar = new BreadcrumbBar(); - breadcrumbBar.setBorder(BorderFactory.createEmptyBorder(0, 0, 10, 0)); + breadcrumbBar.setBorder(new ScaledEmptyBorder(0, 0, 10, 0)); add(breadcrumbBar, BorderLayout.NORTH); contentPane = new JPanel(); contentPane.setBorder(new CompoundBorder( new TopLineBorder(new Color(0xE0E0E1), 1), - BorderFactory.createEmptyBorder(10, 0, 0, 0))); + new ScaledEmptyBorder(10, 0, 0, 0))); cardLayout = new CardLayout(); contentPane.setLayout(cardLayout); add(contentPane, BorderLayout.CENTER); diff --git a/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeGridPane.java b/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeGridPane.java index 169f24b51f..1493eb3b45 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeGridPane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeGridPane.java @@ -1,6 +1,7 @@ package com.fr.design.mainframe.theme; import com.fine.theme.utils.FineUIScale; +import com.formdev.flatlaf.util.ScaledEmptyBorder; import com.fr.base.theme.TemplateTheme; import com.fr.base.theme.TemplateThemeConfig; import com.fr.design.designer.IntervalConstants; @@ -35,9 +36,9 @@ import java.util.Map; public class TemplateThemeGridPane extends BasicPane { public static final int BLOCK_COUNT_ROW_LINE = 3; public static final int BLOCK_GAP = IntervalConstants.INTERVAL_L1; - public static final int CONTENT_WIDTH = FineUIScale.scale(TemplateThemeBlock.CONTENT_WIDTH * BLOCK_COUNT_ROW_LINE + BLOCK_GAP * (BLOCK_COUNT_ROW_LINE - 1) + 10); + public static final int CONTENT_WIDTH = TemplateThemeBlock.CONTENT_WIDTH * BLOCK_COUNT_ROW_LINE + FineUIScale.scale(BLOCK_GAP) * (BLOCK_COUNT_ROW_LINE - 1) + FineUIScale.scale(10); public static final int BLOCK_ROWS_PER_PAGE = 3; - public static final int CONTENT_HEIGHT = FineUIScale.scale(Math.min(527, TemplateThemeBlock.CONTENT_HEIGHT * BLOCK_ROWS_PER_PAGE + BLOCK_GAP * (BLOCK_ROWS_PER_PAGE + 1))); + public static final int CONTENT_HEIGHT = Math.min(FineUIScale.scale(527), TemplateThemeBlock.CONTENT_HEIGHT * BLOCK_ROWS_PER_PAGE + FineUIScale.scale(BLOCK_GAP) * (BLOCK_ROWS_PER_PAGE + 1)); public static final int ASYNC_FETCH_THEME_THREAD_COUNT = 10; private final AsyncThemeFetcher asyncThemeFetcher; @@ -73,7 +74,7 @@ public class TemplateThemeGridPane extends BasicPane { setLayout(FRGUIPaneFactory.createBorderLayout()); setPreferredSize(new Dimension(CONTENT_WIDTH, CONTENT_HEIGHT)); - contentListPane.setBorder(BorderFactory.createEmptyBorder(BLOCK_GAP, 0, BLOCK_GAP, 10)); + contentListPane.setBorder(new ScaledEmptyBorder(BLOCK_GAP, 0, BLOCK_GAP, 10)); contentListPane.setLayout(new GridLayout(0, BLOCK_COUNT_ROW_LINE, BLOCK_GAP, BLOCK_GAP)); fillContentListPane(); diff --git a/designer-base/src/main/java/com/fr/design/mainframe/theme/dialog/TemplateThemeProfileDialog.java b/designer-base/src/main/java/com/fr/design/mainframe/theme/dialog/TemplateThemeProfileDialog.java index 0a26a6691e..43aedb17e9 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/theme/dialog/TemplateThemeProfileDialog.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/theme/dialog/TemplateThemeProfileDialog.java @@ -1,5 +1,6 @@ package com.fr.design.mainframe.theme.dialog; +import com.fine.theme.utils.FineUIScale; import com.fr.base.theme.TemplateTheme; import com.fr.design.ExtraDesignClassManager; import com.fr.design.gui.ibutton.UIButton; @@ -27,8 +28,8 @@ import java.util.Set; public class TemplateThemeProfileDialog extends TemplateThemeDialog { public static TemplateThemeProfilePane currentVisibleProfilePane; - public static final int CONTENT_WIDTH = 1010; - public static final int CONTENT_HEIGHT = 542; + public static final int CONTENT_WIDTH = FineUIScale.scale(1010); + public static final int CONTENT_HEIGHT = FineUIScale.scale(542); private final TemplateThemeProfilePane profilePane; public TemplateThemeProfileDialog(Window parent, TemplateThemeProfilePane profilePane) { diff --git a/designer-base/src/main/java/com/fr/design/mainframe/theme/edit/chart/AbstractChartStylePane.java b/designer-base/src/main/java/com/fr/design/mainframe/theme/edit/chart/AbstractChartStylePane.java index 801e7e0ab0..547b5c1d25 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/theme/edit/chart/AbstractChartStylePane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/theme/edit/chart/AbstractChartStylePane.java @@ -1,5 +1,7 @@ package com.fr.design.mainframe.theme.edit.chart; +import com.fine.theme.utils.FineUIScale; +import com.formdev.flatlaf.util.ScaledEmptyBorder; import com.fr.base.theme.settings.ThemedChartStyle; import com.fr.design.constants.LayoutConstants; import com.fr.design.dialog.BasicPane; @@ -30,11 +32,11 @@ public abstract class AbstractChartStylePane extends BasicPane { protected void initPane() { this.setLayout(FRGUIPaneFactory.createBorderLayout()); double labelWidth = 90; - double totalWidth = 155; + double totalWidth = 190; double p = TableLayout.PREFERRED; double[] columnSize = {labelWidth, totalWidth}; JPanel gapTableLayoutPane = TableLayoutHelper.createGapTableLayoutPane(getComponent(), getRows(p), columnSize, 5, LayoutConstants.VGAP_LARGE); - gapTableLayoutPane.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 0)); + gapTableLayoutPane.setBorder(new ScaledEmptyBorder(0, 10, 0, 0)); UIScrollPane rightTopPane = new UIScrollPane(gapTableLayoutPane); rightTopPane.setBorder(BorderFactory.createEmptyBorder()); this.add(rightTopPane, BorderLayout.CENTER); diff --git a/designer-base/src/main/java/com/fr/design/mainframe/theme/edit/chart/ChartFontPane.java b/designer-base/src/main/java/com/fr/design/mainframe/theme/edit/chart/ChartFontPane.java index 3ab67f9569..1d1967ad3c 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/theme/edit/chart/ChartFontPane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/theme/edit/chart/ChartFontPane.java @@ -78,7 +78,7 @@ public class ChartFontPane extends BasicPane { protected JPanel getContentPane(JPanel buttonPane) { double labelWidth = 90; - double totalWidth = 155; + double totalWidth = 190; double p = TableLayout.PREFERRED; double[] rows = {p, p, p}; double[] columnSize = {labelWidth, totalWidth}; diff --git a/designer-base/src/main/java/com/fr/design/mainframe/theme/edit/chart/ChartLabelStylePane.java b/designer-base/src/main/java/com/fr/design/mainframe/theme/edit/chart/ChartLabelStylePane.java index c94dd6ef22..8892b0d0d4 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/theme/edit/chart/ChartLabelStylePane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/theme/edit/chart/ChartLabelStylePane.java @@ -1,5 +1,6 @@ package com.fr.design.mainframe.theme.edit.chart; +import com.fine.theme.utils.FineUIScale; import com.fr.base.theme.settings.ThemedChartStyle; import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.gui.ibutton.UIColorButton; @@ -35,6 +36,11 @@ public class ChartLabelStylePane extends AbstractChartStylePane { public String getUILabelText() { return Toolkit.i18nText("Fine-Design_Chart_Label_Character"); } + + @Override + public Dimension getPreferredSize() { + return new Dimension(super.getPreferredSize().width, FineUIScale.scale(100)); + } }; initListener(); } diff --git a/designer-base/src/main/java/com/fr/design/mainframe/theme/ui/BreadcrumbBar.java b/designer-base/src/main/java/com/fr/design/mainframe/theme/ui/BreadcrumbBar.java index bc466972ef..dbf13178b8 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/theme/ui/BreadcrumbBar.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/theme/ui/BreadcrumbBar.java @@ -1,5 +1,7 @@ package com.fr.design.mainframe.theme.ui; +import com.fine.theme.utils.FineUIScale; +import com.formdev.flatlaf.util.ScaledEmptyBorder; import com.fr.design.gui.ilable.UILabel; import javax.swing.BorderFactory; @@ -67,15 +69,15 @@ public class BreadcrumbBar extends JPanel { protected Component createSeparator() { UILabel separator = new UILabel("/"); - separator.setBorder(BorderFactory.createEmptyBorder(0, 8, 0, 8)); - separator.setPreferredSize(new Dimension(separator.getPreferredSize().width, 17)); + separator.setBorder(new ScaledEmptyBorder(0, 8, 0, 8)); + separator.setPreferredSize(new Dimension(separator.getPreferredSize().width, FineUIScale.scale(17))); return separator; } protected JButton createBreadcrumb(String text) { JButton button = new BreadcrumbButton(text); - button.setPreferredSize(new Dimension(button.getPreferredSize().width, 17)); + button.setPreferredSize(new Dimension(button.getPreferredSize().width, FineUIScale.scale(17))); return button; } diff --git a/designer-base/src/main/java/com/fr/design/write/submit/DBManipulationInWidgetEventPane.java b/designer-base/src/main/java/com/fr/design/write/submit/DBManipulationInWidgetEventPane.java index 30aa79f77f..14f92a68e2 100644 --- a/designer-base/src/main/java/com/fr/design/write/submit/DBManipulationInWidgetEventPane.java +++ b/designer-base/src/main/java/com/fr/design/write/submit/DBManipulationInWidgetEventPane.java @@ -1,8 +1,15 @@ package com.fr.design.write.submit; +import com.fine.theme.utils.FineUIScale; +import com.fine.theme.utils.FineUIUtils; +import com.fr.design.layout.FRGUIPaneFactory; + import javax.swing.*; import java.awt.*; +import static com.fine.swing.ui.layout.Layouts.cell; +import static com.fine.swing.ui.layout.Layouts.column; + /** * Created with IntelliJ IDEA. * User: zheng @@ -15,19 +22,19 @@ public class DBManipulationInWidgetEventPane extends DBManipulationPane { super(); } - protected void setBorderAndLayout(JPanel jPanel){ - jPanel.setLayout(new FlowLayout(FlowLayout.LEFT)); - } - protected void addComponent(JPanel mainPane,JScrollPane addPane){ } protected Dimension createConditionPanePreferredSize(){ - return new Dimension(454, 30); + return FineUIScale.scale(new Dimension(454, 20)); + } + + protected boolean setJpVisible() { + return false; } protected Dimension createControlBtnPanePreferredSize(){ - return new Dimension(92, 20); + return FineUIScale.scale(new Dimension(110, 20)); } protected String setControlBtnPanePosition(){ diff --git a/designer-base/src/main/java/com/fr/design/write/submit/DBManipulationPane.java b/designer-base/src/main/java/com/fr/design/write/submit/DBManipulationPane.java index 591e662abb..3c2e458738 100644 --- a/designer-base/src/main/java/com/fr/design/write/submit/DBManipulationPane.java +++ b/designer-base/src/main/java/com/fr/design/write/submit/DBManipulationPane.java @@ -168,7 +168,8 @@ public class DBManipulationPane extends BasicBeanPane { // peter:编辑的TablePane JPanel editTablePane = new JPanel(new BorderLayout(FineUIScale.scale(10), 0)); - editTablePane.setBounds(0, 0, FineUIScale.scale(280), FineUIScale.scale(180)); + Dimension editTableDimension = createEditTablePreferredSize(); + editTablePane.setBounds(0, 0, editTableDimension.width, editTableDimension.height); keyColumnValuesTable = new KeyColumnNameValueTable(); editTablePane.add(new UIScrollPane(keyColumnValuesTable), BorderLayout.CENTER); keyColumnValuesTable.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); @@ -180,18 +181,15 @@ public class DBManipulationPane extends BasicBeanPane { cell(FineUIUtils.wrapComponentWithTitle(chooseTable, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Base_Table")))) .getComponent()); JPanel bottomPane = initBottomPane(); - this.add(new AttrScrollPane() { - @Override - protected JPanel createContentPane() { - JPanel contentPane = new JPanel(new BorderLayout()); - contentPane.add(column(10, - cell(northPane), - cell(FineUIUtils.wrapComponentWithTitle(editTablePane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Base_Value"))), - cell(bottomPane)) - .getComponent(), BorderLayout.CENTER); - return contentPane; - } - }); + + JPanel contentPane = new JPanel(new BorderLayout()); + contentPane.add(column(10, + cell(northPane), + cell(FineUIUtils.wrapComponentWithTitle(editTablePane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Base_Value"))), + cell(bottomPane)) + .getComponent(), BorderLayout.CENTER); + + this.add(new UIScrollPane(contentPane)); initJTableColumn(); @@ -264,17 +262,17 @@ public class DBManipulationPane extends BasicBeanPane { UpdateCheckBox.setEnabled(b); } - private JPanel initBottomPane() { + protected JPanel initBottomPane() { JPanel eventPane = new JPanel(new BorderLayout()); eventPane.setPreferredSize(createControlBtnPanePreferredSize()); - eventPane.add(addEventButton(), BorderLayout.WEST); + eventPane.add(addEventButton()); JPanel conditionPane = this.createConditionPane(); JPanel btPane = new JPanel(FRGUIPaneFactory.createBorderLayout()); btPane.add(column(5, cell(FineUIUtils.wrapComponentWithTitle(conditionPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Submit_Condition"))), - cell(eventPane) + row(cell(eventPane), cell(new UILabel())) ).getComponent()); return btPane; } @@ -315,8 +313,8 @@ public class DBManipulationPane extends BasicBeanPane { DefaultTreeCellRenderer cr = (DefaultTreeCellRenderer) conditionsTree.getCellRenderer(); cr.setForeground(UIConstants.NORMAL_BACKGROUND); JScrollPane jp = new JScrollPane(conditionsTree); - jp.setPreferredSize(FineUIScale.scale(new Dimension(0, 40))); - addComponent(conditionPane, jp); + jp.setPreferredSize(createJpPreferredSize()); + jp.setVisible(setJpVisible()); String submitCondition = Toolkit.i18nText("Fine-Design_Basic_Set_Submit_Condition"); UIButton addSubmitConditionButton = new UIButton(submitCondition); addSubmitConditionButton.setToolTipText(submitCondition); @@ -354,12 +352,11 @@ public class DBManipulationPane extends BasicBeanPane { }); JPanel controlBtnPane = new JPanel(new BorderLayout()); - controlBtnPane.setPreferredSize(FineUIScale.scale(new Dimension(122, 20))); + controlBtnPane.setPreferredSize(createControlBtnPanePreferredSize()); controlBtnPane.add(addSubmitConditionButton, BorderLayout.NORTH); - conditionPane.add(row( - cell(jp).weight(1.0), - cell(new Spacer(122).add(controlBtnPane)) - ).getComponent()); + conditionPane.setPreferredSize(createConditionPanePreferredSize()); + conditionPane.add(controlBtnPane, setControlBtnPanePosition()); + conditionPane.add(jp, BorderLayout.CENTER); return conditionPane; } @@ -372,13 +369,25 @@ public class DBManipulationPane extends BasicBeanPane { mainPane.add(addPane, BorderLayout.CENTER); } + protected Dimension createEditTablePreferredSize() { + return FineUIScale.scale(new Dimension(280, 180)); + } protected Dimension createConditionPanePreferredSize() { - return FineUIScale.scale(new Dimension(454, 80)); + return FineUIScale.scale(new Dimension(454, 60)); + } + + protected boolean setJpVisible() { + return true; } + protected Dimension createJpPreferredSize() { + return FineUIScale.scale(new Dimension(280, 60)); + } + + protected Dimension createControlBtnPanePreferredSize() { - return new Dimension(110, 20); + return FineUIScale.scale(new Dimension(110, 20)); } protected String setControlBtnPanePosition() { diff --git a/designer-base/src/main/resources/com/fine/theme/icon/layout/layout_bottom.svg b/designer-base/src/main/resources/com/fine/theme/icon/layout/layout_bottom.svg new file mode 100644 index 0000000000..1e0d3d2418 --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/layout/layout_bottom.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/layout/layout_left.svg b/designer-base/src/main/resources/com/fine/theme/icon/layout/layout_left.svg new file mode 100644 index 0000000000..b891f37140 --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/layout/layout_left.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/layout/layout_right.svg b/designer-base/src/main/resources/com/fine/theme/icon/layout/layout_right.svg new file mode 100644 index 0000000000..ae8be3dd5f --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/layout/layout_right.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/layout/layout_top.svg b/designer-base/src/main/resources/com/fine/theme/icon/layout/layout_top.svg new file mode 100644 index 0000000000..7e61c5d786 --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/layout/layout_top.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/layout/layout_top_right.svg b/designer-base/src/main/resources/com/fine/theme/icon/layout/layout_top_right.svg new file mode 100644 index 0000000000..59bdc90a82 --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/layout/layout_top_right.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/light/ui/fine_light.icon.json b/designer-base/src/main/resources/com/fine/theme/light/ui/fine_light.icon.json index 86246c8d82..bef5d2905b 100644 --- a/designer-base/src/main/resources/com/fine/theme/light/ui/fine_light.icon.json +++ b/designer-base/src/main/resources/com/fine/theme/light/ui/fine_light.icon.json @@ -406,7 +406,12 @@ "information":"tip/information.svg", "new_information":"tip/new_information.svg", "success":"tip/success.svg", - "warning":"tip/warning.svg" + "warning":"tip/warning.svg", + "layout_top": "layout/layout_top.svg", + "layout_bottom": "layout/layout_bottom.svg", + "layout_left": "layout/layout_left.svg", + "layout_right": "layout/layout_right.svg", + "layout_top_right": "layout/layout_top_right.svg" } } diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/component/LineTypeComboBox.java b/designer-chart/src/main/java/com/fr/van/chart/designer/component/LineTypeComboBox.java index 395d615926..bb9c858760 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/component/LineTypeComboBox.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/component/LineTypeComboBox.java @@ -14,6 +14,8 @@ import java.awt.Dimension; import java.awt.Graphics; import java.awt.Graphics2D; +import static com.fine.theme.utils.FineUIScale.scale; + /** * Created by shine on 2019/08/30. */ @@ -47,10 +49,10 @@ public class LineTypeComboBox extends UIComboBox { switch (this.lineType) { case SOLID: - GraphHelper.drawLine(g2d, 4, d.height / 2, d.width - 8, d.height / 2); + GraphHelper.drawLine(g2d, scale(4), d.height / 2, d.width - scale(8), d.height / 2); break; case DASHED: - GraphHelper.drawLine(g2d, 4, d.height / 2, d.width - 8, d.height / 2, Constants.LINE_DASH); + GraphHelper.drawLine(g2d, scale(4), d.height / 2, d.width - scale(8), d.height / 2, Constants.LINE_DASH); break; default: break; @@ -59,7 +61,7 @@ public class LineTypeComboBox extends UIComboBox { } public Dimension getPreferredSize() { - return new Dimension(60, 16); + return scale(new Dimension(60, 16)); } public Dimension getMinimumSize() { diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartPlotLegendPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartPlotLegendPane.java index 6dac8d07dd..635faf5bcb 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartPlotLegendPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartPlotLegendPane.java @@ -1,6 +1,7 @@ package com.fr.van.chart.designer.style; import com.fine.swing.ui.layout.Column; +import com.fine.theme.icon.LazyIcon; import com.fine.theme.utils.FineLayoutBuilder; import com.fine.theme.utils.FineUIScale; import com.fr.base.BaseUtils; @@ -186,11 +187,11 @@ public class VanChartPlotLegendPane extends BasicPane { Integer[] valueArray = {Constants.TOP, Constants.BOTTOM, Constants.LEFT, Constants.RIGHT, Constants.RIGHT_TOP}; Icon[] iconArray = { - BaseUtils.readIcon("/com/fr/design/images/chart/ChartLegend/layout_top.png"), - BaseUtils.readIcon("/com/fr/design/images/chart/ChartLegend/layout_bottom.png"), - BaseUtils.readIcon("/com/fr/design/images/chart/ChartLegend/layout_left.png"), - BaseUtils.readIcon("/com/fr/design/images/chart/ChartLegend/layout_right.png"), - BaseUtils.readIcon("/com/fr/design/images/chart/ChartLegend/layout_top_right.png") + new LazyIcon("layout_top"), + new LazyIcon("layout_bottom"), + new LazyIcon("layout_left"), + new LazyIcon("layout_right"), + new LazyIcon("layout_top_right") }; location = new UIButtonGroup(iconArray, valueArray); diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartTitlePane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartTitlePane.java index cc5199d3c2..f2d9ac838f 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartTitlePane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartTitlePane.java @@ -1,6 +1,7 @@ package com.fr.van.chart.designer.style; import com.fine.theme.utils.FineComponentsFactory; +import com.fine.theme.utils.FineUIScale; import com.fine.theme.utils.FineUIStyle; import com.fr.base.BaseFormula; import com.fr.base.Utils; @@ -51,9 +52,9 @@ import static com.fine.swing.ui.layout.Layouts.row; public class VanChartTitlePane extends AbstractVanChartScrollPane { private static final long serialVersionUID = -2438898431228882682L; - private static final int WIDTH = 165; - private static final int HEIGHT = 100; - private static final int GAP = 20; + private static final int WIDTH = FineUIScale.scale(165); + private static final int HEIGHT = FineUIScale.scale(100); + private static final int GAP = FineUIScale.scale(20); private UICheckBox isTitleVisible; private JPanel titlePane; diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartPlotLabelDetailPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartPlotLabelDetailPane.java index dfc234f61d..deb4779e4b 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartPlotLabelDetailPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartPlotLabelDetailPane.java @@ -9,6 +9,7 @@ import com.fr.design.dialog.BasicPane; import com.fr.design.foldablepane.UIExpandablePane; import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.gui.ibutton.UIToggleButton; +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.TableLayout; @@ -46,7 +47,7 @@ public class VanChartPlotLabelDetailPane extends BasicPane { private UIButtonGroup position; private UIButtonGroup autoAdjust; private UIButtonGroup orientation; - private UIToggleButton tractionLine; + private UICheckBox tractionLine; private ColorSelectBox backgroundColor; private VanChartBorderWithShapePane borderPane; @@ -242,8 +243,14 @@ public class VanChartPlotLabelDetailPane extends BasicPane { } if (plot.isSupportLeadLine()) { - tractionLine = new UIToggleButton(Toolkit.i18nText("Fine-Design_Chart_Show_Guideline")); - panel.add(tractionLine, BorderLayout.SOUTH); + tractionLine = new UICheckBox(Toolkit.i18nText("Fine-Design_Chart_Show_Guideline")); + Component[][] comps = new Component[1][2]; + comps[0] = new Component[]{new UILabel(), tractionLine}; + + double[] row = new double[]{TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED}; + double[] col = new double[]{TableLayout.FILL, TableLayout4VanChartHelper.EDIT_AREA_WIDTH}; + getLabelPositionPane(comps, row, col); + panel.add(getLabelPositionPane(comps, row, col), BorderLayout.SOUTH); initPositionListener(); } else if (PlotFactory.plotAutoAdjustLabelPosition(plot)) { panel.add(FineLayoutBuilder.createHorizontalLayout(0, new double[]{1.2, 3}, diff --git a/designer-realize/src/main/java/com/fr/design/condition/WidgetHighlightPane.java b/designer-realize/src/main/java/com/fr/design/condition/WidgetHighlightPane.java index 99d6e57b7e..b3839ef004 100644 --- a/designer-realize/src/main/java/com/fr/design/condition/WidgetHighlightPane.java +++ b/designer-realize/src/main/java/com/fr/design/condition/WidgetHighlightPane.java @@ -9,8 +9,7 @@ import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.ilable.UILabel; import com.fr.design.mainframe.ElementCasePane; import com.fr.design.widget.CellWidgetCardPane; -import com.fr.design.widget.EastCellWidgetCardPane; -import com.fr.design.widget.WidgetManageCardPane; +import com.fr.design.widget.FloatWidgetManageCardPane; import com.fr.design.widget.WidgetPane; import com.fr.form.ui.*; @@ -48,7 +47,7 @@ public class WidgetHighlightPane extends ConditionAttrSingleConditionPane paneList; - private BaseLayoutContainer tabsHeaderIconPane; + protected BaseLayoutContainer tabsHeaderIconPane; private BasicWidgetPropertySettingPane widgetPropertyPane; //通用属性容器 @@ -55,6 +55,10 @@ public class CellWidgetCardPane extends BasicPane { private ElementCasePane pane; + protected JPanel center; + + protected CardLayout tabbedPane; + public CellWidgetCardPane(ElementCasePane pane) { this.pane = pane; } diff --git a/designer-realize/src/main/java/com/fr/design/widget/EastCellWidgetCardPane.java b/designer-realize/src/main/java/com/fr/design/widget/EastCellWidgetCardPane.java index 0ed6faa17c..5a33ec6c63 100644 --- a/designer-realize/src/main/java/com/fr/design/widget/EastCellWidgetCardPane.java +++ b/designer-realize/src/main/java/com/fr/design/widget/EastCellWidgetCardPane.java @@ -19,12 +19,6 @@ import java.awt.Component; */ public class EastCellWidgetCardPane extends CellWidgetCardPane { - private CardLayout tabbedPane; - - private JPanel center; - - private UIHeadGroup tabsHeaderIconPane; - public EastCellWidgetCardPane(ElementCasePane pane) { super(pane); } diff --git a/designer-realize/src/main/java/com/fr/design/widget/FloatWidgetManageCardPane.java b/designer-realize/src/main/java/com/fr/design/widget/FloatWidgetManageCardPane.java new file mode 100644 index 0000000000..a687dd1d1d --- /dev/null +++ b/designer-realize/src/main/java/com/fr/design/widget/FloatWidgetManageCardPane.java @@ -0,0 +1,25 @@ +package com.fr.design.widget; + +import com.fr.design.mainframe.ElementCasePane; + +/** + * 悬浮窗内嵌控件面板 + * @author Renekton + * @since on 2024/08/16 + * Created on 2024/08/16 + */ +public class FloatWidgetManageCardPane extends EastCellWidgetCardPane { + + /** + * 悬浮窗控件管理 + * @param pane 面板 + */ + public FloatWidgetManageCardPane(ElementCasePane pane) { + super(pane); + } + + @Override + protected WidgetEventPane initWidgetEventPane(ElementCasePane pane){ + return new WidgetEventPaneNoPop(pane); + } +} diff --git a/designer-realize/src/main/java/com/fr/design/write/submit/SmartInsertDBManipulationInWidgetEventPane.java b/designer-realize/src/main/java/com/fr/design/write/submit/SmartInsertDBManipulationInWidgetEventPane.java index 28a35ef2fd..476c664fe0 100644 --- a/designer-realize/src/main/java/com/fr/design/write/submit/SmartInsertDBManipulationInWidgetEventPane.java +++ b/designer-realize/src/main/java/com/fr/design/write/submit/SmartInsertDBManipulationInWidgetEventPane.java @@ -1,5 +1,7 @@ package com.fr.design.write.submit; +import com.fine.theme.utils.FineUIScale; +import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.mainframe.ElementCasePane; import javax.swing.*; @@ -17,19 +19,19 @@ public class SmartInsertDBManipulationInWidgetEventPane extends SmartInsertDBMan super(ePane); } - protected void setBorderAndLayout(JPanel jPanel){ - jPanel.setLayout(new FlowLayout(FlowLayout.LEFT)); - } - protected void addComponent(JPanel mainPane,JScrollPane addPane){ } protected Dimension createConditionPanePreferredSize(){ - return new Dimension(454, 30); + return FineUIScale.scale(new Dimension(454, 20)); + } + + protected boolean setJpVisible() { + return false; } protected Dimension createControlBtnPanePreferredSize(){ - return new Dimension(92, 20); + return FineUIScale.scale(new Dimension(110, 20)); } protected String setControlBtnPanePosition(){