From 702ab951a14aea1eb8e0782e56c4a5c44a8533e0 Mon Sep 17 00:00:00 2001 From: renekton Date: Thu, 22 Aug 2024 19:15:17 +0800 Subject: [PATCH 1/4] =?UTF-8?q?newui=E7=BC=A9=E6=94=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fine/theme/utils/FineUIStyle.java | 1 + .../condition/DSColumnLiteConditionPane.java | 4 ++-- .../controlpane/UIListGroupControlPane.java | 3 ++- .../fr/design/gui/date/UICalendarPanel.java | 2 +- .../com/fr/design/gui/date/UIDayLabel.java | 4 +++- .../mainframe/theme/TemplateThemeBlock.java | 3 ++- .../theme/dialog/TemplateThemeDialog.java | 13 ++++++++----- .../dialog/TemplateThemeGridPagesDialog.java | 6 ++++-- .../theme/edit/chart/ChartFontPane.java | 2 +- .../style/color/ColorChooserPreview.java | 2 +- .../design/style/color/ColorSelectDialog.java | 4 +++- .../style/color/CustomChooserPanel.java | 19 ++++++++++--------- .../style/color/SwatchChooserPanel.java | 13 +++++++------ .../write/submit/DBManipulationPane.java | 8 ++++---- .../com/fine/theme/icon/icon_edit.svg | 5 +++++ .../fine/theme/light/ui/fine_light.icon.json | 3 ++- .../light/ui/laf/FineLightLaf.properties | 8 ++++++-- 17 files changed, 62 insertions(+), 38 deletions(-) create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/icon_edit.svg diff --git a/designer-base/src/main/java/com/fine/theme/utils/FineUIStyle.java b/designer-base/src/main/java/com/fine/theme/utils/FineUIStyle.java index 925c0a438d..673e55b352 100644 --- a/designer-base/src/main/java/com/fine/theme/utils/FineUIStyle.java +++ b/designer-base/src/main/java/com/fine/theme/utils/FineUIStyle.java @@ -51,6 +51,7 @@ public interface FineUIStyle { String WHITE_BUTTON = "whiteButton"; String ORIGINAL_BUTTON = "originalButton"; String DETAIL_LABEL = "detailLabel"; + String WIDGET_EVENT_LABEL = "widgetEventLabel"; /** 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 cee0410a95..825be9e635 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,8 +123,8 @@ public class DSColumnLiteConditionPane extends LiteConditionPane extends JPanel { private final TemplateThemeProfilePane profilePane; private final Icon theme4currentTemplateMarkIcon = IOUtils.readIcon("/com/fr/design/form/images/theme4currentTemplate.png"); private final Icon theme4NewTemplateMarkIcon= IOUtils.readIcon("/com/fr/design/form/images/theme4newTemplate.png"); - private final Icon profileIcon = IOUtils.readIcon("/com/fr/design/icon/icon_edit.png"); + private final Icon profileIcon = new LazyIcon("icon_edit"); private final boolean displayTheme4NewTemplateMarker; private final ThumbnailPane thumbnailPane; diff --git a/designer-base/src/main/java/com/fr/design/mainframe/theme/dialog/TemplateThemeDialog.java b/designer-base/src/main/java/com/fr/design/mainframe/theme/dialog/TemplateThemeDialog.java index 1864a91b1f..def9c7d626 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/theme/dialog/TemplateThemeDialog.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/theme/dialog/TemplateThemeDialog.java @@ -1,5 +1,6 @@ package com.fr.design.mainframe.theme.dialog; +import com.formdev.flatlaf.util.ScaledEmptyBorder; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.utils.gui.GUICoreUtils; @@ -14,17 +15,19 @@ import java.awt.Window; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; +import static com.fine.theme.utils.FineUIScale.scale; + /** * @author Starryi * @version 1.0 * Created by Starryi on 2021/8/16 */ public abstract class TemplateThemeDialog extends JDialog { - public static final int DIALOG_TITLE_HEIGHT = 28; + public static final int DIALOG_TITLE_HEIGHT = scale(28); - public static final int DIALOG_BOTTOM_ACTION_BAR_HEIGHT = 30; - public static final int DIALOG_BOTTOM_ACTION_BUTTON_GAP = 10; - public static final int DIALOG_BOTTOM_ACTION_BUTTON_HEIGHT = 20; + public static final int DIALOG_BOTTOM_ACTION_BAR_HEIGHT = scale(30); + public static final int DIALOG_BOTTOM_ACTION_BUTTON_GAP = scale(10); + public static final int DIALOG_BOTTOM_ACTION_BUTTON_HEIGHT = scale(20); private final JPanel contentContainer; private final JPanel actionContainer; @@ -97,7 +100,7 @@ public abstract class TemplateThemeDialog extends JDialog { private JPanel createActionsContainer(int align, UIButton... buttons) { JPanel container = new JPanel(new FlowLayout(align, DIALOG_BOTTOM_ACTION_BUTTON_GAP, 0)); int paddingVertical = getPaddingVertical(); - container.setBorder(BorderFactory.createEmptyBorder(paddingVertical, 0, paddingVertical, 0)); + container.setBorder(new ScaledEmptyBorder(paddingVertical, 0, paddingVertical, 0)); if (buttons == null || buttons.length == 0) { return container; diff --git a/designer-base/src/main/java/com/fr/design/mainframe/theme/dialog/TemplateThemeGridPagesDialog.java b/designer-base/src/main/java/com/fr/design/mainframe/theme/dialog/TemplateThemeGridPagesDialog.java index bf65b9be28..d7e986c346 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/theme/dialog/TemplateThemeGridPagesDialog.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/theme/dialog/TemplateThemeGridPagesDialog.java @@ -9,14 +9,16 @@ import com.fr.design.mainframe.theme.TemplateThemeGridPane; import javax.swing.JPanel; import java.awt.Window; +import static com.fine.theme.utils.FineUIScale.scale; + /** * @author Starryi * @version 1.0 * Created by Starryi on 2021/8/13 */ public class TemplateThemeGridPagesDialog extends TemplateThemeDialog implements TemplateThemeGridPagesPane.PageChangeListener { - public static final int CONTENT_WIDTH = TemplateThemeGridPane.CONTENT_WIDTH + 48; - public static final int CONTENT_HEIGHT = TemplateThemeGridPane.CONTENT_HEIGHT + 37; + public static final int CONTENT_WIDTH = TemplateThemeGridPane.CONTENT_WIDTH + scale(48); + public static final int CONTENT_HEIGHT = TemplateThemeGridPane.CONTENT_HEIGHT + scale(37); protected TemplateThemeGridPagesPane overallPane; 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 1d1967ad3c..c87174c451 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 @@ -89,7 +89,7 @@ public class ChartFontPane extends BasicPane { new Component[]{null, buttonPane} }; - return TableLayoutHelper.createGapTableLayoutPane(components, rows, columnSize, 5, 0); + return TableLayoutHelper.createGapTableLayoutPane(components, rows, columnSize, 5, 10); } public String getUILabelText() { diff --git a/designer-base/src/main/java/com/fr/design/style/color/ColorChooserPreview.java b/designer-base/src/main/java/com/fr/design/style/color/ColorChooserPreview.java index 100feb2d35..349aa041a3 100644 --- a/designer-base/src/main/java/com/fr/design/style/color/ColorChooserPreview.java +++ b/designer-base/src/main/java/com/fr/design/style/color/ColorChooserPreview.java @@ -30,7 +30,7 @@ public class ColorChooserPreview extends JPanel { private String sampleText; - private static final int SWATH_WIDTH = 50; + private static final int SWATH_WIDTH = FineUIScale.scale(50); private Color oldColor = null; diff --git a/designer-base/src/main/java/com/fr/design/style/color/ColorSelectDialog.java b/designer-base/src/main/java/com/fr/design/style/color/ColorSelectDialog.java index 149ce1a17e..e9ee892bf0 100644 --- a/designer-base/src/main/java/com/fr/design/style/color/ColorSelectDialog.java +++ b/designer-base/src/main/java/com/fr/design/style/color/ColorSelectDialog.java @@ -16,6 +16,8 @@ import java.awt.Frame; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; +import static com.fine.theme.utils.FineUIScale.scale; + /** * 颜色选择器更多颜色对话框 @@ -85,7 +87,7 @@ public class ColorSelectDialog extends MiddleChartDialog{ private void initComponent() { this.setLayout(new BorderLayout()); this.add(pane,BorderLayout.NORTH); - this.setBasicDialogSize(545,500); + this.setBasicDialogSize(scale(545),scale(500)); this.setResizable(false); this.applyClosingAction(); diff --git a/designer-base/src/main/java/com/fr/design/style/color/CustomChooserPanel.java b/designer-base/src/main/java/com/fr/design/style/color/CustomChooserPanel.java index 48f5e5f2bf..d6b2df3023 100644 --- a/designer-base/src/main/java/com/fr/design/style/color/CustomChooserPanel.java +++ b/designer-base/src/main/java/com/fr/design/style/color/CustomChooserPanel.java @@ -38,6 +38,7 @@ import static com.fine.swing.ui.layout.Layouts.column; import static com.fine.swing.ui.layout.Layouts.fix; import static com.fine.swing.ui.layout.Layouts.flex; import static com.fine.swing.ui.layout.Layouts.row; +import static com.fine.theme.utils.FineUIScale.scale; /** @@ -124,17 +125,17 @@ class CustomChooserPanel extends AbstractColorChooserPanel implements ColorSelec /** * The default width of the gradient image. */ - private static final int IMG_WIDTH = 180; + private static final int IMG_WIDTH = scale(180); /** * The default height of the gradient image. */ - private static final int IMG_HEIGHT = 180; + private static final int IMG_HEIGHT = scale(180); /** * The default width of the track gradient. */ - private static final int TRACK_WIDTH = 12; + private static final int TRACK_WIDTH = scale(12); /** * The UILabel for Red. @@ -597,7 +598,7 @@ class CustomChooserPanel extends AbstractColorChooserPanel implements ColorSelec */ protected void buildChooser() { setLayout(new BorderLayout(10, 0)); - setPreferredSize(new Dimension((int) this.getPreferredSize().getWidth(), FineUIScale.scale(180))); + setPreferredSize(new Dimension((int) this.getPreferredSize().getWidth(), scale(180))); add(buildRightPanel(), BorderLayout.CENTER); JPanel container = new JPanel(); container.setLayout(new FlowLayout(FlowLayout.LEFT, 10, 0)); @@ -623,9 +624,9 @@ class CustomChooserPanel extends AbstractColorChooserPanel implements ColorSelec container.add(gradientPanel); container.add(layeredPane); - layeredPane.setPreferredSize(FineUIScale.scale(new Dimension(12, 180))); - slider.setSize(FineUIScale.scale(new Dimension(12, 180))); - trackPanel.setSize(FineUIScale.scale(new Dimension(12, 180))); + layeredPane.setPreferredSize(scale(new Dimension(12, 180))); + slider.setSize(scale(new Dimension(12, 180))); + trackPanel.setSize(scale(new Dimension(12, 180))); add(container, BorderLayout.WEST); slider.addChangeListener(new SliderChangeListener()); @@ -638,7 +639,7 @@ class CustomChooserPanel extends AbstractColorChooserPanel implements ColorSelec private JPanel createGradientPanel() { return new JPanel() { public Dimension getPreferredSize() { - return FineUIScale.scale(new Dimension(IMG_WIDTH, IMG_HEIGHT)); + return scale(new Dimension(IMG_WIDTH, IMG_HEIGHT)); } public void paint(Graphics g) { @@ -657,7 +658,7 @@ class CustomChooserPanel extends AbstractColorChooserPanel implements ColorSelec private JPanel createTrackPanel() { return new JPanel() { public Dimension getPreferredSize() { - return FineUIScale.scale(new Dimension(TRACK_WIDTH, IMG_HEIGHT)); + return scale(new Dimension(TRACK_WIDTH, IMG_HEIGHT)); } public void paint(Graphics g) { diff --git a/designer-base/src/main/java/com/fr/design/style/color/SwatchChooserPanel.java b/designer-base/src/main/java/com/fr/design/style/color/SwatchChooserPanel.java index 74f4b409a6..2d5addf82d 100644 --- a/designer-base/src/main/java/com/fr/design/style/color/SwatchChooserPanel.java +++ b/designer-base/src/main/java/com/fr/design/style/color/SwatchChooserPanel.java @@ -19,6 +19,7 @@ import javax.swing.JColorChooser; import javax.swing.JPanel; import javax.swing.colorchooser.AbstractColorChooserPanel; +import static com.fine.theme.utils.FineUIScale.scale; public class SwatchChooserPanel extends AbstractColorChooserPanel{ @@ -35,13 +36,13 @@ public class SwatchChooserPanel extends AbstractColorChooserPanel{ abstract static class SwatchPanel extends JPanel { /** The width of each block. */ - protected int cellWidth = 16; + protected int cellWidth = scale(16); /** The height of each block. */ - protected int cellHeight = 16; + protected int cellHeight = scale(16); /** The gap between blocks. */ - protected int gap = 1; + protected int gap = scale(1); /** The number of rows in the swatch panel. */ protected int numRows; @@ -70,7 +71,7 @@ public class SwatchChooserPanel extends AbstractColorChooserPanel{ int width = numCols * cellWidth + (numCols - 1) * gap; Insets insets = getInsets(); - return FineUIScale.scale(new Dimension(width + insets.left + insets.right, + return scale(new Dimension(width + insets.left + insets.right, height + insets.top + insets.bottom)); } @@ -511,8 +512,8 @@ public class SwatchChooserPanel extends AbstractColorChooserPanel{ Insets insets = parent.getInsets(); - return FineUIScale.scale(new Dimension(insets.left + insets.right + xmax, - insets.top + insets.bottom + ymax)); + return new Dimension(insets.left + insets.right + xmax, + insets.top + insets.bottom + ymax); } 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 1aa1422f15..bf24b435a3 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 @@ -309,7 +309,7 @@ public class DBManipulationPane extends BasicBeanPane { conditionsTree = new JTree(new DefaultTreeModel(new ExpandMutableTreeNode())); conditionsTree.setRootVisible(false); conditionsTree.setShowsRootHandles(true); - conditionsTree.setBackground(UIConstants.NORMAL_BACKGROUND); + conditionsTree.setBackground(FineUIUtils.getUIColor("background.normal", "background.normal")); conditionsTree.setForeground(UIConstants.NORMAL_BACKGROUND); DefaultTreeCellRenderer cr = (DefaultTreeCellRenderer) conditionsTree.getCellRenderer(); cr.setForeground(UIConstants.NORMAL_BACKGROUND); @@ -740,7 +740,7 @@ public class DBManipulationPane extends BasicBeanPane { return super.stopCellEditing(); } }); - ((DefaultCellEditor) column1.getCellEditor()).setClickCountToStart(2); + ((DefaultCellEditor) column1.getCellEditor()).setClickCountToStart(1); //设置Column 2的Editor column2.setCellEditor(new ColumnValueEditor()); @@ -949,12 +949,12 @@ public class DBManipulationPane extends BasicBeanPane { } /* - * 双击以编辑 + * 单击以编辑 */ @Override public boolean isCellEditable(EventObject anEvent) { if (anEvent instanceof MouseEvent) { - return ((MouseEvent) anEvent).getClickCount() >= 2; + return ((MouseEvent) anEvent).getClickCount() >= 1; } return true; } diff --git a/designer-base/src/main/resources/com/fine/theme/icon/icon_edit.svg b/designer-base/src/main/resources/com/fine/theme/icon/icon_edit.svg new file mode 100644 index 0000000000..e0d5ef158d --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/icon_edit.svg @@ -0,0 +1,5 @@ + + + + + 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 d73d090802..7a93ba1121 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 @@ -442,7 +442,8 @@ "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" + "layout_top_right": "layout/layout_top_right.svg", + "icon_edit": "icon_edit.svg" } } diff --git a/designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLightLaf.properties b/designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLightLaf.properties index f31bda6cf5..604c32e93b 100644 --- a/designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLightLaf.properties +++ b/designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLightLaf.properties @@ -305,7 +305,7 @@ ComboBox.maximumRowCount = 15 ComboBox.buttonStyle = auto ComboBox.background = #FFF ComboBox.buttonBackground = $ComboBox.background -ComboBox.buttonEditableBackground = darken($ComboBox.background,2%) +ComboBox.buttonEditableBackground = $ComboBox.background ComboBox.buttonSeparatorColor = $ComboBox.background ComboBox.buttonDisabledSeparatorColor = $Component.disabledBorderColor ComboBox.buttonArrowColor = @buttonArrowColor @@ -1396,4 +1396,8 @@ chart.selectedBorderColor = #2576EF [style]Label.detailLabel = \ foreground: fade(@foreground, 90%); \ - background: $fill.normal; \ No newline at end of file + background: $fill.normal; + +[style]Label.widgetEventLabel = \ + foreground: $List.wrapper.text.fontColor; \ + background: $fill.normal; From e5915202d4387cdf9524234f06ad7fc296f397f0 Mon Sep 17 00:00:00 2001 From: renekton Date: Thu, 22 Aug 2024 19:32:38 +0800 Subject: [PATCH 2/4] =?UTF-8?q?newui=E7=BC=A9=E6=94=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/style/color/SwatchChooserPanel.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/style/color/SwatchChooserPanel.java b/designer-base/src/main/java/com/fr/design/style/color/SwatchChooserPanel.java index 2d5addf82d..5fb4143da8 100644 --- a/designer-base/src/main/java/com/fr/design/style/color/SwatchChooserPanel.java +++ b/designer-base/src/main/java/com/fr/design/style/color/SwatchChooserPanel.java @@ -71,8 +71,8 @@ public class SwatchChooserPanel extends AbstractColorChooserPanel{ int width = numCols * cellWidth + (numCols - 1) * gap; Insets insets = getInsets(); - return scale(new Dimension(width + insets.left + insets.right, - height + insets.top + insets.bottom)); + return new Dimension(width + insets.left + insets.right, + height + insets.top + insets.bottom); } /** From 3d585c092c47ee663c0e9f3984053a06be388df3 Mon Sep 17 00:00:00 2001 From: renekton Date: Fri, 23 Aug 2024 15:07:43 +0800 Subject: [PATCH 3/4] =?UTF-8?q?newui=E7=BC=A9=E6=94=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/formula/JavaEditorPane.java | 12 +++--- .../fr/design/report/ReportEnginePane.java | 41 +++++++++---------- .../fr/design/report/WriteShortCutsPane.java | 26 ++++++------ 3 files changed, 39 insertions(+), 40 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/formula/JavaEditorPane.java b/designer-base/src/main/java/com/fr/design/formula/JavaEditorPane.java index a34762a1fd..c5902c3cdc 100644 --- a/designer-base/src/main/java/com/fr/design/formula/JavaEditorPane.java +++ b/designer-base/src/main/java/com/fr/design/formula/JavaEditorPane.java @@ -32,6 +32,9 @@ import java.io.InputStream; import java.util.ArrayList; import java.util.concurrent.ExecutionException; +import static com.fine.swing.ui.layout.Layouts.cell; +import static com.fine.swing.ui.layout.Layouts.row; + public class JavaEditorPane extends BasicPane { private RSyntaxTextArea javaText; @@ -83,13 +86,12 @@ public class JavaEditorPane extends BasicPane { } UIScrollPane jt = new UIScrollPane(javaText); - JPanel toolbarPane = new JPanel(new FlowLayout(FlowLayout.LEFT)); + JPanel toolbarPane = new JPanel(new BorderLayout()); UIButton saveButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Save")); saveButton.setAction(new SaveAction()); UIButton compileButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Compile")); compileButton.setAction(new CompilerAction()); - toolbarPane.add(saveButton); - toolbarPane.add(compileButton); + toolbarPane.add(row(8, cell(saveButton), cell(compileButton)).getComponent()); this.add(toolbarPane, BorderLayout.NORTH); this.add(jt, BorderLayout.CENTER); @@ -155,7 +157,7 @@ public class JavaEditorPane extends BasicPane { private void saveTextToFile(String text) { if (StringUtils.isEmpty(text)) { - return; + return; } if (StringUtils.isEmpty(className)) { return; @@ -180,7 +182,7 @@ public class JavaEditorPane extends BasicPane { @Override protected JavaCompileInfo doInBackground() throws Exception { - + return FRContext.getCommonOperator().compile(javaText.getText()); } diff --git a/designer-realize/src/main/java/com/fr/design/report/ReportEnginePane.java b/designer-realize/src/main/java/com/fr/design/report/ReportEnginePane.java index dfbab0e02e..56e2398b35 100644 --- a/designer-realize/src/main/java/com/fr/design/report/ReportEnginePane.java +++ b/designer-realize/src/main/java/com/fr/design/report/ReportEnginePane.java @@ -93,12 +93,11 @@ public class ReportEnginePane extends BasicBeanPane { outReportEnginePane.add(createReportEnginePane()); JPanel outAdvicePane = new JPanel(); outAdvicePane.setLayout(FRGUIPaneFactory.createBorderLayout()); - outAdvicePane.setPreferredSize(new Dimension(FineUIScale.scale(600), FineUIScale.scale(160))); outAdvicePane.add(createAdvicePane()); this.add(column(20, cell(wrapComponentWithTitle(outReportEnginePane, Toolkit.i18nText("Fine-Design_Report_Report_Engine_Attribute"))), - cell(wrapComponentWithTitle(outPagingEngineSelectPane, Toolkit.i18nText("Fine-Design_Report_Paging_Engine_Select"))).weight(1.0), + cell(wrapComponentWithTitle(outPagingEngineSelectPane, Toolkit.i18nText("Fine-Design_Report_Paging_Engine_Select"))), cell(wrapComponentWithTitle(outAdvicePane, Toolkit.i18nText("Fine-Design_Report_Advice")))) .getComponent()); } @@ -123,8 +122,6 @@ public class ReportEnginePane extends BasicBeanPane { createEngineXSettingPane(); createLineEngineSettingPane(); outLineEngineSettingPane.setVisible(false); - outEngineXSettingPane.setPreferredSize(new Dimension(scale(625), scale(220))); - outLineEngineSettingPane.setPreferredSize(new Dimension(scale(625), scale(220))); engineSettingPane.add(box(cell(outEngineXSettingPane), cell(outLineEngineSettingPane)).getComponent() , BorderLayout.WEST); @@ -157,18 +154,18 @@ public class ReportEnginePane extends BasicBeanPane { rowCountPanel.add(rowCountBox); JPanel tip = createTipPane(Toolkit.i18nText("Fine-Design_Report_Engine_X_tip")); engineXSettingPane.add(row(20, - column(10, - column(fix(6), cell(title)), - cell(new UILabel()), - cell(new UILabel()), - cell(new UILabel()) + column( + column(fix(6), cell(title)), + cell(new UILabel()), + cell(new UILabel()), + cell(new UILabel()) ), - column(10, - cell(pageQueryBoxPanel), - cell(engineXPageQueryPane), - cell(rowCountPanel), - cell(tip))) + column( + cell(pageQueryBoxPanel), + cell(engineXPageQueryPane), + cell(rowCountPanel), + cell(tip))) .getComponent()); outEngineXSettingPane.add(engineXSettingPane); } @@ -189,14 +186,14 @@ public class ReportEnginePane extends BasicBeanPane { lineEnginePageQueryBox.addActionListener(new SelectActionListener(lineEnginePageQueryBox, lineEnginePageQueryPane)); JPanel tipPane = createTipPane(Toolkit.i18nText("Fine-Design_Report_Line_Engine_tip")); lineEngineSettingPane.add(row(20, - column(10, - column(fix(6), cell(title)), - cell(new UILabel()), - cell(new UILabel())), - column(10, - cell(pageQueryBoxPanel), - cell(lineEnginePageQueryPane), - cell(tipPane))) + column( + column(fix(6), cell(title)), + cell(new UILabel()), + cell(new UILabel())), + column( + cell(pageQueryBoxPanel), + cell(lineEnginePageQueryPane), + cell(tipPane))) .getComponent()); outLineEngineSettingPane.add(lineEngineSettingPane); } diff --git a/designer-realize/src/main/java/com/fr/design/report/WriteShortCutsPane.java b/designer-realize/src/main/java/com/fr/design/report/WriteShortCutsPane.java index 232ebc2e1d..84348b9309 100644 --- a/designer-realize/src/main/java/com/fr/design/report/WriteShortCutsPane.java +++ b/designer-realize/src/main/java/com/fr/design/report/WriteShortCutsPane.java @@ -37,11 +37,11 @@ public class WriteShortCutsPane extends JPanel{ private UILabel nextRowHK; private UILabel preCol; private UILabel preRow; - + public WriteShortCutsPane(){ this.setLayout(new BorderLayout()); this.add(createContentPane(), BorderLayout.NORTH); - + if(!ServerPreferenceConfig.getInstance().isWriteShortCuts()){ nextColString = "Enter"; nextRowString = "Tab"; @@ -60,10 +60,10 @@ public class WriteShortCutsPane extends JPanel{ return contentPane; } - + private JPanel getFeatureNamePane(){ JPanel featureNamePane = new JPanel(new BorderLayout()); - featureNamePane.setBorder(BorderFactory.createEmptyBorder(16, 0, 0, 0)); + featureNamePane.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0)); UILabel name = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Feature_Name"), SwingConstants.RIGHT); UILabel nextCol = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Cursor_To_Next_Column"), SwingConstants.CENTER); UILabel nextRow = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Cursor_To_Next_Row"), SwingConstants.CENTER); @@ -75,13 +75,13 @@ public class WriteShortCutsPane extends JPanel{ JPanel centerPane = new JPanel(new BorderLayout()); centerPane.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 0)); - centerPane.add(column(24, + centerPane.add(column(10, row(10, cell(name).weight(0.13), cell(nextCol).weight(0.15), cell(new JPanel()).weight(0.12), cell(nextRow).weight(0.15), flex(0.45)), row(10, cell(shortName).weight(0.13), cell(nextColHK).weight(0.15), cell(switchBtnPane).weight(0.12), cell(nextRowHK).weight(0.15), flex(0.45)) ).getComponent()); featureNamePane.add(centerPane, BorderLayout.CENTER); - + return featureNamePane; } @@ -96,7 +96,7 @@ public class WriteShortCutsPane extends JPanel{ private JPanel getHintsPane(){ JPanel hintsPane = new JPanel(new BorderLayout()); - hintsPane.setBorder(BorderFactory.createEmptyBorder(16, 0, 0, 0)); + hintsPane.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0)); UILabel systemDefault = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_System_Default"), SwingConstants.RIGHT); UILabel preColText = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Cursor_To_Previous_Column"), SwingConstants.CENTER); @@ -107,19 +107,19 @@ public class WriteShortCutsPane extends JPanel{ JPanel centerPane = new JPanel(new BorderLayout()); centerPane.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 0)); - centerPane.add(column(24, + centerPane.add(column(10, row(10, cell(systemDefault).weight(0.13), cell(preColText).weight(0.24), cell(preCol).weight(0.14), flex(0.64)), row(10, cell(new JPanel()).weight(0.13), cell(preRowText).weight(0.24), cell(preRow).weight(0.14), flex(0.64)) ).getComponent()); hintsPane.add(centerPane, BorderLayout.CENTER); - + return hintsPane; } - + public ActionListener getListener(){ ActionListener actionListener = new ActionListener() { - + @Override public void actionPerformed(ActionEvent e) { String temp= nextColString; @@ -136,10 +136,10 @@ public class WriteShortCutsPane extends JPanel{ }); } }; - + return actionListener; } - + private void switchColRow(){ nextColHK.setText(nextColString); nextRowHK.setText(nextRowString); From 376dfaee4279aa7ec41dd920f18a9dd60b5d43fa Mon Sep 17 00:00:00 2001 From: renekton Date: Mon, 26 Aug 2024 18:56:31 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E4=B8=BB=E9=A2=98=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E5=9B=BE=E6=A0=87=E5=91=BD=E5=90=8D=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/mainframe/theme/TemplateThemeBlock.java | 2 +- .../com/fine/theme/icon/{icon_edit.svg => theme_edit.svg} | 0 .../main/resources/com/fine/theme/light/ui/fine_light.icon.json | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) rename designer-base/src/main/resources/com/fine/theme/icon/{icon_edit.svg => theme_edit.svg} (100%) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeBlock.java b/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeBlock.java index 810c4ae362..27f09d9e0b 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeBlock.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeBlock.java @@ -51,7 +51,7 @@ public class TemplateThemeBlock extends JPanel { private final TemplateThemeProfilePane profilePane; private final Icon theme4currentTemplateMarkIcon = IOUtils.readIcon("/com/fr/design/form/images/theme4currentTemplate.png"); private final Icon theme4NewTemplateMarkIcon= IOUtils.readIcon("/com/fr/design/form/images/theme4newTemplate.png"); - private final Icon profileIcon = new LazyIcon("icon_edit"); + private final Icon profileIcon = new LazyIcon("theme_edit"); private final boolean displayTheme4NewTemplateMarker; private final ThumbnailPane thumbnailPane; diff --git a/designer-base/src/main/resources/com/fine/theme/icon/icon_edit.svg b/designer-base/src/main/resources/com/fine/theme/icon/theme_edit.svg similarity index 100% rename from designer-base/src/main/resources/com/fine/theme/icon/icon_edit.svg rename to designer-base/src/main/resources/com/fine/theme/icon/theme_edit.svg 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 7a93ba1121..1c63b2b363 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 @@ -443,7 +443,7 @@ "layout_left": "layout/layout_left.svg", "layout_right": "layout/layout_right.svg", "layout_top_right": "layout/layout_top_right.svg", - "icon_edit": "icon_edit.svg" + "theme_edit": "theme_edit.svg" } }