From f864b38aea58bd3bc91fad33d0ea7f6aa9365daf Mon Sep 17 00:00:00 2001 From: renekton Date: Wed, 31 Jul 2024 09:44:43 +0800 Subject: [PATCH 1/8] =?UTF-8?q?=E6=8E=A7=E4=BB=B6=E7=AE=A1=E7=90=86/?= =?UTF-8?q?=E6=8A=A5=E8=A1=A8=E5=A1=AB=E6=8A=A5=E5=B1=9E=E6=80=A7/?= =?UTF-8?q?=E8=B6=85=E7=BA=A7=E9=93=BE=E6=8E=A5/=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E5=99=A8=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/actions/UpdateAction.java | 13 +++-- .../fr/design/data/datapane/ChoosePane.java | 6 +-- .../design/formula/FunctionManagerPane.java | 2 +- .../design/gui/columnrow/ColumnRowPane.java | 2 - .../gui/columnrow/ColumnRowVerticalPane.java | 6 +-- .../hyperlink/ReportletHyperlinkPane.java | 6 +-- .../fr/design/hyperlink/WebHyperlinkPane.java | 4 +- .../hyperlink/popup/ContentSettingPane.java | 6 +-- .../hyperlink/popup/CustomFontPane.java | 21 +++++---- .../popup/MobilePopupRegularPane.java | 3 -- .../hyperlink/popup/MobilePopupUIUtils.java | 1 - .../fr/design/javascript/JSContentPane.java | 3 +- .../design/javascript/JavaScriptImplPane.java | 12 ++--- .../design/parameter/ParameterArrayPane.java | 2 +- .../fr/design/parameter/ParameterPane.java | 4 +- .../com/fr/design/web/CustomIconPane.java | 35 +++++++++----- .../fr/design/write/submit/CustomJobPane.java | 10 ++-- .../write/submit/DBManipulationPane.java | 24 +++++----- .../com/fine/theme/icon/font/bold.svg | 4 +- .../com/fine/theme/icon/font/italic.svg | 4 +- .../com/fine/theme/icon/font/underline.svg | 4 +- .../fine/theme/icon/param/advanced_editor.svg | 4 ++ .../fine/theme/icon/widget/user_widget.svg | 10 ++++ .../fine/theme/light/ui/fine_light.icon.json | 4 +- .../fr/design/images/server/global_param.svg | 7 +++ .../impl/ChartHyperRelateCellLinkPane.java | 12 ++--- .../impl/ChartHyperRelateFloatLinkPane.java | 47 +++++++++---------- .../fr/design/report/ReportEnginePane.java | 2 +- .../fr/design/report/WriteShortCutsPane.java | 25 +++++----- .../fr/design/widget/WidgetConfigPane.java | 3 +- .../write/submit/SubmitVisitorListPane.java | 13 ++--- 31 files changed, 155 insertions(+), 144 deletions(-) create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/param/advanced_editor.svg create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/widget/user_widget.svg create mode 100644 designer-base/src/main/resources/com/fr/design/images/server/global_param.svg diff --git a/designer-base/src/main/java/com/fr/design/actions/UpdateAction.java b/designer-base/src/main/java/com/fr/design/actions/UpdateAction.java index 061eb884f7..682403f461 100644 --- a/designer-base/src/main/java/com/fr/design/actions/UpdateAction.java +++ b/designer-base/src/main/java/com/fr/design/actions/UpdateAction.java @@ -10,6 +10,7 @@ import com.fr.base.Style; import com.fr.base.svg.SVGIcon; import com.fr.base.svg.IconUtils; import com.fr.design.actions.core.ActionFactory; +import com.fr.design.constants.UIConstants; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.imenu.UICheckBoxMenuItem; import com.fr.design.gui.imenu.UIMenuEastAttrItem; @@ -116,11 +117,13 @@ public abstract class UpdateAction extends ShortCut implements Action { this.enabled = newValue; //循环遍历所有的Enable属性. - Iterator valueIt = this.componentMap.values().iterator(); - while (valueIt.hasNext()) { - Object valueObject = valueIt.next(); - if (valueObject instanceof JComponent) { - ((JComponent) valueObject).setEnabled(this.enabled); + if (this.componentMap != null) { + Iterator valueIt = this.componentMap.values().iterator(); + while (valueIt.hasNext()) { + Object valueObject = valueIt.next(); + if (valueObject instanceof JComponent) { + ((JComponent) valueObject).setEnabled(this.enabled); + } } } } diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/ChoosePane.java b/designer-base/src/main/java/com/fr/design/data/datapane/ChoosePane.java index 96ab6bd724..e0a3ca99e6 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/ChoosePane.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/ChoosePane.java @@ -222,9 +222,9 @@ public class ChoosePane extends BasicBeanPane implements Refresha } protected void initComponentsLayout(PreviewLabel previewLabel, int labelSize) { - UILabel l1 = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Database") + ":"); - UILabel l2 = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Model") + ":"); - UILabel l3 = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Table") + ":"); + UILabel l1 = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Database")); + UILabel l2 = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Model")); + UILabel l3 = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Table")); if (labelSize > 0) { Dimension pSize = new Dimension(labelSize, 25); diff --git a/designer-base/src/main/java/com/fr/design/formula/FunctionManagerPane.java b/designer-base/src/main/java/com/fr/design/formula/FunctionManagerPane.java index de2535c929..9ce8a75a68 100644 --- a/designer-base/src/main/java/com/fr/design/formula/FunctionManagerPane.java +++ b/designer-base/src/main/java/com/fr/design/formula/FunctionManagerPane.java @@ -101,7 +101,7 @@ public class FunctionManagerPane extends BasicPane { @Override public NameableCreator[] createNameableCreators() { NameableCreator funcDef = new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Function"), - IconUtils.readIcon("com/fr/design/images/server/global_param.png"), + IconUtils.readIcon("com/fr/design/images/server/global_param.svg"), FunctionDef.class, FunctionContentPane.class); return new NameableCreator[]{funcDef}; diff --git a/designer-base/src/main/java/com/fr/design/gui/columnrow/ColumnRowPane.java b/designer-base/src/main/java/com/fr/design/gui/columnrow/ColumnRowPane.java index 4f76c2e69f..f48aa3d252 100644 --- a/designer-base/src/main/java/com/fr/design/gui/columnrow/ColumnRowPane.java +++ b/designer-base/src/main/java/com/fr/design/gui/columnrow/ColumnRowPane.java @@ -133,7 +133,6 @@ public class ColumnRowPane extends JPanel implements UIObserver { } }; - rowSpinner.setPreferredSize(new Dimension(60, 24)); JFormattedTextField rftf = GUICoreUtils.getSpinnerTextField(rowSpinner); if (rftf != null) { rftf.setColumns(4); // specify more width than we need @@ -148,7 +147,6 @@ public class ColumnRowPane extends JPanel implements UIObserver { return false; } }; - columnSpinner.setPreferredSize(new Dimension(60, 24)); JFormattedTextField cftf = GUICoreUtils.getSpinnerTextField(columnSpinner); if (cftf != null) { cftf.setColumns(3); // specify more width than we need diff --git a/designer-base/src/main/java/com/fr/design/gui/columnrow/ColumnRowVerticalPane.java b/designer-base/src/main/java/com/fr/design/gui/columnrow/ColumnRowVerticalPane.java index 035b056fa3..4e19650e73 100644 --- a/designer-base/src/main/java/com/fr/design/gui/columnrow/ColumnRowVerticalPane.java +++ b/designer-base/src/main/java/com/fr/design/gui/columnrow/ColumnRowVerticalPane.java @@ -24,7 +24,7 @@ public class ColumnRowVerticalPane extends ColumnRowPane { public ColumnRowVerticalPane( ) { this.setLayout(FRGUIPaneFactory.createBorderLayout()); - JPanel pane = FRGUIPaneFactory.createYBoxEmptyBorderPane(); + JPanel pane = new JPanel(FRGUIPaneFactory.createBorderLayout()); this.add(pane, BorderLayout.NORTH); UILabel colLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Column")); @@ -35,8 +35,8 @@ public class ColumnRowVerticalPane extends ColumnRowPane { initRowSpinner(); pane.add(column(10, - row(flex(0.005), cell(rowLabel).weight(0.195), cell(rowSpinner).weight(0.8)), - row(flex(0.005), cell(colLabel).weight(0.195), cell(columnSpinner).weight(0.8)) + row(cell(rowLabel).weight(0.15), cell(rowSpinner).weight(0.85)), + row(cell(colLabel).weight(0.15), cell(columnSpinner).weight(0.85)) ).getComponent()); this.addDocumentListener(d); diff --git a/designer-base/src/main/java/com/fr/design/hyperlink/ReportletHyperlinkPane.java b/designer-base/src/main/java/com/fr/design/hyperlink/ReportletHyperlinkPane.java index d7d9817b55..dabf9e44a2 100644 --- a/designer-base/src/main/java/com/fr/design/hyperlink/ReportletHyperlinkPane.java +++ b/designer-base/src/main/java/com/fr/design/hyperlink/ReportletHyperlinkPane.java @@ -1,5 +1,6 @@ package com.fr.design.hyperlink; +import com.fine.theme.utils.FineUIUtils; import com.fr.base.BaseUtils; import com.fr.base.Parameter; import com.fr.design.dialog.FineJOptionPane; @@ -62,12 +63,9 @@ public class ReportletHyperlinkPane extends AbstractHyperLinkPane { extendPane.add(extendParametersCheckBox); parameterViewPane = new ReportletParameterViewPane(getChartParaType(), getValueEditorPane(), getValueEditorPane(), extendPane); - parameterViewPane.setBorder(GUICoreUtils.createTitledBorder(Toolkit.i18nText("Fine-Design_Basic_Parameters"), null)); this.add(column( cell(northPane), - cell(parameterViewPane).weight(1.0) + cell(FineUIUtils.wrapComponentWithTitle(parameterViewPane, Toolkit.i18nText("Fine-Design_Basic_Parameters"))).weight(1.0) ).getComponent()); } diff --git a/designer-base/src/main/java/com/fr/design/hyperlink/popup/ContentSettingPane.java b/designer-base/src/main/java/com/fr/design/hyperlink/popup/ContentSettingPane.java index 07be5714a4..1bac98dbc5 100644 --- a/designer-base/src/main/java/com/fr/design/hyperlink/popup/ContentSettingPane.java +++ b/designer-base/src/main/java/com/fr/design/hyperlink/popup/ContentSettingPane.java @@ -163,7 +163,7 @@ public class ContentSettingPane extends AbstractHyperLinkPane { importedJsPane = createImportedJsPane(); jsPane = createJSContentPane(defaultArgs); - jsPane.setBorder(BorderFactory.createTitledBorder(new ModLineBorder(ModLineBorder.TOP), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_JavaScript"))); JPanel topPane = new JPanel(new BorderLayout()); topPane.add(row(10, - cell(importedJsPane).weight(0.5), - cell(parameterPane).weight(0.5) + cell(FineUIUtils.wrapComponentWithTitle(importedJsPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_ReportServerP_Import_JavaScript"))).weight(0.5), + cell(FineUIUtils.wrapComponentWithTitle(parameterPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Parameter"))).weight(0.5) ).getComponent()); - topPane.setBorder(BorderFactory.createEmptyBorder(0, 0, BOTTOM_BORDER, 0)); - this.setLayout(new BorderLayout()); this.add(column(10, cell(topPane).weight(0.5), - cell(jsPane).weight(0.5) + cell(FineUIUtils.wrapComponentWithTitle(jsPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_JavaScript"))).weight(0.5) ).getComponent()); this.reLayoutForChart(); @@ -111,7 +109,6 @@ public class JavaScriptImplPane extends AbstractHyperLinkPane { protected ReportletParameterViewPane createParameterViewPane(){ ReportletParameterViewPane parameterPane = new ReportletParameterViewPane(getChartParaType(), getValueEditorPane(), getValueEditorPane()); - parameterPane.setBorder(BorderFactory.createTitledBorder(new ModLineBorder(ModLineBorder.TOP), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Parameter"))); parameterPane.addTableEditorListener(new TableModelListener() { public void tableChanged(TableModelEvent e) { List list = parameterPane.update(); @@ -147,7 +144,6 @@ public class JavaScriptImplPane extends AbstractHyperLinkPane { } }; UITableEditorPane importedJsPane = new UITableEditorPane(model); - importedJsPane.setBorder(BorderFactory.createTitledBorder(new ModLineBorder(ModLineBorder.TOP), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_ReportServerP_Import_JavaScript"))); return importedJsPane; } diff --git a/designer-base/src/main/java/com/fr/design/parameter/ParameterArrayPane.java b/designer-base/src/main/java/com/fr/design/parameter/ParameterArrayPane.java index a1e73dcfa8..627189e5e1 100644 --- a/designer-base/src/main/java/com/fr/design/parameter/ParameterArrayPane.java +++ b/designer-base/src/main/java/com/fr/design/parameter/ParameterArrayPane.java @@ -59,7 +59,7 @@ public class ParameterArrayPane extends JListControlPane { public NameableCreator[] createNameableCreators() { return new NameableCreator[]{ new NameableSelfCreator(Toolkit.i18nText("Fine-Design_Basic_Engine_Parameter_Name"), - "com/fr/design/images/server/global_param.png", + "com/fr/design/images/server/global_param.svg", Parameter.class, ParameterPane.class) { public Parameter createNameable(UnrepeatedNameHelper helper) { diff --git a/designer-base/src/main/java/com/fr/design/parameter/ParameterPane.java b/designer-base/src/main/java/com/fr/design/parameter/ParameterPane.java index 340f9a5232..7d1f65a789 100644 --- a/designer-base/src/main/java/com/fr/design/parameter/ParameterPane.java +++ b/designer-base/src/main/java/com/fr/design/parameter/ParameterPane.java @@ -46,11 +46,11 @@ public class ParameterPane extends BasicBeanPane { // richer:要排列显示的控件 JPanel centerPane = column(LayoutConstants.VERTICAL_GAP, row(20, - cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Name") + ":")).weight(0.1), + cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Name"))).weight(0.1), cell(nameTextField).weight(0.8), flex(0.1)), row(20, - cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Utils_Default_Value") + ":")).weight(0.1), + cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Utils_Default_Value"))).weight(0.1), cell(valueEditor).weight(0.8), flex(0.1)) ).getComponent(); diff --git a/designer-base/src/main/java/com/fr/design/web/CustomIconPane.java b/designer-base/src/main/java/com/fr/design/web/CustomIconPane.java index 564b09d467..600a182732 100644 --- a/designer-base/src/main/java/com/fr/design/web/CustomIconPane.java +++ b/designer-base/src/main/java/com/fr/design/web/CustomIconPane.java @@ -1,9 +1,11 @@ package com.fr.design.web; +import com.fine.theme.light.ui.FineRoundBorder; import com.fr.base.BaseUtils; import com.fr.base.GraphHelper; import com.fr.base.Icon; import com.fr.base.IconManager; +import com.fr.design.border.FineBorderFactory; import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.DialogActionAdapter; import com.fr.design.dialog.FineJOptionPane; @@ -41,6 +43,7 @@ import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Image; import java.awt.Window; +import javax.swing.BorderFactory; import javax.swing.ButtonGroup; import javax.swing.ImageIcon; import javax.swing.JComponent; @@ -60,6 +63,10 @@ import java.awt.event.FocusListener; import java.awt.geom.Rectangle2D; import java.awt.image.BufferedImage; +import static com.fine.swing.ui.layout.Layouts.column; +import static com.fine.swing.ui.layout.Layouts.cell; +import static com.fine.swing.ui.layout.Layouts.row; + /** * carl:自定义Icon编辑 */ @@ -86,11 +93,11 @@ public class CustomIconPane extends BasicPane { private void initComponents() { this.setLayout(FRGUIPaneFactory.createBorderLayout()); + UILabel iconLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Icon")); JPanel centerPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); - centerPane.setBorder(GUICoreUtils.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Icon"))); - JPanel noNamePane = FRGUIPaneFactory.createCenterFlowInnerContainer_S_Pane(); - centerPane.add(noNamePane, BorderLayout.CENTER); - + JPanel noNamePane = FRGUIPaneFactory.createBorderLayout_S_Pane(); + noNamePane.setBorder(new FineRoundBorder()); + noNamePane.setBackground(Color.WHITE); iconPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); // 开始加图标选择按钮 @@ -100,14 +107,14 @@ public class CustomIconPane extends BasicPane { refreshIconPane(false); jsPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); - jsPane.setPreferredSize(new Dimension(200, 180)); noNamePane.add(jsPane); - DescriptionTextArea des = new DescriptionTextArea(2); - des.setText(createDescriptionText()); - centerPane.add(des, BorderLayout.SOUTH); - - this.add(centerPane, BorderLayout.CENTER); + UILabel desLabel = new UILabel(createDescriptionText()); + desLabel.setForeground(Color.GRAY); + centerPane.add(column( + cell(noNamePane).weight(0.9), + cell(desLabel).weight(0.1) + ).getComponent()); JPanel eastPane = FRGUIPaneFactory.createCenterFlowInnerContainer_S_Pane(); JPanel buttonPane = FRGUIPaneFactory.createNColumnGridInnerContainer_S_Pane(1); @@ -118,8 +125,10 @@ public class CustomIconPane extends BasicPane { initEditButton(buttonPane); eastPane.add(buttonPane); - this.add(eastPane, BorderLayout.EAST); - + this.add(column(10, + cell(iconLabel), + row(10, cell(centerPane).weight(0.9), cell(eastPane).weight(0.1)).weight(1.0) + ).getComponent()); } @@ -369,7 +378,7 @@ public class CustomIconPane extends BasicPane { g2d.drawImage(iconImage, ICON_X, ICON_Y, IconManager.DEFAULT_ICONWIDTH, IconManager.DEFAULT_ICONHEIGHT, null); } if (this.iconName != null && ComparatorUtils.equals(this.iconName, selectedIconName)) { - g2d.setPaint(Color.RED); + g2d.setPaint(Color.BLUE); } else { g2d.setPaint(Color.LIGHT_GRAY); } diff --git a/designer-base/src/main/java/com/fr/design/write/submit/CustomJobPane.java b/designer-base/src/main/java/com/fr/design/write/submit/CustomJobPane.java index 5b0cd2c3b6..5de6d0a9b7 100644 --- a/designer-base/src/main/java/com/fr/design/write/submit/CustomJobPane.java +++ b/designer-base/src/main/java/com/fr/design/write/submit/CustomJobPane.java @@ -1,6 +1,7 @@ package com.fr.design.write.submit; import com.fine.theme.utils.FineUIScale; +import com.fine.theme.utils.FineUIUtils; import com.fr.base.GraphHelper; import com.fr.data.AbstractClassJob; import com.fr.design.data.tabledata.tabledatapane.ClassNameSelectPane; @@ -91,7 +92,6 @@ public abstract class CustomJobPane extends BasicBeanPane { } }); - reportletNamePane.setBorder(GUICoreUtils.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Class_Name"), null)); reportletNamePane.setLayout(new BorderLayout()); reportletNamePane.add(row(10, cell(classNameTextField).weight(0.8), @@ -100,14 +100,12 @@ public abstract class CustomJobPane extends BasicBeanPane { ).getComponent()); objectProperiesPane = new ObjectProperiesPane(); - objectProperiesPane.setBorder(GUICoreUtils.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Property"), null)); JPanel dsPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); dsPane.add(area); - dsPane.setBorder(GUICoreUtils.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Custom_Job_Description"), null)); this.add(column( - cell(reportletNamePane), - cell(objectProperiesPane).weight(1.0), - cell(dsPane) + cell(FineUIUtils.wrapComponentWithTitle(reportletNamePane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Class_Name"))), + cell(FineUIUtils.wrapComponentWithTitle(objectProperiesPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Property"))).weight(1.0), + cell(FineUIUtils.wrapComponentWithTitle(dsPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Custom_Job_Description"))) ).getComponent()); checkAddButtonEnable(); } 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 6dfa381e81..0629c729e3 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 @@ -2,6 +2,7 @@ package com.fr.design.write.submit; import com.fine.swing.ui.layout.Layouts; import com.fine.theme.utils.FineUIScale; +import com.fine.theme.utils.FineUIUtils; import com.fr.base.BaseFormula; import com.fr.base.BaseUtils; import com.fr.base.Parameter; @@ -156,16 +157,13 @@ public class DBManipulationPane extends BasicBeanPane { JPanel typePane = new JPanel(new BorderLayout()); typePane.add(row(10, - cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Write_Choose_Submit_Type") + ":")), + cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Write_Choose_Submit_Type"))), cell(dmlConfigComboBox)).getComponent()); - typePane.setBorder(BorderFactory.createTitledBorder(new ModLineBorder(ModLineBorder.TOP), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Write_Submit_Type"))); chooseTable = new ChoosePaneSupportFormula(); - chooseTable.setBorder(BorderFactory.createTitledBorder(new ModLineBorder(ModLineBorder.TOP), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Base_Table"))); chooseTable.setTableNameComboBoxPopSize(160, 320); // peter:编辑的TablePane JPanel editTablePane = FRGUIPaneFactory.createBorderLayout_S_Pane(); - editTablePane.setBorder(BorderFactory.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Base_Value"))); editTablePane.setBounds(0, 0, FineUIScale.scale(280), FineUIScale.scale(180)); keyColumnValuesTable = new KeyColumnNameValueTable(); editTablePane.add(new UIScrollPane(this.keyColumnValuesTable), BorderLayout.CENTER); @@ -177,13 +175,13 @@ public class DBManipulationPane extends BasicBeanPane { keyColumnValuesTable.getTableHeader().setDefaultRenderer(headerRenderer); northPane.add(column(10, true, - cell(typePane), - cell(chooseTable)) + cell(FineUIUtils.wrapComponentWithTitle(typePane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Write_Submit_Type"))), + cell(FineUIUtils.wrapComponentWithTitle(chooseTable, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Base_Table")))) .getComponent()); this.add(column(10, true, cell(northPane), - cell(editTablePane)) + cell(FineUIUtils.wrapComponentWithTitle(editTablePane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Base_Value")))) .getComponent()); initJTableColumn(); @@ -266,8 +264,10 @@ public class DBManipulationPane extends BasicBeanPane { JPanel conditionPane = this.createConditionPane(); JPanel btPane = new JPanel(FRGUIPaneFactory.createBorderLayout()); - btPane.add(eventPane, BorderLayout.CENTER); - btPane.add(conditionPane, BorderLayout.NORTH); + btPane.add(column( + cell(FineUIUtils.wrapComponentWithTitle(conditionPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Submit_Condition"))), + cell(eventPane) + ).getComponent()); this.add(btPane, BorderLayout.SOUTH); } @@ -341,8 +341,8 @@ public class DBManipulationPane extends BasicBeanPane { controlBtnPane.setPreferredSize(createControlBtnPanePreferredSize()); controlBtnPane.add(addSubmitConditionButton); conditionPane.add(row( - cell(jp).weight(0.74), - column(cell(controlBtnPane).weight(0.5),cell(new UILabel()).weight(0.5)).weight(0.26) + cell(jp).weight(0.76), + column(cell(controlBtnPane).weight(0.4),cell(new UILabel()).weight(0.6)).weight(0.24) ).getComponent()); return conditionPane; @@ -350,8 +350,6 @@ public class DBManipulationPane extends BasicBeanPane { protected void setBorderAndLayout(JPanel jPanel) { jPanel.setLayout(FRGUIPaneFactory.createBorderLayout()); - jPanel.setBorder(BorderFactory.createTitledBorder( - new ModLineBorder(ModLineBorder.TOP), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Submit_Condition"))); } protected void addComponent(JPanel mainPane, JScrollPane addPane) { diff --git a/designer-base/src/main/resources/com/fine/theme/icon/font/bold.svg b/designer-base/src/main/resources/com/fine/theme/icon/font/bold.svg index f95596d86c..4aa1b6c071 100644 --- a/designer-base/src/main/resources/com/fine/theme/icon/font/bold.svg +++ b/designer-base/src/main/resources/com/fine/theme/icon/font/bold.svg @@ -1,5 +1,3 @@ - + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/font/italic.svg b/designer-base/src/main/resources/com/fine/theme/icon/font/italic.svg index 5bdf5f2159..3d53d5ffe8 100755 --- a/designer-base/src/main/resources/com/fine/theme/icon/font/italic.svg +++ b/designer-base/src/main/resources/com/fine/theme/icon/font/italic.svg @@ -1,5 +1,3 @@ - + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/font/underline.svg b/designer-base/src/main/resources/com/fine/theme/icon/font/underline.svg index d792b37af9..326f2fa6e0 100755 --- a/designer-base/src/main/resources/com/fine/theme/icon/font/underline.svg +++ b/designer-base/src/main/resources/com/fine/theme/icon/font/underline.svg @@ -1,5 +1,3 @@ - + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/param/advanced_editor.svg b/designer-base/src/main/resources/com/fine/theme/icon/param/advanced_editor.svg new file mode 100644 index 0000000000..84c516886f --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/param/advanced_editor.svg @@ -0,0 +1,4 @@ + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/widget/user_widget.svg b/designer-base/src/main/resources/com/fine/theme/icon/widget/user_widget.svg new file mode 100644 index 0000000000..af4281adf2 --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/widget/user_widget.svg @@ -0,0 +1,10 @@ + + + + + + + + + + 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 4184e561b6..7c2dc2fbf8 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 @@ -297,6 +297,8 @@ "tab": "widget/tab.svg", "text_area": "widget/text_area.svg", "text_field": "widget/text_field.svg", - "widget_tree": "widget/tree.svg" + "widget_tree": "widget/tree.svg", + "user_widget": "widget/user_widget.svg", + "advanced_editor": "param/advanced_editor.svg" } } diff --git a/designer-base/src/main/resources/com/fr/design/images/server/global_param.svg b/designer-base/src/main/resources/com/fr/design/images/server/global_param.svg new file mode 100644 index 0000000000..4b0ee94ec5 --- /dev/null +++ b/designer-base/src/main/resources/com/fr/design/images/server/global_param.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperRelateCellLinkPane.java b/designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperRelateCellLinkPane.java index c1e3f1e65f..b9dc9408d5 100644 --- a/designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperRelateCellLinkPane.java +++ b/designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperRelateCellLinkPane.java @@ -1,5 +1,7 @@ package com.fr.design.chart.series.SeriesCondition.impl; +import com.fine.theme.utils.FineUIScale; +import com.fine.theme.utils.FineUIUtils; import com.fr.base.Utils; import com.fr.chart.web.ChartHyperRelateCellLink; import com.fr.design.gui.columnrow.ColumnRowVerticalPane; @@ -42,7 +44,7 @@ public class ChartHyperRelateCellLinkPane extends AbstractHyperLinkPane { double p = TableLayout.PREFERRED; double rowSize[] = {p, p}; double columnSize[] = {p, p}; - Component[][] components = {{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_LayerPageReport_Count_PerPage") + ":"), countPerPageEditor}}; + Component[][] components = {{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_LayerPageReport_Count_PerPage")), countPerPageEditor}}; JPanel pageQueryPane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); pageQueryPane.setBorder(BorderFactory.createEmptyBorder(5, 15, 0, 0)); return pageQueryPane; 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 4c7c03d2c5..827d784db3 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 @@ -1,6 +1,7 @@ package com.fr.design.report; +import com.fine.theme.utils.FineUIUtils; import com.fr.base.BaseUtils; import com.fr.config.ServerPreferenceConfig; import com.fr.design.gui.ibutton.UIButton; @@ -24,6 +25,9 @@ import java.awt.Insets; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; +import static com.fine.swing.ui.layout.Layouts.column; +import static com.fine.swing.ui.layout.Layouts.cell; + public class WriteShortCutsPane extends JPanel{ private static final int V_GAP = 20; private static final int MAX_LABEL_WIDTH = 100; @@ -47,25 +51,19 @@ public class WriteShortCutsPane extends JPanel{ } private JPanel createContentPane() { - JPanel contentPane = new JPanel(); + JPanel contentPane = new JPanel(new BorderLayout()); contentPane.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 10)); - // 纵向布局,横向自适应 - contentPane.setLayout(new GridBagLayout()); - GridBagConstraints cons = new GridBagConstraints(); - cons.fill = GridBagConstraints.HORIZONTAL; - cons.weightx = 1; - cons.gridx = 0; - cons.insets = new Insets(20, 0, 0, 0); - contentPane.add(getFeatureNamePane(), cons); - contentPane.add(getHintsPane(), cons); + contentPane.add(column( + cell(FineUIUtils.wrapComponentWithTitle(getFeatureNamePane(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Shortcut_Set"))), + cell(FineUIUtils.wrapComponentWithTitle(getHintsPane(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tool_Tips"))) + ).getComponent()); return contentPane; } private JPanel getFeatureNamePane(){ - JPanel featureNamePane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Shortcut_Set")); - featureNamePane.setLayout(new BorderLayout()); + JPanel featureNamePane = new JPanel(new BorderLayout()); UILabel name = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Feature_Name"), SwingConstants.CENTER); UILabel nextCol = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Cursor_To_Next_Column"), SwingConstants.CENTER); @@ -106,8 +104,7 @@ public class WriteShortCutsPane extends JPanel{ } private JPanel getHintsPane(){ - JPanel hintsPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tool_Tips")); - hintsPane.setLayout(new BorderLayout()); + JPanel hintsPane = new JPanel(new BorderLayout()); UILabel systemDefault = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_System_Default"), SwingConstants.CENTER); UILabel preColText = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Cursor_To_Previous_Column"), SwingConstants.CENTER); diff --git a/designer-realize/src/main/java/com/fr/design/widget/WidgetConfigPane.java b/designer-realize/src/main/java/com/fr/design/widget/WidgetConfigPane.java index 7d8f744e53..456e01be73 100644 --- a/designer-realize/src/main/java/com/fr/design/widget/WidgetConfigPane.java +++ b/designer-realize/src/main/java/com/fr/design/widget/WidgetConfigPane.java @@ -1,5 +1,6 @@ package com.fr.design.widget; +import com.fine.theme.icon.LazyIcon; import com.fr.design.gui.controlpane.JListControlPane; import com.fr.design.gui.controlpane.NameObjectCreator; import com.fr.design.gui.controlpane.NameableCreator; @@ -42,7 +43,7 @@ public class WidgetConfigPane extends JListControlPane { */ public NameableCreator[] createNameableCreators() { NameableCreator defaultWidget = new NameObjectCreator(WidgetConstants.USER_DEFINED_WIDGETCONFIG, - "/com/fr/design/images/data/user_widget.svg", UserDefinedWidgetConfig.class, + new LazyIcon("user_widget"), UserDefinedWidgetConfig.class, UserDefinedWidgetConfigPane.class); return new NameableCreator[] { defaultWidget }; } diff --git a/designer-realize/src/main/java/com/fr/design/write/submit/SubmitVisitorListPane.java b/designer-realize/src/main/java/com/fr/design/write/submit/SubmitVisitorListPane.java index faf20088d5..ceb90d5d51 100644 --- a/designer-realize/src/main/java/com/fr/design/write/submit/SubmitVisitorListPane.java +++ b/designer-realize/src/main/java/com/fr/design/write/submit/SubmitVisitorListPane.java @@ -1,5 +1,6 @@ package com.fr.design.write.submit; +import com.fine.theme.utils.FineUIUtils; import com.fr.data.SubmitJob; import com.fr.design.ExtraDesignClassManager; import com.fr.design.beans.BasicBeanPane; @@ -191,19 +192,13 @@ public class SubmitVisitorListPane extends ObjectJControlPane { } csjConfigComboBox = new UIComboBox(configTypes.toArray()); - //JPanel typePane = GUICoreUtils.createFlowPane(new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Write_Choose_Submit_Type") + ":"), csjConfigComboBox}, - // FlowLayout.LEFT, 10); JPanel typePane = new JPanel(new BorderLayout()); typePane.add(row(10, - flex(0.002), - cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Write_Choose_Submit_Type") + ":")).weight(0.158), - cell(csjConfigComboBox).weight(0.84)).getComponent()); - typePane.setBorder(BorderFactory.createTitledBorder(new ModLineBorder(ModLineBorder.TOP), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Write_Submit_Type"))); - /*this.add(typePane, BorderLayout.NORTH); + cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Write_Choose_Submit_Type"))), + cell(csjConfigComboBox)).getComponent()); - this.add(customCardPane, BorderLayout.CENTER);*/ this.add(column( - cell(typePane), + cell(FineUIUtils.wrapComponentWithTitle(typePane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Write_Submit_Type"))), cell(customCardPane).weight(1.0)).getComponent()); csjConfigComboBox.addItemListener(new ItemListener() { From 1fb3b9084acbfa9668ae7819d450b94bd1c0e005 Mon Sep 17 00:00:00 2001 From: renekton Date: Wed, 31 Jul 2024 15:08:20 +0800 Subject: [PATCH 2/8] =?UTF-8?q?=E6=8E=A7=E4=BB=B6=E7=AE=A1=E7=90=86/?= =?UTF-8?q?=E6=8A=A5=E8=A1=A8=E5=A1=AB=E6=8A=A5=E5=B1=9E=E6=80=A7/?= =?UTF-8?q?=E8=B6=85=E7=BA=A7=E9=93=BE=E6=8E=A5/=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E5=99=A8=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fine/theme/utils/FineUIUtils.java | 2 +- .../design/formula/FunctionManagerPane.java | 3 +- .../gui/controlpane/NameableSelfCreator.java | 6 + .../gui/frpane/ObjectProperiesPane.java | 20 +- .../hyperlink/ReportletHyperNorthPane.java | 1 - .../design/parameter/ParameterArrayPane.java | 3 +- .../fr/design/write/submit/CustomJobPane.java | 21 +- .../com/fine/theme/icon/function_manage.svg | 7 + .../fine/theme/light/ui/fine_light.icon.json | 3 +- .../fr/design/report/WriteShortCutsPane.java | 52 +++-- .../fr/design/widget/CellWidgetCardPane.java | 65 ++++--- .../com/fr/design/widget/ValueWidgetPane.java | 33 ++-- .../java/com/fr/design/widget/WidgetPane.java | 60 +++--- .../ui/BasicWidgetPropertySettingPane.java | 40 ++-- .../widget/ui/DateEditorDefinePane.java | 182 ++++++++++-------- 15 files changed, 269 insertions(+), 229 deletions(-) create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/function_manage.svg diff --git a/designer-base/src/main/java/com/fine/theme/utils/FineUIUtils.java b/designer-base/src/main/java/com/fine/theme/utils/FineUIUtils.java index b541811f8f..1ca238934e 100644 --- a/designer-base/src/main/java/com/fine/theme/utils/FineUIUtils.java +++ b/designer-base/src/main/java/com/fine/theme/utils/FineUIUtils.java @@ -395,7 +395,7 @@ public class FineUIUtils { UILabel label = new UILabel(title); wrapBoldLabelWithUnderline(label); return column(LayoutConstants.VERTICAL_GAP, - cell(label), cell(component) + cell(label), cell(component).weight(1.0) ).getComponent(); } diff --git a/designer-base/src/main/java/com/fr/design/formula/FunctionManagerPane.java b/designer-base/src/main/java/com/fr/design/formula/FunctionManagerPane.java index 9ce8a75a68..559539d940 100644 --- a/designer-base/src/main/java/com/fr/design/formula/FunctionManagerPane.java +++ b/designer-base/src/main/java/com/fr/design/formula/FunctionManagerPane.java @@ -1,5 +1,6 @@ package com.fr.design.formula; +import com.fine.theme.icon.LazyIcon; import com.fr.base.svg.IconUtils; import com.fr.design.beans.BasicBeanPane; import com.fr.design.data.tabledata.tabledatapane.ClassNameSelectPane; @@ -101,7 +102,7 @@ public class FunctionManagerPane extends BasicPane { @Override public NameableCreator[] createNameableCreators() { NameableCreator funcDef = new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Function"), - IconUtils.readIcon("com/fr/design/images/server/global_param.svg"), + new LazyIcon("function_manage"), FunctionDef.class, FunctionContentPane.class); return new NameableCreator[]{funcDef}; diff --git a/designer-base/src/main/java/com/fr/design/gui/controlpane/NameableSelfCreator.java b/designer-base/src/main/java/com/fr/design/gui/controlpane/NameableSelfCreator.java index 4b06b74ca4..ccd7ecb45f 100644 --- a/designer-base/src/main/java/com/fr/design/gui/controlpane/NameableSelfCreator.java +++ b/designer-base/src/main/java/com/fr/design/gui/controlpane/NameableSelfCreator.java @@ -4,6 +4,8 @@ import com.fr.design.beans.BasicBeanPane; import com.fr.design.gui.ilist.ListModelElement; import com.fr.stable.Nameable; +import javax.swing.Icon; + public abstract class NameableSelfCreator extends AbstractNameableCreator { @@ -15,6 +17,10 @@ public abstract class NameableSelfCreator extends AbstractNameableCreator { super(menuName, iconPath, clazz, updatePane); } + public NameableSelfCreator(String menuName, Icon icon, Class clazz, Class updatePane) { + super(menuName, icon, clazz, updatePane); + } + @Override public void saveUpdatedBean(ListModelElement wrapper, Object bean) { wrapper.wrapper = (Nameable)bean; diff --git a/designer-base/src/main/java/com/fr/design/gui/frpane/ObjectProperiesPane.java b/designer-base/src/main/java/com/fr/design/gui/frpane/ObjectProperiesPane.java index de904f5a45..49aae6316e 100644 --- a/designer-base/src/main/java/com/fr/design/gui/frpane/ObjectProperiesPane.java +++ b/designer-base/src/main/java/com/fr/design/gui/frpane/ObjectProperiesPane.java @@ -1,5 +1,8 @@ package com.fr.design.gui.frpane; +import com.fine.theme.icon.LazyIcon; +import com.fine.theme.light.ui.FineRoundBorder; +import com.fine.theme.utils.FineUIScale; import com.fr.base.BaseUtils; import com.fr.design.beans.BasicBeanPane; import com.fr.design.editor.ValueEditorPane; @@ -19,6 +22,8 @@ import java.awt.event.ActionListener; import java.util.ArrayList; import java.util.Iterator; +import static com.fine.swing.ui.layout.Layouts.column; +import static com.fine.swing.ui.layout.Layouts.cell; public class ObjectProperiesPane extends BasicBeanPane { private UIButton addButton; @@ -27,11 +32,13 @@ public class ObjectProperiesPane extends BasicBeanPane { public ObjectProperiesPane() { this.setLayout(FRGUIPaneFactory.createBorderLayout()); - + this.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0)); JPanel buttonPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); - this.addButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Add") + " " +com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Property")); + this.addButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Add") + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Property"), + new LazyIcon("add")); buttonPane.add(this.addButton, BorderLayout.WEST); - this.add(buttonPane, BorderLayout.NORTH); + buttonPane.setPreferredSize(new Dimension(0, 24)); + //this.add(buttonPane, BorderLayout.NORTH); this.addButton.addActionListener(new ActionListener() { @Override @@ -52,8 +59,13 @@ public class ObjectProperiesPane extends BasicBeanPane { selectedItemScrollPane.setViewportView(northPane); selectedItemScrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); JPanel centerPane = new JPanel(new BorderLayout()); + centerPane.setBorder(new FineRoundBorder()); centerPane.add(selectedItemScrollPane); - this.add(centerPane, BorderLayout.CENTER); + //this.add(centerPane, BorderLayout.CENTER); + this.add(column(4, + cell(buttonPane).weight(92), + cell(centerPane).weight(465) + ).getComponent()); } @Override diff --git a/designer-base/src/main/java/com/fr/design/hyperlink/ReportletHyperNorthPane.java b/designer-base/src/main/java/com/fr/design/hyperlink/ReportletHyperNorthPane.java index 57db2f06f5..fd1d7355f7 100644 --- a/designer-base/src/main/java/com/fr/design/hyperlink/ReportletHyperNorthPane.java +++ b/designer-base/src/main/java/com/fr/design/hyperlink/ReportletHyperNorthPane.java @@ -291,7 +291,6 @@ public class ReportletHyperNorthPane extends AbstractHyperNorthPane + + + + + + 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 7c2dc2fbf8..6a1eef0853 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 @@ -299,6 +299,7 @@ "text_field": "widget/text_field.svg", "widget_tree": "widget/tree.svg", "user_widget": "widget/user_widget.svg", - "advanced_editor": "param/advanced_editor.svg" + "advanced_editor": "param/advanced_editor.svg", + "function_manage": "function_manage.svg" } } 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 827d784db3..b896fd4cbe 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 @@ -18,15 +18,13 @@ import javax.swing.SwingConstants; import java.awt.BorderLayout; import java.awt.Dimension; -import java.awt.GridBagConstraints; -import java.awt.GridBagLayout; -import java.awt.GridLayout; -import java.awt.Insets; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import static com.fine.swing.ui.layout.Layouts.column; import static com.fine.swing.ui.layout.Layouts.cell; +import static com.fine.swing.ui.layout.Layouts.row; +import static com.fine.swing.ui.layout.Layouts.flex; public class WriteShortCutsPane extends JPanel{ private static final int V_GAP = 20; @@ -54,7 +52,7 @@ public class WriteShortCutsPane extends JPanel{ JPanel contentPane = new JPanel(new BorderLayout()); contentPane.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 10)); - contentPane.add(column( + contentPane.add(column(20, cell(FineUIUtils.wrapComponentWithTitle(getFeatureNamePane(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Shortcut_Set"))), cell(FineUIUtils.wrapComponentWithTitle(getHintsPane(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tool_Tips"))) ).getComponent()); @@ -64,26 +62,22 @@ public class WriteShortCutsPane extends JPanel{ private JPanel getFeatureNamePane(){ JPanel featureNamePane = new JPanel(new BorderLayout()); - - UILabel name = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Feature_Name"), SwingConstants.CENTER); + featureNamePane.setBorder(BorderFactory.createEmptyBorder(16, 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); - UILabel shortName = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Current_Keys"), SwingConstants.CENTER); + UILabel shortName = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Current_Keys"), SwingConstants.RIGHT); UIComponentUtils.setLineWrap(shortName, MAX_LABEL_WIDTH); nextColHK = new UILabel(nextColString, SwingConstants.CENTER); JPanel switchBtnPane = getSwitchBtnPane(); nextRowHK = new UILabel(nextRowString, SwingConstants.CENTER); - JPanel centerPane = new JPanel(new GridLayout(2, 4, 0, 0)); - centerPane.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0)); - centerPane.add(name); - centerPane.add(nextCol); - centerPane.add(new JPanel()); - centerPane.add(nextRow); - centerPane.add(shortName); - centerPane.add(nextColHK); - centerPane.add(switchBtnPane); - centerPane.add(nextRowHK); + JPanel centerPane = new JPanel(new BorderLayout()); + centerPane.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 0)); + centerPane.add(column(24, + 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); @@ -105,23 +99,21 @@ public class WriteShortCutsPane extends JPanel{ private JPanel getHintsPane(){ JPanel hintsPane = new JPanel(new BorderLayout()); + hintsPane.setBorder(BorderFactory.createEmptyBorder(16, 0, 0, 0)); - UILabel systemDefault = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_System_Default"), SwingConstants.CENTER); + 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); UILabel preRowText = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Cursor_To_Previous_Row"), SwingConstants.CENTER); - preCol = new UILabel("Shift+" + nextColString, SwingConstants.CENTER); - preRow = new UILabel("Shift+" + nextRowString, SwingConstants.CENTER); + preCol = new UILabel("Shift+" + nextColString, SwingConstants.LEFT); + preRow = new UILabel("Shift+" + nextRowString, SwingConstants.LEFT); - JPanel centerPane = new JPanel(new GridLayout(2, 3, 0, V_GAP)); - centerPane.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 100)); + JPanel centerPane = new JPanel(new BorderLayout()); + centerPane.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 0)); - centerPane.add(systemDefault); - centerPane.add(preColText); - centerPane.add(preCol); - - centerPane.add(new JPanel()); - centerPane.add(preRowText); - centerPane.add(preRow); + centerPane.add(column(24, + 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); diff --git a/designer-realize/src/main/java/com/fr/design/widget/CellWidgetCardPane.java b/designer-realize/src/main/java/com/fr/design/widget/CellWidgetCardPane.java index d99058d205..6dfc1a51d4 100644 --- a/designer-realize/src/main/java/com/fr/design/widget/CellWidgetCardPane.java +++ b/designer-realize/src/main/java/com/fr/design/widget/CellWidgetCardPane.java @@ -1,15 +1,12 @@ package com.fr.design.widget; -import com.formdev.flatlaf.util.ScaledEmptyBorder; -import com.fr.design.border.FineBorderFactory; +import com.fr.design.constants.UIConstants; import com.fr.design.data.DataCreatorUI; import com.fr.design.dialog.AttrScrollPane; import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.BasicScrollPane; import com.fr.design.foldablepane.UIExpandablePane; -import com.fr.design.gui.frpane.FineTabbedPane; import com.fr.design.gui.ibutton.UIHeadGroup; -import com.fr.design.gui.icontainer.UIScrollPane; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.mainframe.ElementCasePane; import com.fr.design.widget.mobile.WidgetMobilePane; @@ -17,15 +14,12 @@ import com.fr.design.widget.ui.BasicWidgetPropertySettingPane; import com.fr.form.event.Listener; import com.fr.form.ui.Widget; +import javax.swing.BorderFactory; import javax.swing.JPanel; import java.awt.BorderLayout; import java.awt.CardLayout; import java.util.ArrayList; -import static com.fine.swing.ui.layout.Layouts.cell; -import static com.fine.swing.ui.layout.Layouts.column; -import static com.fine.swing.ui.layout.Layouts.fix; - /* * carl :单独弄出来 */ @@ -36,7 +30,9 @@ public class CellWidgetCardPane extends BasicPane { private WidgetMobilePane currentWidgetMobilePane; //属性配置切换面板 private ArrayList paneList; - private FineTabbedPane tabsPane; + private JPanel center; + private UIHeadGroup tabsHeaderIconPane; + private CardLayout tabbedPane; private BasicWidgetPropertySettingPane widgetPropertyPane; //通用属性容器 @@ -64,25 +60,29 @@ public class CellWidgetCardPane extends BasicPane { this.removeAll(); this.setLayout(FRGUIPaneFactory.createBorderLayout()); - - final String[] tabTitles = new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Attribute"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Event"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Widget_Mobile_Terminal")}; + tabbedPane = new CardLayout(); + center = new JPanel(tabbedPane); + this.add(center, BorderLayout.CENTER); // 属性 attriTabPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); + BasicScrollPane basicScrollPane = new AttrScrollPane() { + @Override + protected JPanel createContentPane() { + return attriTabPane; + } + }; widgetPropertyPane = new BasicWidgetPropertySettingPane(); - UIExpandablePane basicPane = new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Basic"), 280, 24, widgetPropertyPane); + UIExpandablePane uiExpandablePane = new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Basic"), 280, 24, widgetPropertyPane); + attriTabPane.setBorder(BorderFactory.createEmptyBorder(10, 10, 0, 10)); + attriTabPane.add(uiExpandablePane, BorderLayout.NORTH); attriCardPane = FRGUIPaneFactory.createCardLayout_S_Pane(); + attriTabPane.add(attriCardPane, BorderLayout.CENTER); attriCardLayout = (CardLayout) attriCardPane.getLayout(); - attriTabPane.add(column( - cell(basicPane), - fix(1).with(it -> it.setBorder(FineBorderFactory.createDefaultUnderlineBorder())), - cell(attriCardPane) - ).getComponent() - ); - // 事件 eventTabPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); + eventTabPane.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 10)); eventPane = initWidgetEventPane(pane); eventTabPane.add(eventPane, BorderLayout.CENTER); @@ -91,25 +91,28 @@ public class CellWidgetCardPane extends BasicPane { mobileCardPane = FRGUIPaneFactory.createCardLayout_S_Pane(); mobileTabPane.add(mobileCardPane, BorderLayout.CENTER); mobileCardLayout = (CardLayout) mobileCardPane.getLayout(); - tabsPane = FineTabbedPane.builder() - .addTab(tabTitles[0], new UIScrollPane(attriTabPane)) - .addTab(tabTitles[1], eventTabPane) - .addTab(tabTitles[2], mobileTabPane) - .build(); - JPanel wrapperPane = new JPanel(new BorderLayout()); - wrapperPane.add(tabsPane, BorderLayout.CENTER); - wrapperPane.setBorder(new ScaledEmptyBorder(0, 10, 0, 10)); - wrapperPane.setOpaque(false); - this.add(wrapperPane, BorderLayout.CENTER); + center.add(basicScrollPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Attribute")); + center.add(eventTabPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Event")); + center.add(mobileTabPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Widget_Mobile_Terminal")); initPaneList(); + + final String[] tabTitles = new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Attribute"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Event"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Widget_Mobile_Terminal")}; + tabsHeaderIconPane = new UIHeadGroup(tabTitles) { + @Override + public void tabChanged(int index) { + tabbedPane.show(center, tabTitles[index]); + } + }; + tabsHeaderIconPane.setBorder(BorderFactory.createMatteBorder(1, 0, 0, 0, UIConstants.SHADOW_GREY)); + this.add(tabsHeaderIconPane, BorderLayout.NORTH); } private void initPaneList() { paneList = new ArrayList(); paneList.add(attriTabPane); - paneList.add(eventTabPane); + paneList.add(eventPane); paneList.add(mobileTabPane); } @@ -148,7 +151,7 @@ public class CellWidgetCardPane extends BasicPane { currentWidgetMobilePane = mobilePane; - //tabsHeaderIconPane.setSelectedIndex(0); + tabsHeaderIconPane.setSelectedIndex(0); } public Widget update() { diff --git a/designer-realize/src/main/java/com/fr/design/widget/ValueWidgetPane.java b/designer-realize/src/main/java/com/fr/design/widget/ValueWidgetPane.java index 38316cbd76..b941b02efa 100644 --- a/designer-realize/src/main/java/com/fr/design/widget/ValueWidgetPane.java +++ b/designer-realize/src/main/java/com/fr/design/widget/ValueWidgetPane.java @@ -15,11 +15,6 @@ import com.fr.form.ui.WidgetValue; import java.awt.*; -import static com.fine.swing.ui.layout.Layouts.column; -import static com.fine.swing.ui.layout.Layouts.cell; -import static com.fine.swing.ui.layout.Layouts.row; -import static com.fine.swing.ui.layout.Layouts.flex; - public class ValueWidgetPane extends WidgetPane { private JPanel widgetValuePane; private WidgetValueEditor widgetValueEditor; @@ -32,24 +27,18 @@ public class ValueWidgetPane extends WidgetPane { public JPanel initNorthPane(){ JPanel northPane = super.initNorthPane(); - label = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Widget_Value")); + label = new UILabel(" " + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Widget_Value")+ ":"); label.setVisible(false); - widgetValuePane = new JPanel(new BorderLayout()); - - JPanel centerPane = new JPanel(new BorderLayout()); - centerPane.setOpaque(false); - widgetValuePane.setOpaque(false); - centerPane.add(row( - cell(label).weight(68), - cell(widgetValuePane).weight(372)).getComponent() - ); - JPanel jPanel = new JPanel(); - jPanel.setBackground(Color.WHITE); - jPanel.setLayout(new BorderLayout()); - jPanel.add(column(10, true, - cell(northPane), - cell(centerPane) - ).getComponent()); + widgetValuePane = new JPanel(); + widgetValuePane.setLayout(FRGUIPaneFactory.createBorderLayout()); + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + double[] columnSize = {p, p, f}; + double[] rowSize = {p}; + Component[][] components = new Component[][]{ + new Component[]{northPane, label,widgetValuePane}, + }; + JPanel jPanel = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); return jPanel; } diff --git a/designer-realize/src/main/java/com/fr/design/widget/WidgetPane.java b/designer-realize/src/main/java/com/fr/design/widget/WidgetPane.java index 162ed117c2..3a50c38705 100644 --- a/designer-realize/src/main/java/com/fr/design/widget/WidgetPane.java +++ b/designer-realize/src/main/java/com/fr/design/widget/WidgetPane.java @@ -1,6 +1,5 @@ package com.fr.design.widget; -import com.formdev.flatlaf.util.ScaledEmptyBorder; import com.fr.design.ExtraDesignClassManager; import com.fr.design.fun.WidgetDesignHandler; import com.fr.design.gui.core.WidgetOption; @@ -10,36 +9,27 @@ import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.icombobox.UIComboBoxRenderer; 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.mainframe.CellWidgetPropertyPane; import com.fr.design.mainframe.ElementCasePane; import com.fr.design.widget.btn.ButtonConstants; import com.fr.form.ui.Button; -import com.fr.form.ui.NameWidget; -import com.fr.form.ui.Widget; -import com.fr.form.ui.WidgetConfig; -import com.fr.form.ui.WidgetInfoConfig; +import com.fr.form.ui.*; import com.fr.general.ComparatorUtils; + import com.fr.stable.ArrayUtils; import com.fr.stable.AssistUtils; -import javax.swing.DefaultComboBoxModel; -import javax.swing.JComponent; -import javax.swing.JList; -import javax.swing.JPanel; +import javax.swing.*; import javax.swing.event.PopupMenuEvent; import javax.swing.event.PopupMenuListener; -import java.awt.Component; -import java.awt.Dimension; +import java.awt.*; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; import java.util.Vector; -import static com.fine.swing.ui.layout.Layouts.cell; -import static com.fine.swing.ui.layout.Layouts.column; -import static com.fine.swing.ui.layout.Layouts.row; -import static com.fr.design.constants.LayoutConstants.LEFT_WEIGHT; -import static com.fr.design.constants.LayoutConstants.RIGHT_WEIGHT; - /** * CellEditorDef Pane. */ @@ -48,7 +38,7 @@ public class WidgetPane extends AbstractAttrNoScrollPane implements ItemListener private EditorTypeComboBox editorTypeComboBox; private CellWidgetCardPane cellEditorCardPane; private boolean shouldFireSelectedEvent = true; - private JComponent northPane; + private JPanel northPane; public WidgetPane() { this(null); @@ -68,32 +58,36 @@ public class WidgetPane extends AbstractAttrNoScrollPane implements ItemListener protected void initComponents(ElementCasePane pane) { + this.setLayout(FRGUIPaneFactory.createBorderLayout()); + this.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); editorTypeComboBox = new EditorTypeComboBox(pane != null); + editorTypeComboBox.setPreferredSize(new Dimension(155, 30)); editorTypeComboBox.setMaximumRowCount(16); northPane = initNorthPane(); - northPane.setBorder(new ScaledEmptyBorder(10, 10, 0, 10)); + northPane.setBorder(BorderFactory.createEmptyBorder(12, 10, 10, 15)); + this.add(northPane, BorderLayout.NORTH); editorTypeComboBox.addItemListener(this); + cellEditorCardPane = initWidgetCardPane(pane); + this.add(cellEditorCardPane, BorderLayout.CENTER); this.addAttributeChangeListener(listener); - - this.add(column( - 10, - cell(northPane).weight(0.17), - cell(cellEditorCardPane).weight(0.83) - ).getComponent() - ); } public JPanel initNorthPane() { - - return column( - row( - cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Select_Widget"))).weight(68), - cell(editorTypeComboBox).weight(372) - ) - ).getComponent(); + UILabel emptyLabel = new UILabel(); + emptyLabel.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0)); + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + double[] columnSize = {p, p, f}; + double[] rowSize = {p}; + Component[][] components = new Component[][]{ + new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Select_Widget")), emptyLabel, editorTypeComboBox}, + }; + JPanel jPanel = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); + return jPanel; } protected CellWidgetCardPane initWidgetCardPane(ElementCasePane pane) { diff --git a/designer-realize/src/main/java/com/fr/design/widget/ui/BasicWidgetPropertySettingPane.java b/designer-realize/src/main/java/com/fr/design/widget/ui/BasicWidgetPropertySettingPane.java index 8ba27909f2..5bd91d038d 100644 --- a/designer-realize/src/main/java/com/fr/design/widget/ui/BasicWidgetPropertySettingPane.java +++ b/designer-realize/src/main/java/com/fr/design/widget/ui/BasicWidgetPropertySettingPane.java @@ -1,20 +1,21 @@ package com.fr.design.widget.ui; -import com.formdev.flatlaf.util.ScaledEmptyBorder; -import com.fr.design.constants.LayoutConstants; -import com.fr.design.dialog.BasicPane; +import com.fr.design.designer.IntervalConstants; import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.ilable.UILabel; +import com.fr.design.dialog.BasicPane; import com.fr.design.i18n.Toolkit; -import com.fr.design.utils.gui.GUICoreUtils; +import com.fr.design.layout.TableLayout; +import com.fr.design.layout.TableLayoutHelper; import com.fr.form.ui.NoneWidget; import com.fr.form.ui.Widget; -import java.awt.BorderLayout; +import com.fr.design.utils.gui.GUICoreUtils; -import static com.fine.swing.ui.layout.Layouts.cell; -import static com.fine.swing.ui.layout.Layouts.column; -import static com.fine.swing.ui.layout.Layouts.row; +import javax.swing.BorderFactory; +import javax.swing.JPanel; +import java.awt.BorderLayout; +import java.awt.Component; public class BasicWidgetPropertySettingPane extends BasicPane { @@ -25,18 +26,27 @@ public class BasicWidgetPropertySettingPane extends BasicPane { public BasicWidgetPropertySettingPane() { this.setLayout(new BorderLayout()); - this.setBorder(new ScaledEmptyBorder(0, 0, 10, 0)); enableCheckBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Report_Enabled"), true); + enableCheckBox.setBorder(BorderFactory.createEmptyBorder(0,0,0,0)); visibleCheckBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Form_Widget_Visible"), true); + visibleCheckBox.setBorder(BorderFactory.createEmptyBorder(0,0,0,0)); widgetNameComboBox = new ParameterTreeComboBox(); widgetNameComboBox.refreshTree(); + double f = TableLayout.FILL; + double p = TableLayout.PREFERRED; + Component[][] components = new Component[][]{ + new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Widget_Name")), widgetNameComboBox}, + new Component[]{enableCheckBox, null}, + new Component[]{visibleCheckBox, null}, + }; + double[] rowSize = {p, p, p}; + double[] columnSize = {p, f}; + int[][] rowCount = {{1, 1},{1, 1},{1, 1},{1, 1}}; + JPanel pane = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W2, IntervalConstants.INTERVAL_L1); + pane.setBorder(BorderFactory.createEmptyBorder(10,0,10,0)); + + this.add(pane, BorderLayout.CENTER); - this.add(row(LayoutConstants.HORIZONTAL_GAP, - cell(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Widget_Name"))).weight(0.2), - cell(widgetNameComboBox).weight(0.6), - cell(enableCheckBox).weight(0.1), - cell(visibleCheckBox).weight(0.1) - ).getComponent()); } @Override diff --git a/designer-realize/src/main/java/com/fr/design/widget/ui/DateEditorDefinePane.java b/designer-realize/src/main/java/com/fr/design/widget/ui/DateEditorDefinePane.java index 454337d3f0..a5b05dbcc5 100644 --- a/designer-realize/src/main/java/com/fr/design/widget/ui/DateEditorDefinePane.java +++ b/designer-realize/src/main/java/com/fr/design/widget/ui/DateEditorDefinePane.java @@ -1,14 +1,19 @@ package com.fr.design.widget.ui; -import com.fine.theme.light.ui.FineRoundBorder; -import com.formdev.flatlaf.ui.FlatUIUtils; +import com.fr.base.FRContext; import com.fr.data.core.FormatField; -import com.fr.design.constants.LayoutConstants; +import com.fr.design.ExtraDesignClassManager; +import com.fr.design.beans.BasicBeanPane; +import com.fr.design.border.UIRoundedBorder; +import com.fr.design.constants.UIConstants; +import com.fr.design.designer.IntervalConstants; +import com.fr.design.fun.WidgetAdvancedPaneProvider; import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.gui.icombobox.UIComboBox; 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.widget.component.DateValuePane; import com.fr.design.widget.component.UIComboBoxNoArrow; import com.fr.design.widget.ui.designer.date.DateFormatCheckManager; @@ -17,30 +22,28 @@ import com.fr.form.ui.DateEditor; import com.fr.stable.ArrayUtils; -import javax.swing.JPanel; -import javax.swing.SwingConstants; -import javax.swing.border.EmptyBorder; -import javax.swing.plaf.BorderUIResource; +import javax.swing.*; +import javax.swing.border.TitledBorder; +import javax.swing.event.ChangeEvent; +import javax.swing.event.ChangeListener; import java.awt.*; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; import java.text.SimpleDateFormat; import java.util.Date; - -import static com.fine.swing.ui.layout.Layouts.cell; -import static com.fine.swing.ui.layout.Layouts.column; -import static com.fine.swing.ui.layout.Layouts.row; -import static com.fine.swing.ui.layout.Layouts.flex; -import static com.fr.design.constants.LayoutConstants.LEFT_WEIGHT; -import static com.fr.design.constants.LayoutConstants.RIGHT_WEIGHT; +import java.util.Set; public class DateEditorDefinePane extends DirectWriteEditorDefinePane { - private UIButtonGroup returnTypeButtonGroup; + private UIButtonGroup returnTypeComboBox; private DateValuePane startDv; private DateValuePane endDv; private UIComboBox currentFormatComboBox; - private UILabel currentSampleLabel; - private UIButtonGroup formatButtonGroup; + private UILabel currentSamplelabel; + private UIButtonGroup fomatHeadGroup; + private static final int SAMPLE_LABEL_PADDING = 4; + public DateEditorDefinePane() { } @@ -52,22 +55,33 @@ public class DateEditorDefinePane extends DirectWriteEditorDefinePane(new String[] {com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Date") , - com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_String")}); + returnTypeComboBox = new UIButtonGroup<>(new String[] {com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Date") , com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_String")}); JPanel formatHead = createFormatHead(); - startDv = new DateValuePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_FS_Start_Date")); - endDv = new DateValuePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_FS_End_Date")); - UILabel returnTypeLabel = new UILabel(Toolkit.i18nText("Fine-Design_Basic_Widget_Date_Selector_Return_Type")); - - return column(LayoutConstants.VERTICAL_GAP, - cell(formatHead), - cell(startDv), - cell(endDv), - cell(waterMarkDictPane), - row( - cell(returnTypeLabel).weight(LEFT_WEIGHT), cell(returnTypeButtonGroup).weight(1.4), flex(1.6) - ) - ).getComponent(); + startDv = new DateValuePane(); + endDv = new DateValuePane(); + double f = TableLayout.FILL; + double p = TableLayout.PREFERRED; + UILabel formatLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Engine_Format")); + formatLabel.setVerticalAlignment(SwingConstants.TOP); + UILabel startDateLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_FS_Start_Date")); + startDateLabel.setVerticalAlignment(SwingConstants.TOP); + UILabel endDateLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_FS_End_Date")); + endDateLabel.setVerticalAlignment(SwingConstants.TOP); + Component[][] components = new Component[][]{ + new Component[]{formatLabel, formatHead}, + new Component[]{startDateLabel, startDv}, + new Component[]{endDateLabel, endDv}, + new Component[]{waterMarkDictPane, null}, + new Component[]{extraPane, null}, + new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Widget_Date_Selector_Return_Type")), returnTypeComboBox } + }; + double[] rowSize = {p, p, p, p, p, p, p, p}; + double[] columnSize = {p, f}; + int[][] rowCount = {{1, 3},{1, 1},{1, 1},{1, 1},{1, 1}, {1, 1}}; + JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_L2, IntervalConstants.INTERVAL_L1); + + + return panel; } @Override @@ -76,20 +90,20 @@ public class DateEditorDefinePane extends DirectWriteEditorDefinePane refreshPreviewLabel()); - timeFormatComboBox.addActionListener(e -> refreshPreviewLabel()); + dateFormatComboBox.addActionListener(new ActionListener(){ + public void actionPerformed(ActionEvent e){ + refreshPreviewLabel(); + } + }); + timeFormatComboBox.addActionListener(new ActionListener(){ + public void actionPerformed(ActionEvent e){ + refreshPreviewLabel(); + } + }); final UILabel dateSampleLabel = createSamplePane(); final UILabel timeSampleLabel = createSamplePane(); + JPanel fomatHeadPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); final CardLayout cardLayout = new CardLayout(); final JPanel customPane = new JPanel(cardLayout); JPanel dateFormatPane = createFormatPane(dateFormatComboBox, dateSampleLabel); JPanel timeFormatPane = createFormatPane(timeFormatComboBox, timeSampleLabel); customPane.add(dateFormatPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_StyleFormat_Date")); customPane.add(timeFormatPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_StyleFormat_Time")); - final String[] tabTitles = new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_StyleFormat_Date"), - com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_StyleFormat_Time")}; - formatButtonGroup = new UIButtonGroup<>(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_StyleFormat_Date"), - com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_StyleFormat_Time")}); - formatButtonGroup.addChangeListener(e -> { - int newSelectedIndex = formatButtonGroup.getSelectedIndex(); - cardLayout.show(customPane, tabTitles[newSelectedIndex]); - if(newSelectedIndex == 0){ - currentFormatComboBox = dateFormatComboBox; - currentSampleLabel = dateSampleLabel; - }else{ - currentFormatComboBox = timeFormatComboBox; - currentSampleLabel = timeSampleLabel; + final String[] tabTitles = new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_StyleFormat_Date"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_StyleFormat_Time")}; + fomatHeadGroup = new UIButtonGroup(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_StyleFormat_Date"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_StyleFormat_Time")}); + fomatHeadGroup.addChangeListener(new ChangeListener() { + @Override + public void stateChanged(ChangeEvent e) { + int newSelectedIndex = fomatHeadGroup.getSelectedIndex(); + cardLayout.show(customPane, tabTitles[newSelectedIndex]); + if(newSelectedIndex == 0){ + currentFormatComboBox = dateFormatComboBox; + currentSamplelabel = dateSampleLabel; + }else{ + currentFormatComboBox = timeFormatComboBox; + currentSamplelabel = timeSampleLabel; + } + refreshPreviewLabel(); } - refreshPreviewLabel(); }); - return column(LayoutConstants.VERTICAL_GAP, - row( - cell(formatLabel).weight(LEFT_WEIGHT), cell(formatButtonGroup).weight(1.4), flex(1.6) - ), - row(flex(LEFT_WEIGHT), cell(customPane).weight(RIGHT_WEIGHT)) - ).getComponent(); + fomatHeadPane.add(fomatHeadGroup, BorderLayout.NORTH); + fomatHeadPane.add(customPane, BorderLayout.CENTER); + return fomatHeadPane; } + + private void refreshPreviewLabel() { String text = (String) currentFormatComboBox.getSelectedItem(); if (text != null && text.length() > 0) { @@ -153,15 +174,14 @@ public class DateEditorDefinePane extends DirectWriteEditorDefinePane Date: Fri, 2 Aug 2024 19:53:24 +0800 Subject: [PATCH 3/8] =?UTF-8?q?=E9=AB=98DPI/=E5=B8=83=E5=B1=80=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gui/isplitpanedivider/UISplitPaneDivider.java | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/isplitpanedivider/UISplitPaneDivider.java b/designer-base/src/main/java/com/fr/design/gui/isplitpanedivider/UISplitPaneDivider.java index 997f2918bd..b8af71a528 100644 --- a/designer-base/src/main/java/com/fr/design/gui/isplitpanedivider/UISplitPaneDivider.java +++ b/designer-base/src/main/java/com/fr/design/gui/isplitpanedivider/UISplitPaneDivider.java @@ -1,6 +1,5 @@ package com.fr.design.gui.isplitpanedivider; -import com.formdev.flatlaf.ui.FlatUIUtils; import com.fr.design.utils.ThemeUtils; import javax.swing.*; @@ -50,17 +49,6 @@ public class UISplitPaneDivider extends BasicSplitPaneDivider { } super.paint(g); - paintStyle( g, 0, 0, getWidth(), getHeight() ); - } - - protected void paintStyle( Graphics g, int x, int y, int width, int height ) { - - Object[] oldRenderingHints = FlatUIUtils.setRenderingHints( g ); - - //g.setColor( gripColor ); - //paintGrip( g, x, y, width, height ); - - FlatUIUtils.resetRenderingHints( g, oldRenderingHints ); } /** From 05276039d93b8f593e7de0b35bd7590197631493 Mon Sep 17 00:00:00 2001 From: renekton Date: Fri, 2 Aug 2024 20:19:24 +0800 Subject: [PATCH 4/8] =?UTF-8?q?=E6=8E=A7=E4=BB=B6=E7=AE=A1=E7=90=86/?= =?UTF-8?q?=E6=8A=A5=E8=A1=A8=E5=A1=AB=E6=8A=A5=E5=B1=9E=E6=80=A7/?= =?UTF-8?q?=E8=B6=85=E7=BA=A7=E9=93=BE=E6=8E=A5/=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E5=99=A8=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gui/frpane/ObjectProperiesPane.java | 7 +-- .../fr/design/write/submit/CustomJobPane.java | 1 - .../fr/env/detect/ui/EnvDetectorDialog.java | 6 +- .../light/ui/laf/FineLightLaf.properties | 2 + .../fr/design/widget/CellWidgetCardPane.java | 46 ++++++++------ .../java/com/fr/design/widget/WidgetPane.java | 60 ++++++++++--------- .../ui/BasicWidgetPropertySettingPane.java | 44 ++++++-------- .../widget/ui/DateEditorDefinePane.java | 8 +-- 8 files changed, 90 insertions(+), 84 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/frpane/ObjectProperiesPane.java b/designer-base/src/main/java/com/fr/design/gui/frpane/ObjectProperiesPane.java index 96e8de72f8..f1d6b9bd66 100644 --- a/designer-base/src/main/java/com/fr/design/gui/frpane/ObjectProperiesPane.java +++ b/designer-base/src/main/java/com/fr/design/gui/frpane/ObjectProperiesPane.java @@ -38,8 +38,7 @@ public class ObjectProperiesPane extends BasicBeanPane { new LazyIcon("add")); buttonPane.add(this.addButton, BorderLayout.WEST); buttonPane.setPreferredSize(FineUIScale.scale(new Dimension(0, 24))); - //this.add(buttonPane, BorderLayout.NORTH); - + this.addButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { @@ -50,8 +49,7 @@ public class ObjectProperiesPane extends BasicBeanPane { }); selectedItemPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_S_Pane(); -// selectedItemPane.setLayout(new BoxLayout(selectedItemPane,BoxLayout.Y_AXIS)); - + JPanel northPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); northPane.add(selectedItemPane, BorderLayout.NORTH); @@ -61,7 +59,6 @@ public class ObjectProperiesPane extends BasicBeanPane { JPanel centerPane = new JPanel(new BorderLayout()); centerPane.setBorder(new FineRoundBorder()); centerPane.add(selectedItemScrollPane); - //this.add(centerPane, BorderLayout.CENTER); this.add(column(4, cell(buttonPane), cell(centerPane).weight(1.0) diff --git a/designer-base/src/main/java/com/fr/design/write/submit/CustomJobPane.java b/designer-base/src/main/java/com/fr/design/write/submit/CustomJobPane.java index d7136660e7..9c1a65b723 100644 --- a/designer-base/src/main/java/com/fr/design/write/submit/CustomJobPane.java +++ b/designer-base/src/main/java/com/fr/design/write/submit/CustomJobPane.java @@ -96,7 +96,6 @@ public abstract class CustomJobPane extends BasicBeanPane { reportletNamePane.setLayout(new BorderLayout()); reportletNamePane.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0)); - //reportletNamePane.setPreferredSize(new Dimension(0, FineUIScale.scale(24))); reportletNamePane.add(row(4, cell(classNameTextField).weight(1.0), cell(browserButton), diff --git a/designer-base/src/main/java/com/fr/env/detect/ui/EnvDetectorDialog.java b/designer-base/src/main/java/com/fr/env/detect/ui/EnvDetectorDialog.java index 05f33310ab..5a2020cf3c 100644 --- a/designer-base/src/main/java/com/fr/env/detect/ui/EnvDetectorDialog.java +++ b/designer-base/src/main/java/com/fr/env/detect/ui/EnvDetectorDialog.java @@ -116,7 +116,7 @@ public class EnvDetectorDialog extends JDialog { this.body = FRGUIPaneFactory.createBorderLayout_L_Pane(); Color backgroundColor = new Color(240, 240, 243, 1); - //this.body.setBackground( backgroundColor); + this.body.setBackground( backgroundColor); this.headerPanel = createHeaderPanel(); body.add(headerPanel, BorderLayout.NORTH); @@ -175,8 +175,8 @@ public class EnvDetectorDialog extends JDialog { stopDetecting(detectButton); } }); - detectButton.setForeground(Color.WHITE); - detectButton.setBackground(new Color(65, 155, 249)); + detectButton.setForeground(FineUIUtils.getUIColor("background.normal", "background.normal")); + detectButton.setBackground(FineUIUtils.getUIColor("EnvDetectorButton.background", "Button.default.background")); headerPanel.add(detectButton, BorderLayout.WEST); 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 70e0f58a1d..eabd62e110 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 @@ -222,6 +222,8 @@ CombinationButton.background = $Button.background CombinationButton.borderColor = $Component.borderColor CombinationButton.arc = $Button.arc +EnvDetecorButton.background = #FF419BF9 + #---- CheckBox ---- CheckBox.arc = 4 CheckBox.margin = 2,0,2,0 diff --git a/designer-realize/src/main/java/com/fr/design/widget/CellWidgetCardPane.java b/designer-realize/src/main/java/com/fr/design/widget/CellWidgetCardPane.java index 6dfc1a51d4..71dbd52603 100644 --- a/designer-realize/src/main/java/com/fr/design/widget/CellWidgetCardPane.java +++ b/designer-realize/src/main/java/com/fr/design/widget/CellWidgetCardPane.java @@ -1,6 +1,7 @@ package com.fr.design.widget; -import com.fr.design.constants.UIConstants; +import com.formdev.flatlaf.util.ScaledEmptyBorder; +import com.fr.design.border.FineBorderFactory; import com.fr.design.data.DataCreatorUI; import com.fr.design.dialog.AttrScrollPane; import com.fr.design.dialog.BasicPane; @@ -14,12 +15,15 @@ import com.fr.design.widget.ui.BasicWidgetPropertySettingPane; import com.fr.form.event.Listener; import com.fr.form.ui.Widget; -import javax.swing.BorderFactory; import javax.swing.JPanel; import java.awt.BorderLayout; import java.awt.CardLayout; import java.util.ArrayList; +import static com.fine.swing.ui.layout.Layouts.cell; +import static com.fine.swing.ui.layout.Layouts.column; +import static com.fine.swing.ui.layout.Layouts.fix; + /* * carl :单独弄出来 */ @@ -62,7 +66,20 @@ public class CellWidgetCardPane extends BasicPane { this.setLayout(FRGUIPaneFactory.createBorderLayout()); tabbedPane = new CardLayout(); center = new JPanel(tabbedPane); - this.add(center, BorderLayout.CENTER); + + final String[] tabTitles = new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Attribute"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Event"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Widget_Mobile_Terminal")}; + tabsHeaderIconPane = new UIHeadGroup(tabTitles) { + @Override + public void tabChanged(int index) { + tabbedPane.show(center, tabTitles[index]); + } + }; + + JPanel wrapperPane = new JPanel(new BorderLayout()); + wrapperPane.add(tabsHeaderIconPane, BorderLayout.NORTH); + wrapperPane.add(center, BorderLayout.CENTER); + wrapperPane.setBorder(new ScaledEmptyBorder(0, 10, 0, 10)); + this.add(wrapperPane, BorderLayout.CENTER); // 属性 attriTabPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); @@ -73,16 +90,19 @@ public class CellWidgetCardPane extends BasicPane { } }; widgetPropertyPane = new BasicWidgetPropertySettingPane(); - UIExpandablePane uiExpandablePane = new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Basic"), 280, 24, widgetPropertyPane); - attriTabPane.setBorder(BorderFactory.createEmptyBorder(10, 10, 0, 10)); - attriTabPane.add(uiExpandablePane, BorderLayout.NORTH); + UIExpandablePane basicPane = new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Basic"), 280, 24, widgetPropertyPane); attriCardPane = FRGUIPaneFactory.createCardLayout_S_Pane(); - attriTabPane.add(attriCardPane, BorderLayout.CENTER); attriCardLayout = (CardLayout) attriCardPane.getLayout(); + attriTabPane.add(column( + cell(basicPane), + fix(1).with(it -> it.setBorder(FineBorderFactory.createDefaultUnderlineBorder())), + cell(attriCardPane) + ).getComponent() + ); + // 事件 eventTabPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); - eventTabPane.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 10)); eventPane = initWidgetEventPane(pane); eventTabPane.add(eventPane, BorderLayout.CENTER); @@ -97,16 +117,6 @@ public class CellWidgetCardPane extends BasicPane { center.add(mobileTabPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Widget_Mobile_Terminal")); initPaneList(); - - final String[] tabTitles = new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Attribute"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Event"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Widget_Mobile_Terminal")}; - tabsHeaderIconPane = new UIHeadGroup(tabTitles) { - @Override - public void tabChanged(int index) { - tabbedPane.show(center, tabTitles[index]); - } - }; - tabsHeaderIconPane.setBorder(BorderFactory.createMatteBorder(1, 0, 0, 0, UIConstants.SHADOW_GREY)); - this.add(tabsHeaderIconPane, BorderLayout.NORTH); } private void initPaneList() { diff --git a/designer-realize/src/main/java/com/fr/design/widget/WidgetPane.java b/designer-realize/src/main/java/com/fr/design/widget/WidgetPane.java index 3a50c38705..80ba33ef26 100644 --- a/designer-realize/src/main/java/com/fr/design/widget/WidgetPane.java +++ b/designer-realize/src/main/java/com/fr/design/widget/WidgetPane.java @@ -1,5 +1,6 @@ package com.fr.design.widget; +import com.formdev.flatlaf.util.ScaledEmptyBorder; import com.fr.design.ExtraDesignClassManager; import com.fr.design.fun.WidgetDesignHandler; import com.fr.design.gui.core.WidgetOption; @@ -9,27 +10,36 @@ import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.icombobox.UIComboBoxRenderer; 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.mainframe.CellWidgetPropertyPane; import com.fr.design.mainframe.ElementCasePane; import com.fr.design.widget.btn.ButtonConstants; import com.fr.form.ui.Button; -import com.fr.form.ui.*; +import com.fr.form.ui.NameWidget; +import com.fr.form.ui.Widget; +import com.fr.form.ui.WidgetConfig; +import com.fr.form.ui.WidgetInfoConfig; import com.fr.general.ComparatorUtils; - import com.fr.stable.ArrayUtils; import com.fr.stable.AssistUtils; -import javax.swing.*; +import javax.swing.DefaultComboBoxModel; +import javax.swing.JComponent; +import javax.swing.JList; +import javax.swing.JPanel; import javax.swing.event.PopupMenuEvent; import javax.swing.event.PopupMenuListener; -import java.awt.*; +import java.awt.Component; +import java.awt.Dimension; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; import java.util.Vector; +import static com.fine.swing.ui.layout.Layouts.cell; +import static com.fine.swing.ui.layout.Layouts.column; +import static com.fine.swing.ui.layout.Layouts.row; +import static com.fr.design.constants.LayoutConstants.LEFT_WEIGHT; +import static com.fr.design.constants.LayoutConstants.RIGHT_WEIGHT; + /** * CellEditorDef Pane. */ @@ -38,7 +48,7 @@ public class WidgetPane extends AbstractAttrNoScrollPane implements ItemListener private EditorTypeComboBox editorTypeComboBox; private CellWidgetCardPane cellEditorCardPane; private boolean shouldFireSelectedEvent = true; - private JPanel northPane; + private JComponent northPane; public WidgetPane() { this(null); @@ -58,36 +68,32 @@ public class WidgetPane extends AbstractAttrNoScrollPane implements ItemListener protected void initComponents(ElementCasePane pane) { - this.setLayout(FRGUIPaneFactory.createBorderLayout()); - this.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); editorTypeComboBox = new EditorTypeComboBox(pane != null); - editorTypeComboBox.setPreferredSize(new Dimension(155, 30)); editorTypeComboBox.setMaximumRowCount(16); northPane = initNorthPane(); - northPane.setBorder(BorderFactory.createEmptyBorder(12, 10, 10, 15)); - this.add(northPane, BorderLayout.NORTH); + northPane.setBorder(new ScaledEmptyBorder(10, 10, 0, 10)); editorTypeComboBox.addItemListener(this); - cellEditorCardPane = initWidgetCardPane(pane); - this.add(cellEditorCardPane, BorderLayout.CENTER); this.addAttributeChangeListener(listener); + + this.add(column( + 10, + cell(northPane), + cell(cellEditorCardPane).weight(1) + ).getComponent() + ); } public JPanel initNorthPane() { - UILabel emptyLabel = new UILabel(); - emptyLabel.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0)); - - double p = TableLayout.PREFERRED; - double f = TableLayout.FILL; - double[] columnSize = {p, p, f}; - double[] rowSize = {p}; - Component[][] components = new Component[][]{ - new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Select_Widget")), emptyLabel, editorTypeComboBox}, - }; - JPanel jPanel = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); - return jPanel; + + return column( + row( + cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Select_Widget"))).weight(LEFT_WEIGHT), + cell(editorTypeComboBox).weight(RIGHT_WEIGHT) + ) + ).getComponent(); } protected CellWidgetCardPane initWidgetCardPane(ElementCasePane pane) { diff --git a/designer-realize/src/main/java/com/fr/design/widget/ui/BasicWidgetPropertySettingPane.java b/designer-realize/src/main/java/com/fr/design/widget/ui/BasicWidgetPropertySettingPane.java index 5bd91d038d..c7ff5fdddb 100644 --- a/designer-realize/src/main/java/com/fr/design/widget/ui/BasicWidgetPropertySettingPane.java +++ b/designer-realize/src/main/java/com/fr/design/widget/ui/BasicWidgetPropertySettingPane.java @@ -1,21 +1,22 @@ package com.fr.design.widget.ui; -import com.fr.design.designer.IntervalConstants; +import com.formdev.flatlaf.util.ScaledEmptyBorder; +import com.fr.design.constants.LayoutConstants; +import com.fr.design.dialog.BasicPane; import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.ilable.UILabel; -import com.fr.design.dialog.BasicPane; import com.fr.design.i18n.Toolkit; -import com.fr.design.layout.TableLayout; -import com.fr.design.layout.TableLayoutHelper; +import com.fr.design.utils.gui.GUICoreUtils; import com.fr.form.ui.NoneWidget; import com.fr.form.ui.Widget; -import com.fr.design.utils.gui.GUICoreUtils; - -import javax.swing.BorderFactory; -import javax.swing.JPanel; import java.awt.BorderLayout; -import java.awt.Component; + +import static com.fine.swing.ui.layout.Layouts.cell; +import static com.fine.swing.ui.layout.Layouts.column; +import static com.fine.swing.ui.layout.Layouts.row; +import static com.fr.design.constants.LayoutConstants.LEFT_WEIGHT; +import static com.fr.design.constants.LayoutConstants.RIGHT_WEIGHT; public class BasicWidgetPropertySettingPane extends BasicPane { @@ -26,27 +27,20 @@ public class BasicWidgetPropertySettingPane extends BasicPane { public BasicWidgetPropertySettingPane() { this.setLayout(new BorderLayout()); + this.setBorder(new ScaledEmptyBorder(0, 0, 10, 0)); enableCheckBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Report_Enabled"), true); - enableCheckBox.setBorder(BorderFactory.createEmptyBorder(0,0,0,0)); visibleCheckBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Form_Widget_Visible"), true); - visibleCheckBox.setBorder(BorderFactory.createEmptyBorder(0,0,0,0)); widgetNameComboBox = new ParameterTreeComboBox(); widgetNameComboBox.refreshTree(); - double f = TableLayout.FILL; - double p = TableLayout.PREFERRED; - Component[][] components = new Component[][]{ - new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Widget_Name")), widgetNameComboBox}, - new Component[]{enableCheckBox, null}, - new Component[]{visibleCheckBox, null}, - }; - double[] rowSize = {p, p, p}; - double[] columnSize = {p, f}; - int[][] rowCount = {{1, 1},{1, 1},{1, 1},{1, 1}}; - JPanel pane = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W2, IntervalConstants.INTERVAL_L1); - pane.setBorder(BorderFactory.createEmptyBorder(10,0,10,0)); - - this.add(pane, BorderLayout.CENTER); + this.add(column(LayoutConstants.VERTICAL_GAP, + row( + cell(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Widget_Name"))).weight(LEFT_WEIGHT), + cell(widgetNameComboBox).weight(RIGHT_WEIGHT) + ), + cell(enableCheckBox), + cell(visibleCheckBox) + ).getComponent()); } @Override diff --git a/designer-realize/src/main/java/com/fr/design/widget/ui/DateEditorDefinePane.java b/designer-realize/src/main/java/com/fr/design/widget/ui/DateEditorDefinePane.java index a5b05dbcc5..d1ecaeca5c 100644 --- a/designer-realize/src/main/java/com/fr/design/widget/ui/DateEditorDefinePane.java +++ b/designer-realize/src/main/java/com/fr/design/widget/ui/DateEditorDefinePane.java @@ -2,12 +2,9 @@ package com.fr.design.widget.ui; import com.fr.base.FRContext; import com.fr.data.core.FormatField; -import com.fr.design.ExtraDesignClassManager; -import com.fr.design.beans.BasicBeanPane; import com.fr.design.border.UIRoundedBorder; import com.fr.design.constants.UIConstants; import com.fr.design.designer.IntervalConstants; -import com.fr.design.fun.WidgetAdvancedPaneProvider; import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.ilable.UILabel; @@ -22,7 +19,9 @@ import com.fr.form.ui.DateEditor; import com.fr.stable.ArrayUtils; -import javax.swing.*; +import javax.swing.BorderFactory; +import javax.swing.JPanel; +import javax.swing.SwingConstants; import javax.swing.border.TitledBorder; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; @@ -31,7 +30,6 @@ import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.text.SimpleDateFormat; import java.util.Date; -import java.util.Set; public class DateEditorDefinePane extends DirectWriteEditorDefinePane { private UIButtonGroup returnTypeComboBox; From 46a11c97e218d0ca486aeb4c6dc3d10e29433f9d Mon Sep 17 00:00:00 2001 From: renekton Date: Fri, 2 Aug 2024 20:20:54 +0800 Subject: [PATCH 5/8] =?UTF-8?q?=E6=8E=A7=E4=BB=B6=E7=AE=A1=E7=90=86/?= =?UTF-8?q?=E6=8A=A5=E8=A1=A8=E5=A1=AB=E6=8A=A5=E5=B1=9E=E6=80=A7/?= =?UTF-8?q?=E8=B6=85=E7=BA=A7=E9=93=BE=E6=8E=A5/=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E5=99=A8=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/env/detect/ui/EnvDetectorDialog.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/env/detect/ui/EnvDetectorDialog.java b/designer-base/src/main/java/com/fr/env/detect/ui/EnvDetectorDialog.java index 5a2020cf3c..fbd4e7f0a1 100644 --- a/designer-base/src/main/java/com/fr/env/detect/ui/EnvDetectorDialog.java +++ b/designer-base/src/main/java/com/fr/env/detect/ui/EnvDetectorDialog.java @@ -176,7 +176,7 @@ public class EnvDetectorDialog extends JDialog { } }); detectButton.setForeground(FineUIUtils.getUIColor("background.normal", "background.normal")); - detectButton.setBackground(FineUIUtils.getUIColor("EnvDetectorButton.background", "Button.default.background")); + detectButton.setBackground(FineUIUtils.getUIColor("EnvDetectorButton.background", "EnvDetectorButton.background")); headerPanel.add(detectButton, BorderLayout.WEST); From ee22ad6e657db2b3c1d8482c129262de53623cd0 Mon Sep 17 00:00:00 2001 From: renekton Date: Mon, 5 Aug 2024 13:11:23 +0800 Subject: [PATCH 6/8] =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E5=BC=95=E6=93=8E?= =?UTF-8?q?=E7=86=9F=E6=82=89ui=E7=BF=BB=E6=96=B0/=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E6=95=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gui/frpane/ObjectProperiesPane.java | 3 +- .../java/com/fr/design/gui/imenu/UIMenu.java | 1 - .../design/gui/style/FollowingThemePane.java | 3 +- .../hyperlink/popup/CustomFontPane.java | 10 ++- .../com/fr/design/menu/NameSeparator.java | 5 +- .../fr/design/report/ReportEnginePane.java | 66 +++++++++++-------- 6 files changed, 49 insertions(+), 39 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/frpane/ObjectProperiesPane.java b/designer-base/src/main/java/com/fr/design/gui/frpane/ObjectProperiesPane.java index f1d6b9bd66..611a5fef9b 100644 --- a/designer-base/src/main/java/com/fr/design/gui/frpane/ObjectProperiesPane.java +++ b/designer-base/src/main/java/com/fr/design/gui/frpane/ObjectProperiesPane.java @@ -3,6 +3,7 @@ package com.fr.design.gui.frpane; import com.fine.theme.icon.LazyIcon; import com.fine.theme.light.ui.FineRoundBorder; import com.fine.theme.utils.FineUIScale; +import com.formdev.flatlaf.util.ScaledEmptyBorder; import com.fr.base.BaseUtils; import com.fr.design.beans.BasicBeanPane; import com.fr.design.editor.ValueEditorPane; @@ -32,7 +33,7 @@ public class ObjectProperiesPane extends BasicBeanPane { public ObjectProperiesPane() { this.setLayout(FRGUIPaneFactory.createBorderLayout()); - this.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0)); + this.setBorder(new ScaledEmptyBorder(10, 0, 0, 0)); JPanel buttonPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); this.addButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Add") + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Property"), new LazyIcon("add")); diff --git a/designer-base/src/main/java/com/fr/design/gui/imenu/UIMenu.java b/designer-base/src/main/java/com/fr/design/gui/imenu/UIMenu.java index eb2de5b79e..ec78046709 100644 --- a/designer-base/src/main/java/com/fr/design/gui/imenu/UIMenu.java +++ b/designer-base/src/main/java/com/fr/design/gui/imenu/UIMenu.java @@ -7,7 +7,6 @@ import javax.swing.JMenuItem; import javax.swing.JPopupMenu; import javax.swing.MenuElement; import java.awt.Component; -import java.awt.Dimension; /** * @author null diff --git a/designer-base/src/main/java/com/fr/design/gui/style/FollowingThemePane.java b/designer-base/src/main/java/com/fr/design/gui/style/FollowingThemePane.java index 9334cc926d..e464110b47 100644 --- a/designer-base/src/main/java/com/fr/design/gui/style/FollowingThemePane.java +++ b/designer-base/src/main/java/com/fr/design/gui/style/FollowingThemePane.java @@ -1,6 +1,7 @@ package com.fr.design.gui.style; import com.fine.theme.utils.FineUIScale; +import com.formdev.flatlaf.util.ScaledEmptyBorder; import com.fr.base.theme.TemplateTheme; import com.fr.design.dialog.BasicPane; import com.fr.design.event.UIObserver; @@ -46,7 +47,7 @@ public class FollowingThemePane extends BasicPane implements UIObserver { public FollowingThemePane(String name) { this.setLayout(FRGUIPaneFactory.createBorderLayout()); - this.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 10)); + this.setBorder(new ScaledEmptyBorder(0, 0, 0, 10)); followingThemeButtonGroup = new UIButtonGroup<>(FOLLOWING_THEME_STRING_ARRAYS); followingThemeButtonGroup.setAutoFireStateChanged(false); diff --git a/designer-base/src/main/java/com/fr/design/hyperlink/popup/CustomFontPane.java b/designer-base/src/main/java/com/fr/design/hyperlink/popup/CustomFontPane.java index 523bd5006a..34618e6ce3 100644 --- a/designer-base/src/main/java/com/fr/design/hyperlink/popup/CustomFontPane.java +++ b/designer-base/src/main/java/com/fr/design/hyperlink/popup/CustomFontPane.java @@ -1,12 +1,10 @@ package com.fr.design.hyperlink.popup; -import com.fr.base.BaseUtils; -import com.fr.design.constants.LayoutConstants; +import com.fine.theme.icon.LazyIcon; import com.fr.design.gui.ibutton.UIColorButton; import com.fr.design.gui.ibutton.UIToggleButton; import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.i18n.Toolkit; -import com.fr.design.utils.gui.GUICoreUtils; import com.fr.general.FRFont; import com.fr.stable.Constants; @@ -46,9 +44,9 @@ public class CustomFontPane extends JPanel { fontSizeComboBox.setEditable(true); colorSelectPane = new UIColorButton(); - bold = new UIToggleButton(BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/new_bold.png")); - italic = new UIToggleButton(BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/new_italic.png")); - underline = new UIToggleButton(BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/new_underline.png")); + bold = new UIToggleButton(new LazyIcon("bold")); + italic = new UIToggleButton(new LazyIcon("italic")); + underline = new UIToggleButton(new LazyIcon("underline")); colorSelectPane.setOpaque(true); bold.setOpaque(true); diff --git a/designer-base/src/main/java/com/fr/design/menu/NameSeparator.java b/designer-base/src/main/java/com/fr/design/menu/NameSeparator.java index b64f133267..5ad5581181 100644 --- a/designer-base/src/main/java/com/fr/design/menu/NameSeparator.java +++ b/designer-base/src/main/java/com/fr/design/menu/NameSeparator.java @@ -1,5 +1,6 @@ package com.fr.design.menu; +import com.fine.theme.utils.FineUIScale; import com.fr.base.GraphHelper; import com.fr.design.actions.UpdateAction; import com.fr.design.gui.ilable.UILabel; @@ -52,11 +53,11 @@ public class NameSeparator extends UpdateAction { } public Dimension getSize() { - return new Dimension(super.getSize().width, 30); + return new Dimension(super.getSize().width, FineUIScale.scale(30)); } public Dimension getPreferredSize() { - return new Dimension(super.getPreferredSize().width, 30); + return new Dimension(super.getPreferredSize().width, FineUIScale.scale(30)); } } 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 09ecfa90d3..5c5f2e51b2 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 @@ -1,6 +1,7 @@ package com.fr.design.report; import com.fine.theme.utils.FineUIScale; +import com.formdev.flatlaf.util.ScaledEmptyBorder; import com.fr.design.beans.BasicBeanPane; import com.fr.design.dialog.FineJOptionPane; import com.fr.design.editor.editor.IntegerEditor; @@ -48,6 +49,7 @@ import static com.fine.swing.ui.layout.Layouts.cell; import static com.fine.swing.ui.layout.Layouts.column; import static com.fine.swing.ui.layout.Layouts.row; import static com.fine.swing.ui.layout.Layouts.box; +import static com.fine.swing.ui.layout.Layouts.fix; import static com.fine.theme.utils.FineUIUtils.wrapComponentWithTitle; import static com.fine.theme.utils.FineUIScale.scale; @@ -92,7 +94,7 @@ public class ReportEnginePane extends BasicBeanPane { outAdvicePane.setPreferredSize(new Dimension(FineUIScale.scale(600), FineUIScale.scale(160))); outAdvicePane.add(createAdvicePane()); - this.add(column(10, + 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(outAdvicePane, Toolkit.i18nText("Fine-Design_Report_Advice")))) @@ -135,7 +137,8 @@ public class ReportEnginePane extends BasicBeanPane { * 目前先屏蔽,后面新引擎显示页码再加上相关代码 */ private void createEngineXSettingPane() { - outEngineXSettingPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_New_Engine")); + outEngineXSettingPane = new JPanel(new BorderLayout()); + UILabel title = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_New_Engine")); JPanel engineXSettingPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_M_Pane(); JPanel pageQueryBoxPanel = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); engineXPageQueryBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Report_Fixed_Line_Paging")); @@ -151,17 +154,26 @@ public class ReportEnginePane extends BasicBeanPane { rowCountBox.setSelected(false); rowCountPanel.add(rowCountBox); JPanel tip = createTipPane(Toolkit.i18nText("Fine-Design_Report_Engine_X_tip")); - engineXSettingPane.add(column(10, - cell(pageQueryBoxPanel), - cell(engineXPageQueryPane), - cell(rowCountPanel), - cell(tip)) + engineXSettingPane.add(row(20, + column(10, + column(fix(6), cell(title)), + cell(new UILabel()), + cell(new UILabel()), + cell(new UILabel()) + ), + + column(10, + cell(pageQueryBoxPanel), + cell(engineXPageQueryPane), + cell(rowCountPanel), + cell(tip))) .getComponent()); outEngineXSettingPane.add(engineXSettingPane); } private void createLineEngineSettingPane() { - outLineEngineSettingPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Line_Engine")); + outLineEngineSettingPane = new JPanel(new BorderLayout()); + UILabel title = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Line_Engine")); JPanel lineEngineSettingPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_M_Pane(); JPanel pageQueryBoxPanel = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); lineEnginePageQueryBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Report_Fixed_Line_Paging")); @@ -174,10 +186,15 @@ public class ReportEnginePane extends BasicBeanPane { lineEngineSettingPane.add(lineEnginePageQueryPane); lineEnginePageQueryBox.addActionListener(new SelectActionListener(lineEnginePageQueryBox, lineEnginePageQueryPane)); JPanel tipPane = createTipPane(Toolkit.i18nText("Fine-Design_Report_Line_Engine_tip")); - lineEngineSettingPane.add(column(10, - cell(pageQueryBoxPanel), - cell(lineEnginePageQueryPane), - cell(tipPane)) + 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))) .getComponent()); outLineEngineSettingPane.add(lineEngineSettingPane); } @@ -191,12 +208,12 @@ public class ReportEnginePane extends BasicBeanPane { } private JPanel createPageQueryPane(IntegerEditor countPerPageEditor) { - double p = TableLayout.PREFERRED; - double rowSize[] = {p, p}; - double columnSize[] = {p, p}; - Component[][] components = {{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_LayerPageReport_Count_PerPage")), countPerPageEditor}}; - JPanel pageQueryPane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); - pageQueryPane.setBorder(BorderFactory.createEmptyBorder(5, 15, 0, 0)); + JPanel pageQueryPane = new JPanel(new BorderLayout()); + pageQueryPane.setBorder(new ScaledEmptyBorder(0, 8, 0, 0)); + pageQueryPane.add(row(4, + cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_LayerPageReport_Count_PerPage"))), + cell(countPerPageEditor) + ).getComponent()); return pageQueryPane; } @@ -242,16 +259,9 @@ public class ReportEnginePane extends BasicBeanPane { buttonGroup.add(lineEngine); radioButtons.add(newEngine); radioButtons.add(lineEngine); - double p = TableLayout.FILL; - double[] rowSize = {p}; - double[] columnSize = {p, p, p, p, p}; - Component[][] components = new Component[][]{ - new Component[]{ - newEngine, - lineEngine - } - }; - JPanel pagingEngineRadioPanel = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); + + JPanel pagingEngineRadioPanel = new JPanel(new BorderLayout()); + pagingEngineRadioPanel.add(row(20, cell(newEngine), cell(lineEngine)).getComponent()); newEngine.addActionListener(new EngineSelectActionListener(newEngine, engineSettingPane, outEngineXSettingPane, outLineEngineSettingPane)); lineEngine.addActionListener(new EngineSelectActionListener(lineEngine, engineSettingPane, outLineEngineSettingPane, outEngineXSettingPane)); return pagingEngineRadioPanel; From d92d0e7b181189c8e70092a903f64f0332f7aa7d Mon Sep 17 00:00:00 2001 From: renekton Date: Mon, 5 Aug 2024 14:28:47 +0800 Subject: [PATCH 7/8] fr --- .../com/fr/design/formula/FunctionManagerPane.java | 2 +- .../com/fine/theme/icon/param/advanced_editor.svg | 4 ---- .../com/fine/theme/icon/widget/user_widget.svg | 10 ---------- .../com/fine/theme/light/ui/fine_light.icon.json | 1 + .../com/fr/design/images/edit/advancedEditor.svg | 4 ---- .../java/com/fr/design/headerfooter/HFComponent.java | 2 +- 6 files changed, 3 insertions(+), 20 deletions(-) delete mode 100644 designer-base/src/main/resources/com/fine/theme/icon/param/advanced_editor.svg delete mode 100644 designer-base/src/main/resources/com/fine/theme/icon/widget/user_widget.svg delete mode 100644 designer-base/src/main/resources/com/fr/design/images/edit/advancedEditor.svg diff --git a/designer-base/src/main/java/com/fr/design/formula/FunctionManagerPane.java b/designer-base/src/main/java/com/fr/design/formula/FunctionManagerPane.java index 2acf6e772a..f1e15bf4a1 100644 --- a/designer-base/src/main/java/com/fr/design/formula/FunctionManagerPane.java +++ b/designer-base/src/main/java/com/fr/design/formula/FunctionManagerPane.java @@ -104,7 +104,7 @@ public class FunctionManagerPane extends BasicPane { @Override public NameableCreator[] createNameableCreators() { NameableCreator funcDef = new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Function"), - new LazyIcon("param"), FunctionDef.class, FunctionContentPane.class); + new LazyIcon("page_query"), FunctionDef.class, FunctionContentPane.class); return new NameableCreator[]{funcDef}; } diff --git a/designer-base/src/main/resources/com/fine/theme/icon/param/advanced_editor.svg b/designer-base/src/main/resources/com/fine/theme/icon/param/advanced_editor.svg deleted file mode 100644 index 84c516886f..0000000000 --- a/designer-base/src/main/resources/com/fine/theme/icon/param/advanced_editor.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/designer-base/src/main/resources/com/fine/theme/icon/widget/user_widget.svg b/designer-base/src/main/resources/com/fine/theme/icon/widget/user_widget.svg deleted file mode 100644 index af4281adf2..0000000000 --- a/designer-base/src/main/resources/com/fine/theme/icon/widget/user_widget.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - 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 9a2987e2d7..1aeb2eef61 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 @@ -146,6 +146,7 @@ "image": "insert/image.svg", "bias": "insert/bias.svg", "sub_report": "insert/sub_report.svg", + "float_normal": "insert/float_normal.svg", "popup": { "normal": "popup/popup.svg" }, diff --git a/designer-base/src/main/resources/com/fr/design/images/edit/advancedEditor.svg b/designer-base/src/main/resources/com/fr/design/images/edit/advancedEditor.svg deleted file mode 100644 index 84c516886f..0000000000 --- a/designer-base/src/main/resources/com/fr/design/images/edit/advancedEditor.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/designer-realize/src/main/java/com/fr/design/headerfooter/HFComponent.java b/designer-realize/src/main/java/com/fr/design/headerfooter/HFComponent.java index 4de5de08bb..a81f4a5667 100644 --- a/designer-realize/src/main/java/com/fr/design/headerfooter/HFComponent.java +++ b/designer-realize/src/main/java/com/fr/design/headerfooter/HFComponent.java @@ -297,7 +297,7 @@ public class HFComponent extends UILabel implements MoveActionListener { } else if (hfElement.getClass().equals(ImageHFElement.class)) { return new LazyIcon("image"); } else if (hfElement.getClass().equals(NewLineHFElement.class)) { - return new LazyIcon("newline"); + return new LazyIcon("new_line"); } return BaseUtils.readIcon("/com/fr/base/images/dialog/headerfooter/undefined.png"); From 8293d72b173eadb58260ea7e6dff64b95aba2289 Mon Sep 17 00:00:00 2001 From: renekton Date: Mon, 5 Aug 2024 14:32:58 +0800 Subject: [PATCH 8/8] fr --- .../com/fine/theme/icon/function_manage.svg | 7 ------- .../resources/com/fine/theme/icon/newline.svg | 3 --- .../main/resources/com/fine/theme/icon/page.svg | 3 --- .../com/fr/design/images/server/global_param.png | Bin 730 -> 0 bytes .../com/fr/design/images/server/global_param.svg | 7 ------- 5 files changed, 20 deletions(-) delete mode 100644 designer-base/src/main/resources/com/fine/theme/icon/function_manage.svg delete mode 100644 designer-base/src/main/resources/com/fine/theme/icon/newline.svg delete mode 100644 designer-base/src/main/resources/com/fine/theme/icon/page.svg delete mode 100644 designer-base/src/main/resources/com/fr/design/images/server/global_param.png delete mode 100644 designer-base/src/main/resources/com/fr/design/images/server/global_param.svg diff --git a/designer-base/src/main/resources/com/fine/theme/icon/function_manage.svg b/designer-base/src/main/resources/com/fine/theme/icon/function_manage.svg deleted file mode 100644 index 4b0ee94ec5..0000000000 --- a/designer-base/src/main/resources/com/fine/theme/icon/function_manage.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/designer-base/src/main/resources/com/fine/theme/icon/newline.svg b/designer-base/src/main/resources/com/fine/theme/icon/newline.svg deleted file mode 100644 index 6236b57ed3..0000000000 --- a/designer-base/src/main/resources/com/fine/theme/icon/newline.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/designer-base/src/main/resources/com/fine/theme/icon/page.svg b/designer-base/src/main/resources/com/fine/theme/icon/page.svg deleted file mode 100644 index 6ba88c97d1..0000000000 --- a/designer-base/src/main/resources/com/fine/theme/icon/page.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/designer-base/src/main/resources/com/fr/design/images/server/global_param.png b/designer-base/src/main/resources/com/fr/design/images/server/global_param.png deleted file mode 100644 index f449cba6f469f1e096a6a8f7371605e92001cc89..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 730 zcmV<00ww*4P)opzQ$?F3?_}Z~(YKn>6d}*f~b5valeQ zfcJ(O{~+6SY)qWCi+qyv^5*@`o1gCuz!oX&cAT+%umP;vdneboVRIu@%H7mM6^>j7(X5r?*q9+^e*sju1jZW<)C4F zsHH&2joC!W0EuRg0_ZOmH@@|B-$uiH&Emt9(k>!hYo$lQ*Qwij-aT06_eggV3a%T3 zyzVWlTAD$u$moYV8Rq3{$ABEp&8ZyD7P%zSeYt>qzYTT3?g{grX?XD1?jGM#EVo%L z3&dt0M+d+#@WzE)Z?*T25Y6||Jl#*n%YOwSk>a3ZMl+3pgo)gI=}lHXG&0v}J00eM zV?-1y^pmj)7f_*8DVRx%fG?!|rSv&ez_RFEo_k)^Yqh$6W2Mvr%lX8Ca{WRDetw(I zpaP386MxrsTv-!XBcyWO zRl_h8T9&<~C^1d*W3m>ZVTcRjJeTXvBR55eV!^oJsJ&t - - - - - -