From 9c31c6a877ade12c8e8d16b40adebc63b3891fcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E4=B8=96=E8=B1=AA?= <1944167742@qq.com> Date: Fri, 12 Jul 2024 16:38:41 +0800 Subject: [PATCH 01/10] =?UTF-8?q?=E6=8A=A5=E8=A1=A8=E5=BC=95=E6=93=8E?= =?UTF-8?q?=E5=B1=9E=E6=80=A7=E5=BC=B9=E7=AA=97=E7=BF=BB=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/report/ReportEnginePane.java | 106 +++++++++++++----- 1 file changed, 77 insertions(+), 29 deletions(-) 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 9ae4983227..86a1cd5e9a 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,5 +1,7 @@ package com.fr.design.report; +import com.fine.swing.ui.layout.Layouts; +import com.fine.theme.utils.FineUIUtils; import com.fr.design.beans.BasicBeanPane; import com.fr.design.dialog.FineJOptionPane; import com.fr.design.editor.editor.IntegerEditor; @@ -43,6 +45,7 @@ import java.net.URI; import java.net.URISyntaxException; import java.util.ArrayList; import java.util.List; +import com.fr.design.i18n.Toolkit; /** * @author fly.li @@ -77,36 +80,54 @@ public class ReportEnginePane extends BasicBeanPane { protected void initComponents() { this.setLayout(FRGUIPaneFactory.createBorderLayout()); - JPanel outReportEnginePane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Report_Engine_Attribute")); + //JPanel outReportEnginePane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Report_Engine_Attribute")); + JPanel outReportEnginePane = new JPanel(); + outReportEnginePane.setLayout(FRGUIPaneFactory.createBorderLayout()); outReportEnginePane.setPreferredSize(new Dimension(600, 370)); - this.add(outReportEnginePane, BorderLayout.NORTH); + //this.add(outReportEnginePane, BorderLayout.NORTH); outReportEnginePane.add(createReportEnginePane()); - JPanel outAdvicePane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Advice")); - this.add(outAdvicePane, BorderLayout.SOUTH); - outAdvicePane.setPreferredSize(new Dimension(600, 150)); + //JPanel outAdvicePane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Advice")); + //this.add(outAdvicePane, BorderLayout.SOUTH); + JPanel outAdvicePane = new JPanel(); + outAdvicePane.setLayout(FRGUIPaneFactory.createBorderLayout()); + outAdvicePane.setPreferredSize(new Dimension(600, 160)); outAdvicePane.add(createAdvicePane()); + + this.add(Layouts.column(20, + Layouts.cell(FineUIUtils.wrapComponentWithTitle(outReportEnginePane, Toolkit.i18nText("Fine-Design_Report_Report_Engine_Attribute"))), + Layouts.cell(FineUIUtils.wrapComponentWithTitle(outAdvicePane, Toolkit.i18nText("Fine-Design_Report_Advice")))) + .getComponent()); } private JPanel createReportEnginePane() { JPanel reportEnginePane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_M_Pane(); JPanel clientPagingPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); - clientPaging = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Enable_Client_Page")); + clientPaging = new UICheckBox(Toolkit.i18nText("Fine-Design_Report_Enable_Client_Page")); clientPaging.setSelected(false); - clientPagingPane.add(clientPaging); reportEnginePane.add(clientPagingPane); - outPagingEngineSelectPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Paging_Engine_Select")); - reportEnginePane.add(outPagingEngineSelectPane); + //reportEnginePane.add(Layouts.row(10, Layouts.cell(clientPagingPane)).getComponent()); + //outPagingEngineSelectPane = FRGUIPaneFactory.createTitledBorderPane(Toolkit.i18nText("Fine-Design_Report_Paging_Engine_Select")); + outPagingEngineSelectPane = new JPanel(); + outPagingEngineSelectPane.setLayout(FRGUIPaneFactory.createBorderLayout()); + //reportEnginePane.add(outPagingEngineSelectPane); outPagingEngineSelectPane.setVisible(false); outPagingEngineSelectPane.setPreferredSize(new Dimension(600, 300)); outPagingEngineSelectPane.add(createPagingEngineSelectPane()); clientPaging.addActionListener(new SelectActionListener(clientPaging, outPagingEngineSelectPane)); + clientPagingPane.add(clientPaging); + //reportEnginePane.add(outPagingEngineSelectPane); + //clientPagingPane.add(Layouts.box(Layouts.cell(clientPaging)).getComponent()); + reportEnginePane.add(Layouts.column(20, + Layouts.cell(clientPagingPane), + Layouts.cell(FineUIUtils.wrapComponentWithTitle(outPagingEngineSelectPane, Toolkit.i18nText("Fine-Design_Report_Paging_Engine_Select")))) + .getComponent()); return reportEnginePane; } private JPanel createPagingEngineSelectPane() { engineSettingPane = new JLayeredPane(); - engineSettingPane.setPreferredSize(new Dimension(570, 240)); - engineSettingPane.setBounds(0, 0, 570, 240); + engineSettingPane.setPreferredSize(new Dimension(600, 240)); + engineSettingPane.setBounds(0, 0, 600, 240); createEngineXSettingPane(); createLineEngineSettingPane(); outLineEngineSettingPane.setVisible(false); @@ -115,8 +136,13 @@ public class ReportEnginePane extends BasicBeanPane { engineSettingPane.moveToFront(outEngineXSettingPane); engineSettingPane.setVisible(true); JPanel pagingEngineSelectPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_M_Pane(); + //engineSettingPane.add(Layouts.column()) pagingEngineSelectPane.add(createPagingEngineRadioPanel()); pagingEngineSelectPane.add(engineSettingPane); + /*pagingEngineSelectPane.add(Layouts.column(10, + Layouts.cell(createPagingEngineSelectPane()), + Layouts.cell(engineSettingPane)) + .getComponent());*/ return pagingEngineSelectPane; } @@ -125,45 +151,58 @@ public class ReportEnginePane extends BasicBeanPane { */ private void createEngineXSettingPane() { outEngineXSettingPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_New_Engine")); - outEngineXSettingPane.setBounds(0, 0, 570, 240); + outEngineXSettingPane.setBounds(0, 0, 700, 200); JPanel engineXSettingPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_M_Pane(); JPanel pageQueryBoxPanel = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); - engineXPageQueryBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Fixed_Line_Paging")); + engineXPageQueryBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Report_Fixed_Line_Paging")); engineXPageQueryBox.setSelected(false); pageQueryBoxPanel.add(engineXPageQueryBox); - engineXSettingPane.add(pageQueryBoxPanel); + //engineXSettingPane.add(pageQueryBoxPanel); engineXCountPerPageEditor = new IntegerEditor(new Integer(30)); engineXCountPerPageEditor.setPreferredSize(new Dimension(120, 20)); engineXPageQueryPane = createPageQueryPane(engineXCountPerPageEditor); engineXPageQueryPane.setVisible(false); - engineXSettingPane.add(engineXPageQueryPane); + //engineXSettingPane.add(engineXPageQueryPane); engineXPageQueryBox.addActionListener(new SelectActionListener(engineXPageQueryBox, engineXPageQueryPane)); JPanel rowCountPanel = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); - rowCountBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Row_Count")); + rowCountBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Report_Row_Count")); rowCountBox.setSelected(false); rowCountPanel.add(rowCountBox); - engineXSettingPane.add(rowCountPanel); - engineXSettingPane.add(createTipPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Engine_X_tip"))); + //engineXSettingPane.add(rowCountPanel); + //engineXSettingPane.add(createTipPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Engine_X_tip"))); + JPanel tip = createTipPane(Toolkit.i18nText("Fine-Design_Report_Engine_X_tip")); + //engineXSettingPane.add(tip); + engineXSettingPane.add(Layouts.column(10, + Layouts.cell(pageQueryBoxPanel), + Layouts.cell(engineXPageQueryPane), + Layouts.cell(rowCountPanel), + Layouts.cell(tip)) + .getComponent()); outEngineXSettingPane.add(engineXSettingPane); } private void createLineEngineSettingPane() { outLineEngineSettingPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Line_Engine")); - outLineEngineSettingPane.setBounds(0, 0, 570, 240); + outLineEngineSettingPane.setBounds(0, 0, 700, 200); JPanel lineEngineSettingPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_M_Pane(); JPanel pageQueryBoxPanel = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); - lineEnginePageQueryBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Fixed_Line_Paging")); + lineEnginePageQueryBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Report_Fixed_Line_Paging")); lineEnginePageQueryBox.setSelected(false); pageQueryBoxPanel.add(lineEnginePageQueryBox); - lineEngineSettingPane.add(pageQueryBoxPanel); + //lineEngineSettingPane.add(pageQueryBoxPanel); lineEngineCountPerPageEditor = new IntegerEditor(new Integer(30)); lineEngineCountPerPageEditor.setPreferredSize(new Dimension(120, 20)); lineEnginePageQueryPane = createPageQueryPane(lineEngineCountPerPageEditor); lineEnginePageQueryPane.setVisible(false); lineEngineSettingPane.add(lineEnginePageQueryPane); lineEnginePageQueryBox.addActionListener(new SelectActionListener(lineEnginePageQueryBox, lineEnginePageQueryPane)); - JPanel tipPane = createTipPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Line_Engine_tip")); - lineEngineSettingPane.add(tipPane); + JPanel tipPane = createTipPane(Toolkit.i18nText("Fine-Design_Report_Line_Engine_tip")); + //lineEngineSettingPane.add(tipPane); + lineEngineSettingPane.add(Layouts.column(10, + Layouts.cell(pageQueryBoxPanel), + Layouts.cell(lineEnginePageQueryPane), + Layouts.cell(tipPane)) + .getComponent()); outLineEngineSettingPane.add(lineEngineSettingPane); } @@ -190,16 +229,16 @@ public class ReportEnginePane extends BasicBeanPane { // 上侧文字 UILabel topExplainLabel = FRWidgetFactory.createLineWrapLabel(Toolkit.i18nText("Fine-Design_Report_Report_Engine_Warnning_Info"), 480); topExplainLabel.setForeground(new Color(0, 0, 0)); - advicePane.add(topExplainLabel); + //advicePane.add(topExplainLabel); // 下侧文字及链接 JPanel adviceDownPane = FRGUIPaneFactory.createLeftFlowZeroGapBorderPane(); - advicePane.add(adviceDownPane); + //advicePane.add(adviceDownPane); UILabel downExplainLabel = new UILabel(Toolkit.i18nText("Fine-Design_Report_Report_Detail_Reference")); - adviceDownPane.add(downExplainLabel); + //adviceDownPane.add(downExplainLabel); downExplainLabel.setForeground(new Color(0, 0, 0)); JLabel helper = new FRExplainLabel(Toolkit.i18nText("Fine-Design_Report_Community_Help")); helper.setForeground(new Color(1, 159, 222)); - adviceDownPane.add(helper); + //adviceDownPane.add(helper); helper.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { @@ -211,6 +250,15 @@ public class ReportEnginePane extends BasicBeanPane { } } }); + adviceDownPane.add(Layouts.row(20, + Layouts.cell(downExplainLabel), + Layouts.cell(helper)) + .getComponent()); + advicePane.add(Layouts.column(20, + Layouts.cell(topExplainLabel), + Layouts.cell(adviceDownPane)) + .getComponent()); + return advicePane; } @@ -222,7 +270,7 @@ public class ReportEnginePane extends BasicBeanPane { buttonGroup.add(lineEngine); radioButtons.add(newEngine); radioButtons.add(lineEngine); - double p = TableLayout.PREFERRED; + double p = TableLayout.FILL; double[] rowSize = {p}; double[] columnSize = {p, p, p, p, p}; Component[][] components = new Component[][]{ @@ -239,7 +287,7 @@ public class ReportEnginePane extends BasicBeanPane { @Override protected String title4PopupWindow() { - return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Report_Engine_Attribute"); + return Toolkit.i18nText("Fine-Design_Report_Report_Engine_Attribute"); } @Override From 1d662d3efb2efd28a4b7876d34852f4874e2b437 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E4=B8=96=E8=B1=AA?= <1944167742@qq.com> Date: Mon, 15 Jul 2024 09:32:57 +0800 Subject: [PATCH 02/10] =?UTF-8?q?=E6=8A=A5=E8=A1=A8=E5=BC=95=E6=93=8E?= =?UTF-8?q?=E5=B1=9E=E6=80=A7=E5=BC=B9=E7=AA=97=E7=BF=BB=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/report/ReportEnginePane.java | 1 + 1 file changed, 1 insertion(+) 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 86a1cd5e9a..3b6e279c41 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 @@ -183,6 +183,7 @@ public class ReportEnginePane extends BasicBeanPane { private void createLineEngineSettingPane() { outLineEngineSettingPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Line_Engine")); + // TODO SCALE动态伸缩大小 outLineEngineSettingPane.setBounds(0, 0, 700, 200); JPanel lineEngineSettingPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_M_Pane(); JPanel pageQueryBoxPanel = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); From 6963a1308011f2b5c8f449aca00c89a4de20e668 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E4=B8=96=E8=B1=AA?= <1944167742@qq.com> Date: Wed, 17 Jul 2024 11:18:20 +0800 Subject: [PATCH 03/10] =?UTF-8?q?=E6=8A=A5=E8=A1=A8=E5=BC=95=E6=93=8E?= =?UTF-8?q?=E5=B1=9E=E6=80=A7=E5=BC=B9=E7=AA=97=E7=BF=BB=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle | 2 +- .../fr/design/data/datapane/ChoosePane.java | 27 ++++-- .../write/submit/DBManipulationPane.java | 69 +++++++++++---- .../fr/design/report/ReportEnginePane.java | 85 ++++++++----------- .../fr/design/report/WriteShortCutsPane.java | 47 ++++++---- .../write/submit/SubmitVisitorListPane.java | 19 ++++- 6 files changed, 153 insertions(+), 96 deletions(-) diff --git a/build.gradle b/build.gradle index 4ebe9558d3..9f6c3dd88b 100644 --- a/build.gradle +++ b/build.gradle @@ -90,8 +90,8 @@ allprojects { implementation 'com.github.weisj:jsvg:1.2.0' implementation 'com.formdev:flatlaf:3.4' implementation 'com.formdev:flatlaf-extras:3.4' - implementation 'com.fanruan.vito:gui-inspector:1.0.1' implementation 'com.fine.swing.ui:layout:1.0-SNAPSHOT' + implementation 'com.fanruan.vito:gui-inspector:1.0.2' testImplementation 'org.easymock:easymock:3.5.1' testImplementation 'org.powermock:powermock-module-junit4:1.7.1' testImplementation 'org.powermock:powermock-api-easymock:1.7.1' 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 99a294fdde..1011d3f254 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 @@ -1,5 +1,8 @@ package com.fr.design.data.datapane; +import com.fine.swing.ui.layout.Layouts; +import com.fine.theme.light.ui.FineRoundBorder; +import com.fine.theme.utils.FineUIScale; import com.fr.base.TableData; import com.fr.data.core.DataCoreUtils; import com.fr.data.core.db.DBUtils; @@ -11,6 +14,7 @@ import com.fr.data.impl.DBTableData; import com.fr.data.operator.DataOperator; import com.fr.design.DesignerEnvManager; import com.fr.design.beans.BasicBeanPane; +import com.fr.design.border.FineBorderFactory; import com.fr.design.data.DesignTableDataManager; import com.fr.design.data.datapane.RefreshLabel.Refreshable; import com.fr.design.data.datapane.preview.PreviewLabel; @@ -39,6 +43,7 @@ import com.fr.log.FineLoggerFactory; import com.fr.stable.StringUtils; import com.fr.workspace.WorkContext; import com.fr.workspace.server.connection.DBConnectAuth; +import groovy.swing.factory.BoxLayoutFactory; import javax.swing.JList; import javax.swing.JOptionPane; @@ -54,9 +59,7 @@ import javax.swing.tree.DefaultTreeCellRenderer; import javax.swing.tree.DefaultTreeModel; import javax.swing.tree.TreeCellRenderer; import javax.swing.tree.TreePath; -import java.awt.BorderLayout; -import java.awt.Component; -import java.awt.Dimension; +import java.awt.*; import java.awt.event.FocusAdapter; import java.awt.event.FocusEvent; import java.awt.event.ItemEvent; @@ -68,6 +71,10 @@ import java.util.List; import java.util.Set; import java.util.concurrent.CancellationException; +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.scale; + /** * @author zhou * @since 2012-7-11下午4:49:39 @@ -133,11 +140,11 @@ public class ChoosePane extends BasicBeanPane implements Refresha } public ChoosePane(Previewable parent, int labelSize) { - this.initBasicComponet(); + this.initBasicComponent(); this.initComponentsLayout(new PreviewLabel(parent == null ? this : parent), labelSize); } - private void initBasicComponet() { + private void initBasicComponent() { this.setLayout(FRGUIPaneFactory.createBorderLayout()); dsNameComboBox = new StringUIComboBox(); @@ -239,7 +246,15 @@ public class ChoosePane extends BasicBeanPane implements Refresha double p = TableLayout.PREFERRED; double f = TableLayout.FILL; JPanel northDSPane = TableLayoutHelper.createTableLayoutPane(coms, new double[]{p}, new double[]{p, f, p, f, p, f, COLUMN_SIZE, COLUMN_SIZE}); - + //JPanel northDSPane = new JPanel(new BorderLayout()); + + /*northDSPane.add( + row(10, + row(5, cell(l1), cell(dsNameComboBox)), + row(5, cell(l2), cell(schemaBox)), + row(5, cell(l3), cell(tableNameComboBox)), + row(5, cell(new RefreshLabel(this)), cell(previewLabel))) + .getComponent());*/ this.add(northDSPane, BorderLayout.CENTER); } 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 46b11d2a89..103156944d 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 @@ -1,8 +1,11 @@ package com.fr.design.write.submit; +import com.fine.swing.ui.layout.Layouts; +import com.fine.theme.utils.FineUIScale; import com.fr.base.BaseFormula; import com.fr.base.BaseUtils; import com.fr.base.Parameter; +import com.fr.cert.token.lang.Collections; import com.fr.data.DataConstants; import com.fr.data.condition.JoinCondition; import com.fr.data.condition.ListCondition; @@ -25,11 +28,14 @@ import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.icombobox.UIComboBoxRenderer; +import com.fr.design.gui.icontainer.UIScrollPane; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilist.CheckBoxList; import com.fr.design.gui.itree.refreshabletree.ExpandMutableTreeNode; import com.fr.design.javascript.JavaScriptActionPane; import com.fr.design.layout.FRGUIPaneFactory; +import com.fr.design.layout.FRLeftFlowLayout; +import com.fr.design.layout.LeftCenterRightLayout; import com.fr.design.mainframe.DesignerContext; import com.fr.design.scrollruler.ModLineBorder; import com.fr.design.utils.gui.GUICoreUtils; @@ -83,9 +89,15 @@ import java.awt.event.ItemListener; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.util.ArrayList; +import java.util.Arrays; import java.util.Date; import java.util.EventObject; import java.util.List; +import java.util.stream.Collectors; + +import static com.fine.swing.ui.layout.Layouts.row; +import static com.fine.swing.ui.layout.Layouts.cell; +import static com.fine.swing.ui.layout.Layouts.column; //august:这个东西应该分成两类,一类是有单元格的情况,一类是没有单元格的情况 public class DBManipulationPane extends BasicBeanPane { @@ -140,32 +152,45 @@ public class DBManipulationPane extends BasicBeanPane { this.v_Types = v_Types; JPanel northPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); - this.add(northPane, BorderLayout.NORTH); + //this.add(northPane, BorderLayout.NORTH); dmlConfigComboBox = new UIComboBox(DML_CONFIG_TYPES); - JPanel typePane = GUICoreUtils.createFlowPane(new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Write_Choose_Submit_Type") + ":"), dmlConfigComboBox}, - FlowLayout.LEFT, 10); + //JPanel typePane = GUICoreUtils.createFlowPane(new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Write_Choose_Submit_Type") + ":"), dmlConfigComboBox}, + // FlowLayout.LEFT, 10); + 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(dmlConfigComboBox)).getComponent(), BorderLayout.WEST); typePane.setBorder(BorderFactory.createTitledBorder(new ModLineBorder(ModLineBorder.TOP), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Write_Submit_Type"))); - northPane.add(typePane, BorderLayout.NORTH); - + //northPane.add(typePane, BorderLayout.NORTH); 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); - northPane.add(chooseTable, BorderLayout.CENTER); + //northPane.add(chooseTable, BorderLayout.CENTER); // peter:编辑的TablePane JPanel editTablePane = FRGUIPaneFactory.createBorderLayout_S_Pane(); - this.add(editTablePane, BorderLayout.CENTER); - editTablePane.setBorder(BorderFactory.createTitledBorder(new ModLineBorder(ModLineBorder.TOP), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Base_Value"))); - + //this.add(editTablePane, BorderLayout.CENTER); + 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 JScrollPane(this.keyColumnValuesTable), BorderLayout.CENTER); + editTablePane.add(new UIScrollPane(this.keyColumnValuesTable), BorderLayout.CENTER); keyColumnValuesTable.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); - keyColumnValuesTable.setPreferredScrollableViewportSize(new Dimension(280, 180)); + keyColumnValuesTable.setPreferredScrollableViewportSize(new Dimension(280, 150)); keyColumnValuesTable.setShowHorizontalLines(true); + northPane.add(column(10, true, + cell(typePane), + cell(chooseTable)) + .getComponent()); + + this.add(column(10, true, + cell(northPane), + cell(editTablePane)) + .getComponent()); + initJTableColumn(); addButtons(editTablePane); @@ -187,15 +212,18 @@ public class DBManipulationPane extends BasicBeanPane { // alex:添加操作按钮 UpdateAction[] actions = this.getActions(); if (actions != null && actions.length > 0) { - JPanel controlBtnPane = new JPanel(new GridLayout(actions.length + 1, 1, 4, 4)); + JPanel controlBtnPane = new JPanel(new BorderLayout()); editTablePane.add(GUICoreUtils.createBorderPane(controlBtnPane, BorderLayout.NORTH), BorderLayout.EAST); - - for (UpdateAction action : actions) { + List buttonGroup = Arrays.stream(actions).map(action -> cell(new UIButton(action))).collect(Collectors.toList()); + /*for (UpdateAction action : actions) { controlBtnPane.add(new UIButton(action)); - } + }*/ + checkBoxUpdatePane = new JPanel(new BorderLayout(0, 0)); checkBoxUpdatePane.setPreferredSize(new Dimension(120, 20)); - controlBtnPane.add(checkBoxUpdatePane); + //buttonGroup.add(cell(checkBoxUpdatePane)); + //controlBtnPane.add(column(5, buttonGroup.toArray(new Layouts.Cell[0])).getComponent()); + //controlBtnPane.add(checkBoxUpdatePane); UpdateCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_RWA_NotChange_Unmodified")); UIButton helpButton = new UIButton(HEIP_ICON); @@ -211,8 +239,13 @@ public class DBManipulationPane extends BasicBeanPane { } }); helpButton.set4ToolbarButton(); - checkBoxUpdatePane.add(UpdateCheckBox, BorderLayout.WEST); - checkBoxUpdatePane.add(helpButton, BorderLayout.EAST); + //checkBoxUpdatePane.add(UpdateCheckBox, BorderLayout.WEST); + //checkBoxUpdatePane.add(helpButton, BorderLayout.EAST); + buttonGroup.add(row(5, cell(UpdateCheckBox), + cell(helpButton))); + //checkBoxUpdatePane.add(row(5, cell(UpdateCheckBox), + // cell(helpButton)).getComponent()); + controlBtnPane.add(column(5, buttonGroup.toArray(new Layouts.Cell[0])).getComponent()); } } 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 3b6e279c41..68decd16c1 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.swing.ui.layout.Layouts; +import com.fine.theme.utils.FineUIScale; import com.fine.theme.utils.FineUIUtils; import com.fr.design.beans.BasicBeanPane; import com.fr.design.dialog.FineJOptionPane; @@ -47,6 +48,11 @@ import java.util.ArrayList; import java.util.List; import com.fr.design.i18n.Toolkit; +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.theme.utils.FineUIUtils.wrapComponentWithTitle; + /** * @author fly.li * @version 10.0 @@ -80,22 +86,18 @@ public class ReportEnginePane extends BasicBeanPane { protected void initComponents() { this.setLayout(FRGUIPaneFactory.createBorderLayout()); - //JPanel outReportEnginePane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Report_Engine_Attribute")); JPanel outReportEnginePane = new JPanel(); outReportEnginePane.setLayout(FRGUIPaneFactory.createBorderLayout()); - outReportEnginePane.setPreferredSize(new Dimension(600, 370)); - //this.add(outReportEnginePane, BorderLayout.NORTH); + outReportEnginePane.setPreferredSize(new Dimension(FineUIScale.scale(600), FineUIScale.scale(370))); outReportEnginePane.add(createReportEnginePane()); - //JPanel outAdvicePane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Advice")); - //this.add(outAdvicePane, BorderLayout.SOUTH); JPanel outAdvicePane = new JPanel(); outAdvicePane.setLayout(FRGUIPaneFactory.createBorderLayout()); - outAdvicePane.setPreferredSize(new Dimension(600, 160)); + outAdvicePane.setPreferredSize(new Dimension(FineUIScale.scale(600), FineUIScale.scale(160))); outAdvicePane.add(createAdvicePane()); - this.add(Layouts.column(20, - Layouts.cell(FineUIUtils.wrapComponentWithTitle(outReportEnginePane, Toolkit.i18nText("Fine-Design_Report_Report_Engine_Attribute"))), - Layouts.cell(FineUIUtils.wrapComponentWithTitle(outAdvicePane, Toolkit.i18nText("Fine-Design_Report_Advice")))) + this.add(column(20, true, + cell(wrapComponentWithTitle(outReportEnginePane, Toolkit.i18nText("Fine-Design_Report_Report_Engine_Attribute"))), + cell(wrapComponentWithTitle(outAdvicePane, Toolkit.i18nText("Fine-Design_Report_Advice")))) .getComponent()); } @@ -105,29 +107,24 @@ public class ReportEnginePane extends BasicBeanPane { clientPaging = new UICheckBox(Toolkit.i18nText("Fine-Design_Report_Enable_Client_Page")); clientPaging.setSelected(false); reportEnginePane.add(clientPagingPane); - //reportEnginePane.add(Layouts.row(10, Layouts.cell(clientPagingPane)).getComponent()); - //outPagingEngineSelectPane = FRGUIPaneFactory.createTitledBorderPane(Toolkit.i18nText("Fine-Design_Report_Paging_Engine_Select")); outPagingEngineSelectPane = new JPanel(); outPagingEngineSelectPane.setLayout(FRGUIPaneFactory.createBorderLayout()); - //reportEnginePane.add(outPagingEngineSelectPane); outPagingEngineSelectPane.setVisible(false); - outPagingEngineSelectPane.setPreferredSize(new Dimension(600, 300)); + outPagingEngineSelectPane.setPreferredSize(new Dimension(FineUIScale.scale(600), FineUIScale.scale(300))); outPagingEngineSelectPane.add(createPagingEngineSelectPane()); clientPaging.addActionListener(new SelectActionListener(clientPaging, outPagingEngineSelectPane)); clientPagingPane.add(clientPaging); - //reportEnginePane.add(outPagingEngineSelectPane); - //clientPagingPane.add(Layouts.box(Layouts.cell(clientPaging)).getComponent()); - reportEnginePane.add(Layouts.column(20, - Layouts.cell(clientPagingPane), - Layouts.cell(FineUIUtils.wrapComponentWithTitle(outPagingEngineSelectPane, Toolkit.i18nText("Fine-Design_Report_Paging_Engine_Select")))) + reportEnginePane.add(column(10, true, + cell(clientPagingPane), + cell(wrapComponentWithTitle(outPagingEngineSelectPane, Toolkit.i18nText("Fine-Design_Report_Paging_Engine_Select")))) .getComponent()); return reportEnginePane; } private JPanel createPagingEngineSelectPane() { engineSettingPane = new JLayeredPane(); - engineSettingPane.setPreferredSize(new Dimension(600, 240)); - engineSettingPane.setBounds(0, 0, 600, 240); + engineSettingPane.setPreferredSize(new Dimension(FineUIScale.scale(600), FineUIScale.scale(240))); + engineSettingPane.setBounds(0, 0, FineUIScale.scale(600), FineUIScale.scale(240)); createEngineXSettingPane(); createLineEngineSettingPane(); outLineEngineSettingPane.setVisible(false); @@ -136,7 +133,6 @@ public class ReportEnginePane extends BasicBeanPane { engineSettingPane.moveToFront(outEngineXSettingPane); engineSettingPane.setVisible(true); JPanel pagingEngineSelectPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_M_Pane(); - //engineSettingPane.add(Layouts.column()) pagingEngineSelectPane.add(createPagingEngineRadioPanel()); pagingEngineSelectPane.add(engineSettingPane); /*pagingEngineSelectPane.add(Layouts.column(10, @@ -151,32 +147,27 @@ public class ReportEnginePane extends BasicBeanPane { */ private void createEngineXSettingPane() { outEngineXSettingPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_New_Engine")); - outEngineXSettingPane.setBounds(0, 0, 700, 200); + outEngineXSettingPane.setBounds(0, 0, FineUIScale.scale(600), FineUIScale.scale(180)); JPanel engineXSettingPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_M_Pane(); JPanel pageQueryBoxPanel = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); engineXPageQueryBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Report_Fixed_Line_Paging")); engineXPageQueryBox.setSelected(false); pageQueryBoxPanel.add(engineXPageQueryBox); - //engineXSettingPane.add(pageQueryBoxPanel); engineXCountPerPageEditor = new IntegerEditor(new Integer(30)); - engineXCountPerPageEditor.setPreferredSize(new Dimension(120, 20)); + engineXCountPerPageEditor.setPreferredSize(new Dimension(FineUIScale.scale(120), FineUIScale.scale(20))); engineXPageQueryPane = createPageQueryPane(engineXCountPerPageEditor); engineXPageQueryPane.setVisible(false); - //engineXSettingPane.add(engineXPageQueryPane); engineXPageQueryBox.addActionListener(new SelectActionListener(engineXPageQueryBox, engineXPageQueryPane)); JPanel rowCountPanel = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); rowCountBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Report_Row_Count")); rowCountBox.setSelected(false); rowCountPanel.add(rowCountBox); - //engineXSettingPane.add(rowCountPanel); - //engineXSettingPane.add(createTipPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Engine_X_tip"))); JPanel tip = createTipPane(Toolkit.i18nText("Fine-Design_Report_Engine_X_tip")); - //engineXSettingPane.add(tip); - engineXSettingPane.add(Layouts.column(10, - Layouts.cell(pageQueryBoxPanel), - Layouts.cell(engineXPageQueryPane), - Layouts.cell(rowCountPanel), - Layouts.cell(tip)) + engineXSettingPane.add(column(10, + cell(pageQueryBoxPanel), + cell(engineXPageQueryPane), + cell(rowCountPanel), + cell(tip)) .getComponent()); outEngineXSettingPane.add(engineXSettingPane); } @@ -184,13 +175,12 @@ public class ReportEnginePane extends BasicBeanPane { private void createLineEngineSettingPane() { outLineEngineSettingPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Line_Engine")); // TODO SCALE动态伸缩大小 - outLineEngineSettingPane.setBounds(0, 0, 700, 200); + outLineEngineSettingPane.setBounds(0, 0, FineUIScale.scale(600), FineUIScale.scale(200)); JPanel lineEngineSettingPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_M_Pane(); JPanel pageQueryBoxPanel = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); lineEnginePageQueryBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Report_Fixed_Line_Paging")); lineEnginePageQueryBox.setSelected(false); pageQueryBoxPanel.add(lineEnginePageQueryBox); - //lineEngineSettingPane.add(pageQueryBoxPanel); lineEngineCountPerPageEditor = new IntegerEditor(new Integer(30)); lineEngineCountPerPageEditor.setPreferredSize(new Dimension(120, 20)); lineEnginePageQueryPane = createPageQueryPane(lineEngineCountPerPageEditor); @@ -198,11 +188,10 @@ 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(tipPane); - lineEngineSettingPane.add(Layouts.column(10, - Layouts.cell(pageQueryBoxPanel), - Layouts.cell(lineEnginePageQueryPane), - Layouts.cell(tipPane)) + lineEngineSettingPane.add(column(10, + cell(pageQueryBoxPanel), + cell(lineEnginePageQueryPane), + cell(tipPane)) .getComponent()); outLineEngineSettingPane.add(lineEngineSettingPane); } @@ -230,16 +219,12 @@ public class ReportEnginePane extends BasicBeanPane { // 上侧文字 UILabel topExplainLabel = FRWidgetFactory.createLineWrapLabel(Toolkit.i18nText("Fine-Design_Report_Report_Engine_Warnning_Info"), 480); topExplainLabel.setForeground(new Color(0, 0, 0)); - //advicePane.add(topExplainLabel); // 下侧文字及链接 JPanel adviceDownPane = FRGUIPaneFactory.createLeftFlowZeroGapBorderPane(); - //advicePane.add(adviceDownPane); UILabel downExplainLabel = new UILabel(Toolkit.i18nText("Fine-Design_Report_Report_Detail_Reference")); - //adviceDownPane.add(downExplainLabel); downExplainLabel.setForeground(new Color(0, 0, 0)); JLabel helper = new FRExplainLabel(Toolkit.i18nText("Fine-Design_Report_Community_Help")); helper.setForeground(new Color(1, 159, 222)); - //adviceDownPane.add(helper); helper.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { @@ -251,13 +236,13 @@ public class ReportEnginePane extends BasicBeanPane { } } }); - adviceDownPane.add(Layouts.row(20, - Layouts.cell(downExplainLabel), - Layouts.cell(helper)) + adviceDownPane.add(row(20, + cell(downExplainLabel), + cell(helper)) .getComponent()); - advicePane.add(Layouts.column(20, - Layouts.cell(topExplainLabel), - Layouts.cell(adviceDownPane)) + advicePane.add(column(20, + cell(topExplainLabel), + cell(adviceDownPane)) .getComponent()); return advicePane; 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 f48061d33a..e1887084d2 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 @@ -14,15 +14,15 @@ import com.fr.transaction.WorkerAdaptor; import javax.swing.BorderFactory; import javax.swing.JPanel; 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.*; 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.flex; +import static com.fine.swing.ui.layout.Layouts.row; + public class WriteShortCutsPane extends JPanel{ private static final int V_GAP = 20; @@ -51,15 +51,18 @@ public class WriteShortCutsPane extends JPanel{ contentPane.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 10)); // 纵向布局,横向自适应 - contentPane.setLayout(new GridBagLayout()); + /*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); + cons.insets = new Insets(20, 0, 0, 0);*/ + contentPane.setLayout(new BorderLayout()); + contentPane.add(column(10, true, + cell(getFeatureNamePane()), + cell(getHintsPane())).getComponent()); + //contentPane.add(getFeatureNamePane()); + //contentPane.add(getHintsPane()); return contentPane; } @@ -77,16 +80,20 @@ public class WriteShortCutsPane extends JPanel{ JPanel switchBtnPane = getSwitchBtnPane(); nextRowHK = new UILabel(nextRowString, SwingConstants.CENTER); - JPanel centerPane = new JPanel(new GridLayout(2, 4, 0, 0)); + JPanel centerPane = new JPanel(new FlowLayout(FlowLayout.CENTER)); centerPane.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0)); - centerPane.add(name); + /*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); + centerPane.add(nextRowHK);*/ + centerPane.add(column(20, true, + row(50, cell(name), cell(nextCol), flex(50), cell(nextRow)), + row(50, cell(shortName), cell(nextColHK), cell(switchBtnPane), cell(nextRowHK)) + ).getComponent()); featureNamePane.add(centerPane, BorderLayout.CENTER); @@ -116,16 +123,22 @@ public class WriteShortCutsPane extends JPanel{ preCol = new UILabel("Shift+" + nextColString, SwingConstants.CENTER); preRow = new UILabel("Shift+" + nextRowString, SwingConstants.CENTER); - JPanel centerPane = new JPanel(new GridLayout(2, 3, 0, V_GAP)); + JPanel centerPane = new JPanel(new FlowLayout(FlowLayout.CENTER)); centerPane.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 100)); - centerPane.add(systemDefault); + /*centerPane.add(systemDefault); centerPane.add(preColText); centerPane.add(preCol); centerPane.add(new JPanel()); centerPane.add(preRowText); - centerPane.add(preRow); + centerPane.add(preRow);*/ + centerPane.add(row(80, + column(flex(), cell(systemDefault), flex()), + column(20, + row(80, cell(preColText), cell(preCol)), + row(80, cell(preRowText), cell(preRow))) + ).getComponent()); hintsPane.add(centerPane, BorderLayout.CENTER); 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 6d5aac3022..e0890a65a2 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 @@ -33,6 +33,10 @@ import java.awt.event.ItemListener; import java.util.*; import java.util.List; +import static com.fine.swing.ui.layout.Layouts.row; +import static com.fine.swing.ui.layout.Layouts.column; +import static com.fine.swing.ui.layout.Layouts.cell; + public class SubmitVisitorListPane extends ObjectJControlPane { public SubmitVisitorListPane(ElementCasePane ePane) { @@ -186,12 +190,19 @@ 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 = 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, + cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Write_Choose_Submit_Type") + ":")), + cell(csjConfigComboBox)).getComponent(), BorderLayout.WEST); 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); + /*this.add(typePane, BorderLayout.NORTH); - this.add(customCardPane, BorderLayout.CENTER); + this.add(customCardPane, BorderLayout.CENTER);*/ + this.add(column(10, + cell(typePane), + cell(customCardPane)).getComponent()); csjConfigComboBox.addItemListener(new ItemListener() { @Override From e3b9ac78c67bf930c1cf5c2a1366c720639b88b2 Mon Sep 17 00:00:00 2001 From: renekton Date: Thu, 18 Jul 2024 14:33:48 +0800 Subject: [PATCH 04/10] =?UTF-8?q?=E6=8A=A5=E8=A1=A8=E5=BC=95=E6=93=8E?= =?UTF-8?q?=E5=B1=9E=E6=80=A7=E5=BC=B9=E7=AA=97=E7=BF=BB=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gui/frpane/ObjectProperiesPane.java | 4 +- .../itableeditorpane/UIArrayTableModel.java | 5 +- .../fr/design/write/submit/CustomJobPane.java | 33 +++++++--- .../fr/design/report/ReportEnginePane.java | 60 ++++++++++--------- .../fr/design/report/WriteShortCutsPane.java | 2 +- .../design/webattr/ReportWriteAttrPane.java | 2 +- .../write/submit/SubmitVisitorListPane.java | 4 +- 7 files changed, 67 insertions(+), 43 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 e946ad4f94..de904f5a45 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 @@ -51,7 +51,9 @@ public class ObjectProperiesPane extends BasicBeanPane { JScrollPane selectedItemScrollPane = new JScrollPane(); selectedItemScrollPane.setViewportView(northPane); selectedItemScrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); - this.add(selectedItemScrollPane, BorderLayout.CENTER); + JPanel centerPane = new JPanel(new BorderLayout()); + centerPane.add(selectedItemScrollPane); + this.add(centerPane, BorderLayout.CENTER); } @Override diff --git a/designer-base/src/main/java/com/fr/design/gui/itableeditorpane/UIArrayTableModel.java b/designer-base/src/main/java/com/fr/design/gui/itableeditorpane/UIArrayTableModel.java index b42358dfbc..15d166bcd2 100644 --- a/designer-base/src/main/java/com/fr/design/gui/itableeditorpane/UIArrayTableModel.java +++ b/designer-base/src/main/java/com/fr/design/gui/itableeditorpane/UIArrayTableModel.java @@ -3,6 +3,7 @@ package com.fr.design.gui.itableeditorpane; import java.awt.event.ActionEvent; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; public class UIArrayTableModel extends UITableModelAdapter implements ActionStyle { @@ -67,7 +68,9 @@ public class UIArrayTableModel extends UITableModelAdapter implements @Override public void actionPerformed(ActionEvent e) { super.actionPerformed(e); - addRow(new Object[getColumnCount()]); + Object[] values = new Object[getColumnCount()]; + Arrays.fill(values, "="); + addRow(values); fireTableDataChanged(); } } 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 6e4f2d803f..717f19b907 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 @@ -22,6 +22,10 @@ import java.awt.*; 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; + /** * Author : Shockway * Date: 13-7-29 @@ -36,7 +40,7 @@ public abstract class CustomJobPane extends BasicBeanPane { this.setLayout(FRGUIPaneFactory.createBorderLayout()); JPanel reportletNamePane = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane(); classNameTextField = new UITextField(getLengthOfTextField()); - reportletNamePane.add(classNameTextField); + //reportletNamePane.add(classNameTextField); UIButton browserButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Select")); browserButton.setPreferredSize(new Dimension( @@ -48,8 +52,9 @@ public abstract class CustomJobPane extends BasicBeanPane { GraphHelper.getWidth(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Select")) + 20, classNameTextField.getPreferredSize().height)); - reportletNamePane.add(browserButton); - reportletNamePane.add(editButton); + /*reportletNamePane.add(browserButton); + reportletNamePane.add(editButton);*/ + UITextArea area = new UITextArea(2, 1); browserButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { @@ -60,6 +65,7 @@ public abstract class CustomJobPane extends BasicBeanPane { new DialogActionAdapter() { public void doOk() { classNameTextField.setText(bPane.getClassPath()); + area.setText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Extend_Class", "com.fr.data.AbstractSubmitTask")); checkAddButtonEnable(); } }).setVisible(true); @@ -73,6 +79,7 @@ public abstract class CustomJobPane extends BasicBeanPane { new DialogActionAdapter() { public void doOk() { classNameTextField.setText(javaEditorPane.getClassText()); + area.setText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Extend_Class", "com.fr.data.AbstractSubmitTask")); checkAddButtonEnable(); } }); @@ -87,18 +94,28 @@ public abstract class CustomJobPane extends BasicBeanPane { }); reportletNamePane.setBorder(GUICoreUtils.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Class_Name"), null)); - this.add(reportletNamePane, BorderLayout.NORTH); + reportletNamePane.add(row(10, + cell(classNameTextField).weight(1.0), + cell(browserButton), + cell(editButton) + ).getComponent()); + //this.add(reportletNamePane, BorderLayout.NORTH); objectProperiesPane = new ObjectProperiesPane(); objectProperiesPane.setBorder(GUICoreUtils.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Property"), null)); - this.add(objectProperiesPane, BorderLayout.CENTER); + //this.add(objectProperiesPane, BorderLayout.CENTER); - UITextArea area = new UITextArea(2, 1); - area.setText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Extend_Class", "com.fr.data.AbstractSubmitTask")); + //UITextArea area = new UITextArea(2, 1); + //area.setText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Extend_Class", "com.fr.data.AbstractSubmitTask")); 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(dsPane, BorderLayout.SOUTH); + //this.add(dsPane, BorderLayout.SOUTH); + this.add(column( + cell(reportletNamePane), + cell(objectProperiesPane).weight(1.0), + cell(dsPane) + ).getComponent()); checkAddButtonEnable(); } 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 68decd16c1..ed41dd771e 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 @@ -51,7 +51,9 @@ import com.fr.design.i18n.Toolkit; 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.theme.utils.FineUIUtils.wrapComponentWithTitle; +import static com.fine.theme.utils.FineUIScale.scale; /** * @author fly.li @@ -61,7 +63,7 @@ import static com.fine.theme.utils.FineUIUtils.wrapComponentWithTitle; public class ReportEnginePane extends BasicBeanPane { private static final int LABEL_HEIGHT = 55; private JPanel outLineEngineSettingPane; - private JLayeredPane engineSettingPane; + private JPanel engineSettingPane; private UICheckBox clientPaging; private UICheckBox lineEnginePageQueryBox; private UICheckBox engineXPageQueryBox; @@ -86,51 +88,54 @@ public class ReportEnginePane extends BasicBeanPane { protected void initComponents() { this.setLayout(FRGUIPaneFactory.createBorderLayout()); - JPanel outReportEnginePane = new JPanel(); - outReportEnginePane.setLayout(FRGUIPaneFactory.createBorderLayout()); - outReportEnginePane.setPreferredSize(new Dimension(FineUIScale.scale(600), FineUIScale.scale(370))); + JPanel outReportEnginePane = new JPanel(new BorderLayout()); + createOutPagingEngineSelectPane(); outReportEnginePane.add(createReportEnginePane()); JPanel outAdvicePane = new JPanel(); outAdvicePane.setLayout(FRGUIPaneFactory.createBorderLayout()); outAdvicePane.setPreferredSize(new Dimension(FineUIScale.scale(600), FineUIScale.scale(160))); outAdvicePane.add(createAdvicePane()); - this.add(column(20, true, + this.add(column(10, 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")))) .getComponent()); } + private void createOutPagingEngineSelectPane() { + outPagingEngineSelectPane = new JPanel(new BorderLayout()); + outPagingEngineSelectPane.setVisible(false); + outPagingEngineSelectPane.add(createPagingEngineSelectPane()); + } + private JPanel createReportEnginePane() { - JPanel reportEnginePane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_M_Pane(); - JPanel clientPagingPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); + JPanel reportEnginePane = new JPanel(new BorderLayout()); clientPaging = new UICheckBox(Toolkit.i18nText("Fine-Design_Report_Enable_Client_Page")); clientPaging.setSelected(false); - reportEnginePane.add(clientPagingPane); - outPagingEngineSelectPane = new JPanel(); + /*outPagingEngineSelectPane = new JPanel(); outPagingEngineSelectPane.setLayout(FRGUIPaneFactory.createBorderLayout()); outPagingEngineSelectPane.setVisible(false); outPagingEngineSelectPane.setPreferredSize(new Dimension(FineUIScale.scale(600), FineUIScale.scale(300))); - outPagingEngineSelectPane.add(createPagingEngineSelectPane()); + outPagingEngineSelectPane.add(createPagingEngineSelectPane());*/ clientPaging.addActionListener(new SelectActionListener(clientPaging, outPagingEngineSelectPane)); - clientPagingPane.add(clientPaging); - reportEnginePane.add(column(10, true, - cell(clientPagingPane), - cell(wrapComponentWithTitle(outPagingEngineSelectPane, Toolkit.i18nText("Fine-Design_Report_Paging_Engine_Select")))) - .getComponent()); + reportEnginePane.add(clientPaging); return reportEnginePane; } private JPanel createPagingEngineSelectPane() { - engineSettingPane = new JLayeredPane(); - engineSettingPane.setPreferredSize(new Dimension(FineUIScale.scale(600), FineUIScale.scale(240))); - engineSettingPane.setBounds(0, 0, FineUIScale.scale(600), FineUIScale.scale(240)); + engineSettingPane = new JPanel(new BorderLayout()); createEngineXSettingPane(); createLineEngineSettingPane(); outLineEngineSettingPane.setVisible(false); - engineSettingPane.add(outEngineXSettingPane, JLayeredPane.DEFAULT_LAYER); - engineSettingPane.add(outLineEngineSettingPane, JLayeredPane.DEFAULT_LAYER); - engineSettingPane.moveToFront(outEngineXSettingPane); + outEngineXSettingPane.setPreferredSize(new Dimension(scale(625), scale(220))); + outLineEngineSettingPane.setPreferredSize(new Dimension(scale(625), scale(220))); + engineSettingPane.add(box(cell(outEngineXSettingPane), + cell(outLineEngineSettingPane)).getComponent() + , BorderLayout.WEST); + /*engineSettingPane.add(outEngineXSettingPane, JLayeredPane.DEFAULT_LAYER); + engineSettingPane.add(outLineEngineSettingPane, JLayeredPane.DEFAULT_LAYER);*/ + //engineSettingPane.moveToFront(outEngineXSettingPane); engineSettingPane.setVisible(true); JPanel pagingEngineSelectPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_M_Pane(); pagingEngineSelectPane.add(createPagingEngineRadioPanel()); @@ -147,7 +152,6 @@ public class ReportEnginePane extends BasicBeanPane { */ private void createEngineXSettingPane() { outEngineXSettingPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_New_Engine")); - outEngineXSettingPane.setBounds(0, 0, FineUIScale.scale(600), FineUIScale.scale(180)); JPanel engineXSettingPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_M_Pane(); JPanel pageQueryBoxPanel = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); engineXPageQueryBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Report_Fixed_Line_Paging")); @@ -174,8 +178,6 @@ public class ReportEnginePane extends BasicBeanPane { private void createLineEngineSettingPane() { outLineEngineSettingPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Line_Engine")); - // TODO SCALE动态伸缩大小 - outLineEngineSettingPane.setBounds(0, 0, FineUIScale.scale(600), FineUIScale.scale(200)); JPanel lineEngineSettingPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_M_Pane(); JPanel pageQueryBoxPanel = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); lineEnginePageQueryBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Report_Fixed_Line_Paging")); @@ -288,14 +290,14 @@ public class ReportEnginePane extends BasicBeanPane { radioButtons.get(0).setSelected(ob.getEngineState() == LayerReportAttr.ENGINE_X); radioButtons.get(1).setSelected(ob.getEngineState() == LayerReportAttr.LINE_ENGINE); if (ob.getEngineState() == LayerReportAttr.ENGINE_X) { - engineSettingPane.moveToFront(outEngineXSettingPane); + //engineSettingPane.moveToFront(outEngineXSettingPane); outEngineXSettingPane.setVisible(true); outLineEngineSettingPane.setVisible(false); engineXCountPerPageEditor.setValue(new Integer(ob.getCountPerPage())); engineXPageQueryBox.setSelected(ob.isPageQuery()); engineXPageQueryPane.setVisible(ob.isPageQuery()); } else { - engineSettingPane.moveToFront(outLineEngineSettingPane); + //engineSettingPane.moveToFront(outLineEngineSettingPane); outEngineXSettingPane.setVisible(false); outLineEngineSettingPane.setVisible(true); lineEngineCountPerPageEditor.setValue(new Integer(ob.getCountPerPage())); @@ -369,11 +371,11 @@ public class ReportEnginePane extends BasicBeanPane { private class EngineSelectActionListener implements ActionListener { private AbstractButton source; - private JLayeredPane target; + private JPanel target; private JPanel showTarget; private JPanel notShowTarget; - private EngineSelectActionListener(AbstractButton source, JLayeredPane target, JPanel showTarget, JPanel notShowTarget) { + private EngineSelectActionListener(AbstractButton source, JPanel target, JPanel showTarget, JPanel notShowTarget) { this.source = source; this.target = target; this.showTarget = showTarget; @@ -390,7 +392,7 @@ public class ReportEnginePane extends BasicBeanPane { target.setVisible(true); showTarget.setVisible(true); notShowTarget.setVisible(false); - target.moveToFront(showTarget); + //target.moveToFront(showTarget); } else { target.setVisible(false); } 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 e1887084d2..968dfdd896 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 @@ -91,7 +91,7 @@ public class WriteShortCutsPane extends JPanel{ centerPane.add(switchBtnPane); centerPane.add(nextRowHK);*/ centerPane.add(column(20, true, - row(50, cell(name), cell(nextCol), flex(50), cell(nextRow)), + row(50, cell(name), cell(nextCol), flex(), cell(nextRow)), row(50, cell(shortName), cell(nextColHK), cell(switchBtnPane), cell(nextRowHK)) ).getComponent()); diff --git a/designer-realize/src/main/java/com/fr/design/webattr/ReportWriteAttrPane.java b/designer-realize/src/main/java/com/fr/design/webattr/ReportWriteAttrPane.java index 356fce98c9..5d9a050c8a 100644 --- a/designer-realize/src/main/java/com/fr/design/webattr/ReportWriteAttrPane.java +++ b/designer-realize/src/main/java/com/fr/design/webattr/ReportWriteAttrPane.java @@ -40,7 +40,7 @@ public class ReportWriteAttrPane extends LoadingBasicPane { @Override protected synchronized void initComponents(JPanel container) { container.setLayout(FRGUIPaneFactory.createBorderLayout()); - final UITabbedPane tabbedPane = new UITabbedPane(SwingConstants.TOP, JTabbedPane.SCROLL_TAB_LAYOUT); + final UITabbedPane tabbedPane = new UITabbedPane(SwingConstants.TOP, JTabbedPane.WRAP_TAB_LAYOUT); container.add(tabbedPane, BorderLayout.CENTER); // peter: writeSQLAttrList的编辑. 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 e0890a65a2..91475900d9 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 @@ -200,9 +200,9 @@ public class SubmitVisitorListPane extends ObjectJControlPane { /*this.add(typePane, BorderLayout.NORTH); this.add(customCardPane, BorderLayout.CENTER);*/ - this.add(column(10, + this.add(column( cell(typePane), - cell(customCardPane)).getComponent()); + cell(customCardPane).weight(1.0)).getComponent()); csjConfigComboBox.addItemListener(new ItemListener() { @Override From abec5c347c0587ddb0938a9de9e8567ed506510c Mon Sep 17 00:00:00 2001 From: renekton Date: Mon, 29 Jul 2024 17:48:21 +0800 Subject: [PATCH 05/10] =?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 | 11 --- .../design/formula/FunctionManagerPane.java | 66 +++++++++----- .../fun/impl/AbstractHyperlinkProvider.java | 3 +- .../gui/columnrow/ColumnRowVerticalPane.java | 25 +++--- .../frpane/ReportletParameterViewPane.java | 22 +++-- .../itableeditorpane/ParameterTableModel.java | 2 +- .../itableeditorpane/UITableEditorPane.java | 25 ++++-- .../hyperlink/AbstractHyperNorthPane.java | 79 ++++++++-------- .../hyperlink/ReportletHyperNorthPane.java | 74 ++++++++------- .../hyperlink/ReportletHyperlinkPane.java | 20 +++-- .../design/hyperlink/WebHyperNorthPane.java | 24 +++-- .../fr/design/hyperlink/WebHyperlinkPane.java | 17 +++- .../hyperlink/popup/ContentSettingPane.java | 75 ++++++++++------ .../hyperlink/popup/CustomFontPane.java | 20 +++-- .../hyperlink/popup/MobilePopupPane.java | 10 ++- .../popup/MobilePopupRegularPane.java | 2 +- .../hyperlink/popup/MobilePopupUIUtils.java | 24 +++-- .../hyperlink/popup/StyleSettingPane.java | 84 ++++++++++++------ .../com/fr/design/javascript/EmailPane.java | 51 +++++++---- .../fr/design/javascript/JSContentPane.java | 20 +++-- .../design/javascript/JavaScriptImplPane.java | 21 +++-- .../mainframe/EastRegionContainerPane.java | 1 + .../design/parameter/ParameterArrayPane.java | 6 +- .../widget/component/DateValuePane.java | 2 +- .../component/NumberEditorValidatePane.java | 6 +- .../fr/design/write/submit/CustomJobPane.java | 18 ++-- .../write/submit/DBManipulationPane.java | 37 +++----- .../com/fr/design/images/data/hyperlink.png | Bin 0 -> 844 bytes .../com/fr/design/images/data/user_widget.png | Bin 3609 -> 774 bytes .../fr/design/images/edit/advancedEditor.svg | 14 +-- .../images/m_format/cellstyle/new_bold.png | Bin 0 -> 611 bytes .../images/m_format/cellstyle/new_italic.png | Bin 0 -> 445 bytes .../m_format/cellstyle/new_underline.png | Bin 0 -> 476 bytes .../fr/design/images/server/global_param.png | Bin 0 -> 730 bytes .../impl/ChartHyperRelateCellLinkPane.java | 10 ++- .../fr/design/module/ChartHyperlinkGroup.java | 9 +- .../fr/design/module/FormHyperlinkGroup.java | 7 +- .../actions/server/WidgetManagerAction.java | 6 +- .../cell/smartaction/SmartJTablePane.java | 8 +- .../fr/design/report/ReportEnginePane.java | 18 +--- .../fr/design/report/WriteShortCutsPane.java | 34 +++---- .../design/webattr/ReportWriteAttrPane.java | 15 ++-- .../fr/design/widget/CellWidgetCardPane.java | 35 +++----- .../widget/UserDefinedWidgetConfigPane.java | 7 +- .../com/fr/design/widget/ValueWidgetPane.java | 33 ++++--- .../java/com/fr/design/widget/WidgetPane.java | 8 +- .../ui/BasicWidgetPropertySettingPane.java | 14 ++- .../widget/ui/DateEditorDefinePane.java | 39 ++++---- .../submit/SmartInsertDBManipulationPane.java | 19 ++-- .../write/submit/SubmitVisitorListPane.java | 6 +- .../fr/start/module/DesignerActivator.java | 13 +-- 51 files changed, 593 insertions(+), 447 deletions(-) create mode 100644 designer-base/src/main/resources/com/fr/design/images/data/hyperlink.png create mode 100644 designer-base/src/main/resources/com/fr/design/images/m_format/cellstyle/new_bold.png create mode 100644 designer-base/src/main/resources/com/fr/design/images/m_format/cellstyle/new_italic.png create mode 100644 designer-base/src/main/resources/com/fr/design/images/m_format/cellstyle/new_underline.png create mode 100644 designer-base/src/main/resources/com/fr/design/images/server/global_param.png 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 b9734ac9b8..061eb884f7 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,7 +10,6 @@ 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; @@ -91,16 +90,6 @@ public abstract class UpdateAction extends ShortCut implements Action { */ public static final String DISABLED_ICON = "disabledIcon"; - - - /** - * Constructor - */ - public UpdateAction() { - //设置默认的small icon,必须有一个默认的图片,这样菜单整体美观. - this.putValue(Action.SMALL_ICON, UIConstants.BLACK_ICON); - } - /** * Returns true if the action is enabled. * 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 c40a917e39..de2535c929 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.fr.base.svg.IconUtils; import com.fr.design.beans.BasicBeanPane; import com.fr.design.data.tabledata.tabledatapane.ClassNameSelectPane; import com.fr.design.dialog.BasicDialog; @@ -31,6 +32,11 @@ import java.io.File; import java.util.ArrayList; import java.util.List; +import static com.fine.swing.ui.layout.Layouts.row; +import static com.fine.swing.ui.layout.Layouts.cell; +import static com.fine.swing.ui.layout.Layouts.flex; +import static com.fine.swing.ui.layout.Layouts.column; + public class FunctionManagerPane extends BasicPane { private FunctionControlPane functionControlPane; @@ -94,7 +100,9 @@ public class FunctionManagerPane extends BasicPane { @Override public NameableCreator[] createNameableCreators() { - NameableCreator funcDef = new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Function"), FunctionDef.class, + NameableCreator funcDef = new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Function"), + IconUtils.readIcon("com/fr/design/images/server/global_param.png"), + FunctionDef.class, FunctionContentPane.class); return new NameableCreator[]{funcDef}; } @@ -119,15 +127,10 @@ public class FunctionManagerPane extends BasicPane { this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.setBorder(BorderFactory.createEmptyBorder(2, 0, 0, 0)); JPanel northPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_S_Pane(); - this.add(northPane, BorderLayout.NORTH); - JPanel reportletNamePane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); - classNameTextField = new UITextField(25); - reportletNamePane.add(classNameTextField); + JPanel reportletNamePane = new JPanel(new BorderLayout()); + classNameTextField = new UITextField(); UIButton browserButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Select")); - browserButton.setPreferredSize(new Dimension(browserButton.getPreferredSize().width, classNameTextField.getPreferredSize().height)); - reportletNamePane.add(browserButton); - browserButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent evt) { + browserButton.addActionListener(evt -> { final ClassNameSelectPane bPane = new ClassNameSelectPane(); bPane.setClassPath(classNameTextField.getText()); bPane.showWindow( (Dialog) SwingUtilities.getWindowAncestor(FunctionContentPane.this), @@ -136,31 +139,46 @@ public class FunctionManagerPane extends BasicPane { classNameTextField.setText(bPane.getClassPath()); } }).setVisible(true); - } - }); + }); UIButton editorButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Edit")); - editorButton.setPreferredSize(new Dimension(editorButton.getPreferredSize().width, classNameTextField.getPreferredSize().height)); - reportletNamePane.add(editorButton); editorButton.addActionListener(createEditorButtonActionListener()); - JPanel classNamePane = FRGUIPaneFactory.createBorderLayout_S_Pane(); - classNamePane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_DS_Class_Name") + ":"), BorderLayout.NORTH); - classNamePane.add(reportletNamePane, BorderLayout.CENTER); - northPane.add(classNamePane); + + reportletNamePane.add(row(10, + cell(classNameTextField).weight(0.7), + cell(browserButton).weight(0.15), + cell(editorButton).weight(0.15) + ).getComponent()); + JPanel classNamePane = new JPanel(new BorderLayout()); + classNamePane.add(column(10, + cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_DS_Class_Name"))), + cell(reportletNamePane) + ).getComponent()); DescriptionTextArea descriptionArea = new DescriptionTextArea(); descriptionArea.setWrapStyleWord(true); descriptionArea.setLineWrap(true); - northPane.add(descriptionArea); + descriptionArea.setForeground(Color.GRAY); + descriptionArea.setBorder(null); + + northPane.add(column(10, + cell(classNamePane), + cell(descriptionArea) + ).getComponent()); String path1 = getEscapePath(File.separator + ProjectConstants.WEBINF_NAME + File.separator + ProjectConstants.CLASSES_NAME); String path2 = getEscapePath(WorkContext.getCurrent().getPath() + File.separator + ProjectConstants.CLASSES_NAME); descriptionArea.setText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Function_Description_Area_Text", path1, path2)); - JPanel descriptionPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); //Description Pane - this.add(descriptionPane, BorderLayout.SOUTH); - descriptionPane.setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4)); - descriptionPane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Description") + ":"), BorderLayout.NORTH); - this.descriptionTextArea = new UITextArea(6, 24); - descriptionPane.add(new JScrollPane(this.descriptionTextArea), BorderLayout.CENTER); + JPanel descriptionPane = new JPanel(new BorderLayout()); //Description Pane + this.descriptionTextArea = new UITextArea(); + descriptionPane.add(column(10, + cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Description"))), + cell(new JScrollPane(this.descriptionTextArea)).weight(0.9) + ).getComponent()); + this.add(column(10, + cell(northPane).weight(0.35), + cell(descriptionPane).weight(0.65) + ).getComponent()); + } private String getEscapePath(String path) { diff --git a/designer-base/src/main/java/com/fr/design/fun/impl/AbstractHyperlinkProvider.java b/designer-base/src/main/java/com/fr/design/fun/impl/AbstractHyperlinkProvider.java index 9c74795d8e..2527d64621 100644 --- a/designer-base/src/main/java/com/fr/design/fun/impl/AbstractHyperlinkProvider.java +++ b/designer-base/src/main/java/com/fr/design/fun/impl/AbstractHyperlinkProvider.java @@ -1,5 +1,6 @@ package com.fr.design.fun.impl; +import com.fr.base.svg.IconUtils; import com.fr.design.beans.BasicBeanPane; import com.fr.design.fun.HyperlinkProvider; import com.fr.design.gui.controlpane.NameObjectCreator; @@ -25,7 +26,7 @@ public abstract class AbstractHyperlinkProvider extends AbstractProvider impleme @Override public NameableCreator createHyperlinkCreator() { - return new NameObjectCreator(text(), target(), appearance()); + return new NameObjectCreator(text(), IconUtils.readIcon("com/fr/design/images/data/hyperlink.png"), target(), appearance()); } @Override 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 a269359b73..035b056fa3 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 @@ -7,7 +7,10 @@ import javax.swing.JPanel; import com.fr.design.layout.FRGUIPaneFactory; - +import static com.fine.swing.ui.layout.Layouts.row; +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.flex; /** * @author kunsnat E-mail:kunsnat@gmail.com @@ -24,19 +27,17 @@ public class ColumnRowVerticalPane extends ColumnRowPane { JPanel pane = FRGUIPaneFactory.createYBoxEmptyBorderPane(); this.add(pane, BorderLayout.NORTH); - JPanel colPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); - colPane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Column") + ":")); - pane.add(colPane); - + UILabel colLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Column")); + initColSpinner(); - colPane.add(columnSpinner); - - JPanel rowPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); - pane.add(rowPane); - - rowPane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Row") + ":")); + + UILabel rowLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Row")); initRowSpinner(); - rowPane.add(rowSpinner); + + 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)) + ).getComponent()); this.addDocumentListener(d); } diff --git a/designer-base/src/main/java/com/fr/design/gui/frpane/ReportletParameterViewPane.java b/designer-base/src/main/java/com/fr/design/gui/frpane/ReportletParameterViewPane.java index 37bd82bfc5..369f2ef63b 100644 --- a/designer-base/src/main/java/com/fr/design/gui/frpane/ReportletParameterViewPane.java +++ b/designer-base/src/main/java/com/fr/design/gui/frpane/ReportletParameterViewPane.java @@ -16,6 +16,7 @@ import com.fr.design.layout.FRGUIPaneFactory; import com.fr.stable.ArrayUtils; import com.fr.stable.ParameterProvider; +import javax.swing.JPanel; import javax.swing.event.TableModelListener; import java.awt.*; import java.util.List; @@ -41,15 +42,21 @@ public class ReportletParameterViewPane extends BasicPane { public ReportletParameterViewPane(UITableEditAction[] actions, int useParaType) { this(actions, useParaType, ValueEditorPaneFactory.createVallueEditorPaneWithUseType(useParaType), - ValueEditorPaneFactory.createVallueEditorPaneWithUseType(useParaType)); + ValueEditorPaneFactory.createVallueEditorPaneWithUseType(useParaType), null); } public ReportletParameterViewPane(int useParaType, ValueEditorPane valueEditorPane, ValueEditorPane valueRenderPane) { - this(null, useParaType, valueEditorPane, valueRenderPane); + this(null, useParaType, valueEditorPane, valueRenderPane, null); } - public ReportletParameterViewPane(UITableEditAction[] actions, int useParaType, ValueEditorPane valueEditorPane, ValueEditorPane valueRenderPane) { - this.initComponent(actions, useParaType, valueEditorPane, valueRenderPane); + public ReportletParameterViewPane(UITableEditAction[] actions, int useParaType, ValueEditorPane valueEditorPane, + ValueEditorPane valueRenderPane) { + this.initComponent(actions, useParaType, valueEditorPane, valueRenderPane, null); + } + + public ReportletParameterViewPane(UITableEditAction[] actions, int useParaType, ValueEditorPane valueEditorPane, + ValueEditorPane valueRenderPane, JPanel otherPane) { + this.initComponent(actions, useParaType, valueEditorPane, valueRenderPane, otherPane); } /** @@ -58,7 +65,8 @@ public class ReportletParameterViewPane extends BasicPane { * @param actions Chart的热点链接actions * @param useParaType 类型 */ - public void initComponent(final UITableEditAction[] actions, int useParaType, ValueEditorPane valueEditorPane, ValueEditorPane valueRenderPane) { + public void initComponent(final UITableEditAction[] actions, int useParaType, ValueEditorPane valueEditorPane, ValueEditorPane valueRenderPane, + JPanel otherPanel) { this.setLayout(FRGUIPaneFactory.createBorderLayout()); if (useParaType != ParameterTableModel.NO_CHART_USE) { @@ -70,14 +78,14 @@ public class ReportletParameterViewPane extends BasicPane { return (UITableEditAction[]) ArrayUtils.addAll(tableEditActions, actions); } }; - editorPane = new UITableEditorPane(model); + editorPane = new UITableEditorPane(model, otherPanel); } else { editorPane = new UITableEditorPane(new ParameterTableModel() { @Override public UITableEditAction[] createAction() { return (UITableEditAction[]) ArrayUtils.addAll(super.createAction(), actions); } - }); + }, otherPanel); } this.add(editorPane, BorderLayout.CENTER); diff --git a/designer-base/src/main/java/com/fr/design/gui/itableeditorpane/ParameterTableModel.java b/designer-base/src/main/java/com/fr/design/gui/itableeditorpane/ParameterTableModel.java index 1b1471d40e..a3f9f63f29 100644 --- a/designer-base/src/main/java/com/fr/design/gui/itableeditorpane/ParameterTableModel.java +++ b/designer-base/src/main/java/com/fr/design/gui/itableeditorpane/ParameterTableModel.java @@ -241,7 +241,7 @@ public class ParameterTableModel extends UITableModelAdapter public ParameterValueRenderer(ValueEditorPane valueEditorPane) { disableLable = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Set_Paramete_Name")); disableLable.setForeground(Color.pink); - disableLable.setHorizontalAlignment(SwingConstants.CENTER); + disableLable.setHorizontalAlignment(SwingConstants.LEFT); editor = valueEditorPane; } diff --git a/designer-base/src/main/java/com/fr/design/gui/itableeditorpane/UITableEditorPane.java b/designer-base/src/main/java/com/fr/design/gui/itableeditorpane/UITableEditorPane.java index 53214b869b..9e8faf3944 100644 --- a/designer-base/src/main/java/com/fr/design/gui/itableeditorpane/UITableEditorPane.java +++ b/designer-base/src/main/java/com/fr/design/gui/itableeditorpane/UITableEditorPane.java @@ -6,10 +6,11 @@ import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.icontainer.UIScrollPane; import com.fr.design.gui.ilable.UILabel; import com.fr.design.layout.FRGUIPaneFactory; +import sun.swing.table.DefaultTableCellHeaderRenderer; -import javax.swing.JPanel; -import javax.swing.JTable; +import javax.swing.*; import javax.swing.event.TableModelListener; +import javax.swing.table.DefaultTableCellRenderer; import java.awt.BorderLayout; import java.awt.GridLayout; import java.awt.Insets; @@ -37,6 +38,11 @@ public class UITableEditorPane extends BasicPane { this.initComponent(model.createAction()); } + public UITableEditorPane(UITableModelAdapter model, JPanel panel) { + this.tableModel = model; + this.initComponent(model.createAction(), panel); + } + public UITableEditorPane(UITableModelAdapter model, String s) { leftLabelName = s; this.tableModel = model; @@ -44,20 +50,29 @@ public class UITableEditorPane extends BasicPane { } protected void initComponent(UITableEditAction[] action) { + this.initComponent(action, null); + + } + + protected void initComponent(UITableEditAction[] action, JPanel content) { this.setLayout(FRGUIPaneFactory.createBorderLayout()); JPanel pane = new JPanel(new BorderLayout(4, 4)); this.add(pane, BorderLayout.CENTER); UILabel l = new UILabel(leftLabelName); editTable = tableModel.createTable(); - + DefaultTableCellHeaderRenderer headerRenderer = new DefaultTableCellHeaderRenderer(); + headerRenderer.setHorizontalAlignment(SwingConstants.LEFT); + editTable.getTableHeader().setDefaultRenderer(headerRenderer); UIScrollPane scrollPane = new UIScrollPane(editTable); scrollPane.setBorder(new FineRoundBorder()); pane.add(scrollPane, BorderLayout.CENTER); initbuttonPane(action); JPanel controlPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); controlPane.add(buttonPane, BorderLayout.EAST); - controlPane.add(l, BorderLayout.WEST); + + controlPane.add(content == null ? l : content, BorderLayout.WEST); + pane.add(controlPane, BorderLayout.NORTH); } @@ -70,7 +85,7 @@ public class UITableEditorPane extends BasicPane { buttonPane = new JPanel(); if (action != null) { - buttonPane.setLayout(new GridLayout(1, action.length, 3, 3)); + buttonPane.setLayout(new GridLayout(1, action.length, 6, 3)); for (int i = 0; i < action.length; i++) { final UIButton newButton = new UIButton(action[i]); newButton.set4ToolbarButton(); diff --git a/designer-base/src/main/java/com/fr/design/hyperlink/AbstractHyperNorthPane.java b/designer-base/src/main/java/com/fr/design/hyperlink/AbstractHyperNorthPane.java index 42f13ceed5..bec8381ad8 100644 --- a/designer-base/src/main/java/com/fr/design/hyperlink/AbstractHyperNorthPane.java +++ b/designer-base/src/main/java/com/fr/design/hyperlink/AbstractHyperNorthPane.java @@ -4,6 +4,7 @@ import com.fr.base.Utils; import com.fr.design.beans.BasicBeanPane; import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.ilable.UILabel; +import com.fr.design.gui.ispinner.UISpinner; import com.fr.design.gui.itextfield.UINumberField; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.js.Hyperlink; @@ -17,6 +18,12 @@ import java.awt.Dimension; 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.row; +import static com.fine.swing.ui.layout.Layouts.cell; +import static com.fine.swing.ui.layout.Layouts.flex; +import static com.fine.swing.ui.layout.Layouts.fix; + public abstract class AbstractHyperNorthPane extends BasicBeanPane { public static final int NEW_WINDOW = 0; public static final int DIALOG = 1; @@ -31,11 +38,11 @@ public abstract class AbstractHyperNorthPane extends BasicB /** * 对话框高度输入框 */ - private UINumberField heightTextFiled; + private UISpinner heightTextFiled; /** * 对话框宽度输入框 */ - private UINumberField widthTextFiled; + private UISpinner widthTextFiled; public AbstractHyperNorthPane() { @@ -46,8 +53,7 @@ public abstract class AbstractHyperNorthPane extends BasicB this.setLayout(FRGUIPaneFactory.createM_BorderLayout()); JPanel centerPane = FRGUIPaneFactory.createBorderLayout_L_Pane(); JPanel headerPane = this.setHeaderPanel(); - this.add(headerPane, BorderLayout.NORTH); - this.add(centerPane, BorderLayout.CENTER); + targetFrameComboBox = new UIComboBox(getTargetFrames()); targetFrameComboBox.setRenderer(new DefaultListCellRenderer() { public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { @@ -55,38 +61,37 @@ public abstract class AbstractHyperNorthPane extends BasicB return this; } }); - JPanel targetFramePanel = new JPanel(); - targetFramePanel.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Link_Opened_In"))); - targetFramePanel.add(targetFrameComboBox); + UILabel targetFrameLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Link_Opened_In")); + targetFrameComboBox.setEditable(true); - targetFrameComboBox.setPreferredSize(new Dimension(100, 20)); - - final JPanel newWindowConfPane = new JPanel(); - newWindowConfPane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Height") + ": ")); - heightTextFiled = new UINumberField(); - heightTextFiled.setText(String.valueOf(DEFAULT_H_VALUE)); - heightTextFiled.setPreferredSize(new Dimension(40, 20)); - newWindowConfPane.add(heightTextFiled); - newWindowConfPane.add(new UILabel(" " + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Designer_Width") + ": ")); - widthTextFiled = new UINumberField(); - widthTextFiled.setText(String.valueOf(DEFAULT_V_VALUE)); - widthTextFiled.setPreferredSize(new Dimension(40, 20)); - newWindowConfPane.add(widthTextFiled); + + final JPanel newWindowConfPane = new JPanel(new BorderLayout()); + UILabel heightLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Height")); + heightTextFiled = new UISpinner(0, Integer.MAX_VALUE, 1, DEFAULT_H_VALUE); + UILabel widthLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Designer_Width")); + widthTextFiled = new UISpinner(0, Integer.MAX_VALUE, 1, DEFAULT_V_VALUE); + newWindowConfPane.add(column(10, + row(cell(heightLabel).weight(0.13), cell(heightTextFiled).weight(0.87)), + row(cell(widthLabel).weight(0.13), cell(widthTextFiled).weight(0.87)) + ).getComponent()); JPanel centerPanel = new JPanel(new BorderLayout()); - centerPanel.add(targetFramePanel, BorderLayout.WEST); - centerPanel.add(newWindowConfPane, BorderLayout.EAST); + + centerPanel.add(column( + 10, + row(cell(targetFrameLabel).weight(0.13), cell(targetFrameComboBox).weight(0.87)), + cell(newWindowConfPane) + ).getComponent()); newWindowConfPane.setVisible(false); centerPane.add(centerPanel); - targetFrameComboBox.addActionListener(new ActionListener() { - @Override - public void actionPerformed(ActionEvent e) { - newWindowConfPane.setVisible(DIALOG == targetFrameComboBox.getSelectedIndex()); - } - }); + targetFrameComboBox.addActionListener(e -> newWindowConfPane.setVisible(DIALOG == targetFrameComboBox.getSelectedIndex())); - this.add(this.setFootPanel(), BorderLayout.SOUTH); + this.add(column( + cell(headerPane), + cell(centerPane), + cell(this.setFootPanel()) + ).getComponent()); } protected String[] getTargetFrames() { @@ -107,19 +112,19 @@ public abstract class AbstractHyperNorthPane extends BasicB this.targetFrameComboBox = targetFrameComboBox; } - public UINumberField getHeightTextFiled() { + public UISpinner getHeightTextFiled() { return heightTextFiled; } - public void setHeightTextFiled(UINumberField heightTextFiled) { + public void setHeightTextFiled(UISpinner heightTextFiled) { this.heightTextFiled = heightTextFiled; } - public UINumberField getWidthTextFiled() { + public UISpinner getWidthTextFiled() { return widthTextFiled; } - public void setWidthTextFiled(UINumberField widthTextFiled) { + public void setWidthTextFiled(UISpinner widthTextFiled) { this.widthTextFiled = widthTextFiled; } @@ -127,8 +132,8 @@ public abstract class AbstractHyperNorthPane extends BasicB public void populateBean(T link) { String name = link.getTargetFrame(); targetFrameComboBox.setSelectedIndex(HyperlinkTargetFrame.convert(name)); - heightTextFiled.setText(String.valueOf(link.getHeight() == 0 ? DEFAULT_H_VALUE : link.getHeight())); - widthTextFiled.setText(String.valueOf(link.getWidth() == 0 ? DEFAULT_V_VALUE : link.getWidth())); + heightTextFiled.setValue(link.getHeight() == 0 ? DEFAULT_H_VALUE : link.getHeight()); + widthTextFiled.setValue(link.getWidth() == 0 ? DEFAULT_V_VALUE : link.getWidth()); populateSubHyperlinkBean(link); } @@ -148,8 +153,8 @@ public abstract class AbstractHyperNorthPane extends BasicB public void updateBean(T link) { updateSubHyperlinkBean(link); link.setTargetFrame(HyperlinkTargetFrame.parse(targetFrameComboBox.getSelectedIndex()).getName()); - link.setHeight(Utils.objectToNumber(heightTextFiled.getText(), false).intValue()); - link.setWidth(Utils.objectToNumber(widthTextFiled.getText(), false).intValue()); + link.setHeight(Utils.objectToNumber(heightTextFiled.getValue(), false).intValue()); + link.setWidth(Utils.objectToNumber(widthTextFiled.getValue(), false).intValue()); } } 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 8fa88e9293..2b757db6df 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 @@ -10,6 +10,7 @@ import com.fr.design.gui.ibutton.UIRadioButton; import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.ilable.UILabel; +import com.fr.design.gui.ispinner.UISpinner; import com.fr.design.gui.itextfield.UINumberField; import com.fr.design.gui.itextfield.UITextField; import com.fr.design.gui.itree.filetree.ReportletPane; @@ -39,6 +40,10 @@ import java.awt.event.ActionListener; import java.util.ArrayList; import java.util.List; +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.cell; + /** * 热点链接部分 上方 定义特征 样式 报表 等属性的界面. * @@ -143,12 +148,11 @@ public class ReportletHyperNorthPane extends AbstractHyperNorthPane dialogComponents, List othersComponents) { //最上方位置的面板 JPanel headerPane = this.setHeaderPanel(); - Component[] headerComponents = new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Reportlet") + ":"), headerPane}; + Component[] headerComponents = new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Reportlet")), headerPane}; dialogComponents.add(headerComponents); othersComponents.add(headerComponents); } @@ -343,10 +352,9 @@ public class ReportletHyperNorthPane extends AbstractHyperNorthPane dialogComponents) {// 对话框大小 - final JPanel sizeJPanel = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 0)); - UILabel heightLabel = new UILabel(Toolkit.i18nText("Fine-Design_Chart_Height") + ":"); - heightLabel.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 10)); - sizeJPanel.add(heightLabel); - UINumberField heightTextFiled = new UINumberField(); - heightTextFiled.setMinValue(0); - heightTextFiled.canFillNegativeNumber(false); - heightTextFiled.setText(String.valueOf(DEFAULT_H_VALUE)); - heightTextFiled.setPreferredSize(new Dimension(40, 20)); - sizeJPanel.add(heightTextFiled); + final JPanel sizeJPanel = new JPanel(new BorderLayout()); + UILabel heightLabel = new UILabel(Toolkit.i18nText("Fine-Design_Chart_Height")); + UISpinner heightTextFiled = new UISpinner(0, Integer.MAX_VALUE, 1, DEFAULT_H_VALUE); this.setHeightTextFiled(heightTextFiled); - UILabel widthLabel = new UILabel(Toolkit.i18nText("Fine-Design_Basic_Designer_Width") + ":"); - widthLabel.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 10)); - sizeJPanel.add(widthLabel); - UINumberField widthTextFiled = new UINumberField(); - widthTextFiled.setMinValue(0); - widthTextFiled.canFillNegativeNumber(false); - widthTextFiled.setText(String.valueOf(DEFAULT_V_VALUE)); - widthTextFiled.setPreferredSize(new Dimension(40, 20)); - sizeJPanel.add(widthTextFiled); + UILabel widthLabel = new UILabel(Toolkit.i18nText("Fine-Design_Basic_Designer_Width")); + UISpinner widthTextFiled = new UISpinner(0, Integer.MAX_VALUE, 1, DEFAULT_V_VALUE); this.setWidthTextFiled(widthTextFiled); + sizeJPanel.add(column(8, + row(10, cell(heightLabel).weight(0.2), cell(heightTextFiled).weight(0.8)), + row(10, cell(widthLabel).weight(0.2), cell(widthTextFiled).weight(0.8)) + ).getComponent()); sizeJPanel.setVisible(true); - dialogComponents.add(new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Dialog_Size") + ":"), sizeJPanel}); + dialogComponents.add(new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Dialog_Size")), sizeJPanel}); } private void initDialogLocationPanel(List dialogComponents) { @@ -408,13 +406,13 @@ public class ReportletHyperNorthPane extends AbstractHyperNorthPane dialogComponents, List othersComponents) { // 最下方的配置面板 // 参数传递方式 - Component[] footerComponents = new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Reportlet_Parameter_Type") + ":"), this.setFootPanel()}; + Component[] footerComponents = new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Reportlet_Parameter_Type")), this.setFootPanel()}; dialogComponents.add(footerComponents); othersComponents.add(footerComponents); } 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 48affb7dc3..8efb32aba3 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,10 +1,12 @@ package com.fr.design.hyperlink; +import com.fine.theme.light.ui.FineRoundBorder; import com.fr.base.BaseUtils; import com.fr.base.Parameter; import com.fr.design.dialog.FineJOptionPane; import com.fr.design.gui.frpane.ReportletParameterViewPane; import com.fr.design.gui.icheckbox.UICheckBox; +import com.fr.design.gui.icontainer.UIScrollPane; import com.fr.design.gui.itableeditorpane.ParameterTableModel; import com.fr.design.gui.itableeditorpane.UITableEditAction; import com.fr.design.i18n.Toolkit; @@ -16,13 +18,14 @@ import com.fr.js.ReportletHyperlink; import com.fr.stable.ParameterProvider; import com.fr.stable.StringUtils; -import javax.swing.JOptionPane; -import java.awt.BorderLayout; -import java.awt.FlowLayout; +import javax.swing.*; import java.awt.event.ActionEvent; import java.util.HashMap; import java.util.List; +import static com.fine.swing.ui.layout.Layouts.column; +import static com.fine.swing.ui.layout.Layouts.cell; + public class ReportletHyperlinkPane extends AbstractHyperLinkPane { /** * 超链配置面板 @@ -47,7 +50,6 @@ public class ReportletHyperlinkPane extends AbstractHyperLinkPane { @Override protected JPanel setHeaderPanel() { - JPanel headerPane = FRGUIPaneFactory.createBorderLayout_L_Pane(); + JPanel headerPane = new JPanel(new BorderLayout()); - urlTextField = new UITextField(headerPane.getWidth()); + urlTextField = new UITextField(); urlTextField.setText(ProductConstants.WEBSITE_URL); - JPanel urlWithHelp = GUICoreUtils.createNamedPane(urlTextField, "URL:"); + UILabel urlLabel = new UILabel("URL"); + JPanel urlWithHelp = new JPanel(new BorderLayout()); + urlWithHelp.add(row( + flex(0.018), + cell(urlLabel).weight(0.125), + cell(urlTextField).weight(0.85), + flex(0.015) + ).getComponent()); if (this.needRenamePane) { - headerPane.setLayout(new BorderLayout(LayoutConstants.VGAP_LARGE, LayoutConstants.VGAP_SMALL)); itemNameTextField = new UITextField(); - headerPane.add(GUICoreUtils.createNamedPane(itemNameTextField, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Name") + ":"), BorderLayout.NORTH); + headerPane.add(GUICoreUtils.createNamedPane(itemNameTextField, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Name")), BorderLayout.NORTH); headerPane.add(urlWithHelp, BorderLayout.CENTER); } else { - headerPane.add(urlWithHelp, BorderLayout.NORTH); + headerPane.add(urlWithHelp); } return headerPane; diff --git a/designer-base/src/main/java/com/fr/design/hyperlink/WebHyperlinkPane.java b/designer-base/src/main/java/com/fr/design/hyperlink/WebHyperlinkPane.java index 2975e7c343..5147ed064d 100644 --- a/designer-base/src/main/java/com/fr/design/hyperlink/WebHyperlinkPane.java +++ b/designer-base/src/main/java/com/fr/design/hyperlink/WebHyperlinkPane.java @@ -1,8 +1,10 @@ package com.fr.design.hyperlink; +import com.fine.theme.light.ui.FineRoundBorder; import com.fr.base.Parameter; import com.fr.design.gui.frpane.ReportletParameterViewPane; import com.fr.design.gui.icheckbox.UICheckBox; +import com.fr.design.gui.icontainer.UIScrollPane; import com.fr.design.gui.itableeditorpane.ParameterTableModel; import com.fr.design.i18n.Toolkit; import com.fr.design.layout.FRGUIPaneFactory; @@ -17,6 +19,10 @@ import java.awt.FlowLayout; import java.util.HashMap; import java.util.List; +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.cell; + public class WebHyperlinkPane extends AbstractHyperLinkPane { private static final int BORDER_WIDTH = 4; private WebHyperNorthPane northPane; @@ -38,14 +44,19 @@ public class WebHyperlinkPane extends AbstractHyperLinkPane { this.setBorder(BorderFactory.createEmptyBorder(BORDER_WIDTH, BORDER_WIDTH, BORDER_WIDTH, BORDER_WIDTH)); northPane = new WebHyperNorthPane(needRenamePane()); - this.add(northPane, BorderLayout.NORTH); + //this.add(northPane, BorderLayout.NORTH); parameterViewPane = new ReportletParameterViewPane(getChartParaType(), getValueEditorPane(), getValueEditorPane()); - this.add(parameterViewPane, BorderLayout.CENTER); + //this.add(parameterViewPane, BorderLayout.CENTER); parameterViewPane.setBorder(GUICoreUtils.createTitledBorder(Toolkit.i18nText("Fine-Design_Basic_Parameters"), null)); extendParametersCheckBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Extends_Report_Parameters")); - this.add(GUICoreUtils.createFlowPane(new Component[]{extendParametersCheckBox}, FlowLayout.LEFT), BorderLayout.SOUTH); + //this.add(GUICoreUtils.createFlowPane(new Component[]{extendParametersCheckBox}, FlowLayout.LEFT), BorderLayout.SOUTH); + this.add(column( + cell(northPane), + cell(parameterViewPane).weight(1.0), + cell(extendParametersCheckBox) + ).getComponent()); } @Override 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 848ac9e57c..2b5f42398f 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 @@ -1,5 +1,6 @@ package com.fr.design.hyperlink.popup; +import com.fine.theme.utils.FineUIUtils; import com.fr.base.BaseFormula; import com.fr.base.BaseUtils; import com.fr.base.Parameter; @@ -10,6 +11,7 @@ import com.fr.design.gui.frpane.ReportletParameterViewPane; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIRadioButton; import com.fr.design.gui.icheckbox.UICheckBox; +import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.itableeditorpane.UITableEditAction; import com.fr.design.gui.itextfield.UITextField; import com.fr.design.gui.itree.filetree.ReportletPane; @@ -31,6 +33,10 @@ import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.util.List; +import static com.fine.swing.ui.layout.Layouts.row; +import static com.fine.swing.ui.layout.Layouts.column; +import static com.fine.swing.ui.layout.Layouts.cell; + public class ContentSettingPane extends AbstractHyperLinkPane { private JPanel popupTargetPane; private UIRadioButton templatePopupButton; @@ -47,7 +53,7 @@ public class ContentSettingPane extends AbstractHyperLinkPane { private ContentSettingPane contentSettingPane; private StyleSettingPane styleSettingPane; @@ -26,9 +30,11 @@ public class MobilePopupPane extends FurtherBasicBeanPane JPanel scrollContent = new JPanel(); scrollContent.setLayout(new BorderLayout(10, 10)); contentSettingPane = new ContentSettingPane(); - scrollContent.add(contentSettingPane, BorderLayout.NORTH); styleSettingPane = new StyleSettingPane(); - scrollContent.add(styleSettingPane, BorderLayout.CENTER); + scrollContent.add(column(20, + cell(FineUIUtils.wrapComponentWithTitle(contentSettingPane, Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Content"))), + cell(FineUIUtils.wrapComponentWithTitle(styleSettingPane, Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Style"))) + ).getComponent()); contentSettingPane.addTargetRadioActionListener(radioActionListener); diff --git a/designer-base/src/main/java/com/fr/design/hyperlink/popup/MobilePopupRegularPane.java b/designer-base/src/main/java/com/fr/design/hyperlink/popup/MobilePopupRegularPane.java index 65e5085d15..419c27cc87 100644 --- a/designer-base/src/main/java/com/fr/design/hyperlink/popup/MobilePopupRegularPane.java +++ b/designer-base/src/main/java/com/fr/design/hyperlink/popup/MobilePopupRegularPane.java @@ -55,7 +55,7 @@ public class MobilePopupRegularPane extends BasicPane { radiosPane.add(customRadio); radiosPane.add(autoRadio); - return MobilePopupUIUtils.createLeftTileRightContentPanel(this.label, radiosPane); + return MobilePopupUIUtils.createLeftTileRightContentPanel(this.label, radiosPane, Color.GRAY); } private ActionListener radioActionListener = new ActionListener() { diff --git a/designer-base/src/main/java/com/fr/design/hyperlink/popup/MobilePopupUIUtils.java b/designer-base/src/main/java/com/fr/design/hyperlink/popup/MobilePopupUIUtils.java index cb3fbad58e..65a413e479 100644 --- a/designer-base/src/main/java/com/fr/design/hyperlink/popup/MobilePopupUIUtils.java +++ b/designer-base/src/main/java/com/fr/design/hyperlink/popup/MobilePopupUIUtils.java @@ -2,24 +2,34 @@ package com.fr.design.hyperlink.popup; import com.fr.design.gui.ilable.UILabel; import com.fr.design.mainframe.widget.UITitleSplitLine; +import sun.awt.windows.WComponentPeer; import javax.swing.*; import java.awt.*; +import static com.fine.swing.ui.layout.Layouts.row; +import static com.fine.swing.ui.layout.Layouts.cell; + public class MobilePopupUIUtils { static public int Line_Height = 20; static public int SplitLineWidth = 520; static public int Left_Title_width = 80; static public JPanel createLeftTileRightContentPanel(String title, JComponent contentPanel) { + return createLeftTileRightContentPanel(title, contentPanel, null); + } + static public JPanel createLeftTileRightContentPanel(String title, JComponent contentPanel, Color color) { JPanel jp = new JPanel(); - jp.setBorder(BorderFactory.createEmptyBorder(0,0,0, 30)); - jp.setLayout(new BorderLayout(10,0)); - UILabel titleLabel = new UILabel(title + ":"); - titleLabel.setPreferredSize(new Dimension(MobilePopupUIUtils.Left_Title_width, Line_Height)); - titleLabel.setHorizontalAlignment(SwingConstants.RIGHT); - jp.add(titleLabel, BorderLayout.WEST); - jp.add(contentPanel, BorderLayout.CENTER); + jp.setLayout(new BorderLayout()); + UILabel titleLabel = new UILabel(title); + if (color != null) { + titleLabel.setForeground(color); + } + titleLabel.setForeground(color); + jp.add(row(10, + cell(titleLabel), + cell(contentPanel) + ).getComponent()); return jp; } diff --git a/designer-base/src/main/java/com/fr/design/hyperlink/popup/StyleSettingPane.java b/designer-base/src/main/java/com/fr/design/hyperlink/popup/StyleSettingPane.java index 1bebe3dfc8..6ca7048af1 100644 --- a/designer-base/src/main/java/com/fr/design/hyperlink/popup/StyleSettingPane.java +++ b/designer-base/src/main/java/com/fr/design/hyperlink/popup/StyleSettingPane.java @@ -16,6 +16,11 @@ import com.fr.stable.StringUtils; import javax.swing.*; 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 StyleSettingPane extends BasicBeanPane { private double maxNumber = 100; private double maxBorderRadius = 24; @@ -40,65 +45,81 @@ public class StyleSettingPane extends BasicBeanPane { } private void initComponent() { - this.setLayout(new BorderLayout(0, 10)); - this.setBorder(GUICoreUtils.createTitledBorder(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Style"))); + this.setLayout(new BorderLayout()); typePane = this.createTypePane(); - this.add(typePane, BorderLayout.NORTH); stylePane = this.createStylePane(); - this.add(stylePane, BorderLayout.CENTER); + this.add(column(10, + cell(typePane), + cell(stylePane) + ).getComponent()); } private JPanel createTypePane() { JPanel typePane = FRGUIPaneFactory.createBorderLayout_S_Pane(); popupTypeLabel = new UILabel(""); - typePane.add(popupTypeLabel, BorderLayout.CENTER); - return MobilePopupUIUtils.createLeftTileRightContentPanel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Type"), typePane); + UILabel typeLabel = new UILabel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Type")); + typePane.add(row(40, + cell(typeLabel), + cell(popupTypeLabel) + ).getComponent()); + return typePane; } private JPanel createStylePane() { JPanel stylePane = FRGUIPaneFactory.createBorderLayout_S_Pane(); - stylePane.add(this.createBorderSettingPane(), BorderLayout.NORTH); - stylePane.add(this.createBackgroundSettingPane(), BorderLayout.CENTER); - stylePane.add(this.createPopupSizePane(), BorderLayout.SOUTH); + stylePane.add(column(10, + cell(this.createBorderSettingPane()), + cell(this.createBackgroundSettingPane()), + cell(this.createPopupSizePane()) + ).getComponent()); return stylePane; } private JPanel createBorderSettingPane() { JPanel borderPane = new JPanel(); - VerticalFlowLayout layout = new VerticalFlowLayout(VerticalFlowLayout.TOP, 0, 10); - layout.setAlignLeft(true); - borderPane.setLayout(layout); + borderPane.setLayout(new BorderLayout()); borderType = new LineComboBox(MobilePopupConstants.BORDER_LINE_STYLE_ARRAY); borderType.setPreferredSize(new Dimension(115, 20)); - borderPane.add(MobilePopupUIUtils.createLeftTileRightContentPanel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Line"), borderType)); borderColor = new NewColorSelectBox(100); - borderPane.add(MobilePopupUIUtils.createLeftTileRightContentPanel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Colors"), borderColor)); borderRadiusSpinner = new UISpinner(0, maxBorderRadius, 1, 20); borderRadiusSpinner.setPreferredSize(new Dimension(120, 20)); - borderPane.add(MobilePopupUIUtils.createLeftTileRightContentPanel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Radius"), borderRadiusSpinner)); - return MobilePopupUIUtils.createTitleSplitLineContentPane(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Border"), borderPane); + JLabel label = new JLabel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Border")); + borderPane.add(row(40, + column(10, + cell(label).weight(0.3), + flex().weight(0.7)), + column(10, + cell(MobilePopupUIUtils.createLeftTileRightContentPanel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Line"), borderType, Color.GRAY)), + cell(MobilePopupUIUtils.createLeftTileRightContentPanel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Colors"), borderColor, Color.GRAY)), + cell(MobilePopupUIUtils.createLeftTileRightContentPanel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Radius"), borderRadiusSpinner, Color.GRAY))) + ).getComponent()); + return borderPane; } private JPanel createBackgroundSettingPane() { JPanel bgPane = new JPanel(); - VerticalFlowLayout layout = new VerticalFlowLayout(VerticalFlowLayout.TOP, 0, 10); - layout.setAlignLeft(true); - bgPane.setLayout(layout); + bgPane.setLayout(new BorderLayout()); - JPanel colorPane = new JPanel(new FlowLayout(FlowLayout.LEFT, 0,0)); bgColor = new NewColorSelectBox(100); - colorPane.add(MobilePopupUIUtils.createLeftTileRightContentPanel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Colors"), bgColor)); - bgPane.add(colorPane); JPanel transparencyPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); this.numberDragPane = new UINumberDragPane(0,100); this.numberDragPane.setPreferredSize(new Dimension(140, 20)); transparencyPane.add(numberDragPane, BorderLayout.CENTER); transparencyPane.add(new UILabel(" %"), BorderLayout.EAST); - bgPane.add(MobilePopupUIUtils.createLeftTileRightContentPanel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Opacity"), transparencyPane)); - return MobilePopupUIUtils.createTitleSplitLineContentPane(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Background"), bgPane); + JLabel bgLabel = new JLabel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Background")); + bgPane.add(row(40, + column(10, + cell(bgLabel).weight(0.6), + flex().weight(0.4)), + column(10, + cell(MobilePopupUIUtils.createLeftTileRightContentPanel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Colors"), bgColor, Color.GRAY)), + cell(MobilePopupUIUtils.createLeftTileRightContentPanel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Opacity"), transparencyPane, Color.GRAY)) + ) + ).getComponent()); + return bgPane; } private JPanel createPopupSizePane() { @@ -107,10 +128,17 @@ public class StyleSettingPane extends BasicBeanPane { mobileRegularPane = new MobilePopupRegularPane(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Mobile_Rules")); padRegularPane = new MobilePopupRegularPane(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Pad_Rules")); - sizePane.add(mobileRegularPane, BorderLayout.NORTH); - sizePane.add(padRegularPane, BorderLayout.CENTER); - - return MobilePopupUIUtils.createTitleSplitLineContentPane(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Size"), sizePane); + JLabel sizeLabel = new JLabel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Size")); + sizePane.add(row(14, + column(10, + cell(sizeLabel).weight(0.16), + flex().weight(0.84)), + column(10, + cell(mobileRegularPane), + cell(padRegularPane) + ) + ).getComponent()); + return sizePane; } @Override diff --git a/designer-base/src/main/java/com/fr/design/javascript/EmailPane.java b/designer-base/src/main/java/com/fr/design/javascript/EmailPane.java index 21961318bc..50464a51ee 100644 --- a/designer-base/src/main/java/com/fr/design/javascript/EmailPane.java +++ b/designer-base/src/main/java/com/fr/design/javascript/EmailPane.java @@ -8,14 +8,25 @@ import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.itextfield.UITextField; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.TableLayout; -import com.fr.design.layout.TableLayoutHelper; import com.fr.js.EmailJavaScript; import com.fr.stable.StringUtils; -import javax.swing.*; +import javax.swing.BorderFactory; +import javax.swing.JComponent; +import javax.swing.JPanel; +import javax.swing.JScrollPane; +import javax.swing.JTextArea; +import javax.swing.SwingConstants; import javax.swing.text.JTextComponent; -import java.awt.*; + +import java.awt.BorderLayout; +import java.awt.Color; + +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.flex; +import static com.fine.swing.ui.layout.Layouts.row; public class EmailPane extends FurtherBasicBeanPane { @@ -37,12 +48,12 @@ public class EmailPane extends FurtherBasicBeanPane { this.setLayout(FRGUIPaneFactory.createM_BorderLayout()); this.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 10)); tipsPane1 = new UILabel(); - tipsPane1.setHorizontalAlignment(SwingConstants.RIGHT); - tipsPane1.setForeground(Color.pink); + tipsPane1.setHorizontalAlignment(SwingConstants.LEFT); + tipsPane1.setForeground(Color.gray); tipsPane2 = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_EmailPane_Tips")); - UILabel mainTextLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_EmailPane_Mail_Content") + ":"); - mainTextLabel.setHorizontalAlignment(SwingConstants.RIGHT); + UILabel mainTextLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_EmailPane_Mail_Content")); + mainTextLabel.setHorizontalAlignment(SwingConstants.LEFT); mainTextLabel.setVerticalAlignment(SwingConstants.TOP); JScrollPane scrollPane = new JScrollPane(mainTextEditor = new JTextArea()); scrollPane.setBorder(null); @@ -62,21 +73,23 @@ public class EmailPane extends FurtherBasicBeanPane { double[] rowSize = { preferred, preferred, preferred, preferred, preferred, fill, preferred, preferred, preferred }; double[] columnSize = { preferred, fill}; showTplContent = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Email_Can_Preview_Report_Content")); - centerPane = TableLayoutHelper.createCommonTableLayoutPane(new JComponent[][]{ - {new UILabel(), tipsPane1}, - createLinePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_HJS_Mail_to"), maitoEditor = new UITextField()), - createLinePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_HJS_CC_To"), ccEditor = new UITextField()), - createLinePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_EmailPane_Bcc"), bccEditor = new UITextField()), - createLinePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_EmailPane_Mail_Subject"), titleEditor = new UITextField()), - {mainTextLabel, scrollPane}, - {new UILabel(), showTplContent}, - {new UILabel(), tipsPane2}},rowSize, columnSize, 8); + + centerPane = new JPanel(new BorderLayout()); + centerPane.add(column(10, + row(cell(tipsPane1), cell(new UILabel())), + row(cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_HJS_Mail_to"))).weight(0.1), flex(0.04), cell(maitoEditor = new UITextField()).weight(0.86)), + row(cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_HJS_CC_To"))).weight(0.1), flex(0.04), cell(ccEditor = new UITextField()).weight(0.86)), + row(cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_EmailPane_Bcc"))).weight(0.1), flex(0.04), cell(bccEditor = new UITextField()).weight(0.86)), + row(cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_EmailPane_Mail_Subject"))).weight(0.1), flex(0.04), cell(titleEditor = new UITextField()).weight(0.86)), + row(cell(mainTextLabel).weight(0.1), flex(0.04), cell(scrollPane).weight(0.86)).weight(1.0), + row(cell(new UILabel()).weight(0.1), flex(0.04), cell(showTplContent).weight(0.86)), + row(cell(new UILabel()).weight(0.14), cell(tipsPane2).weight(0.86)) + ).getComponent()); } protected JComponent[] createLinePane(String string, JTextComponent textComp) { - UILabel label = new UILabel(string + ":"); - label.setPreferredSize(new Dimension(70, label.getPreferredSize().height)); - label.setHorizontalAlignment(SwingConstants.RIGHT); + UILabel label = new UILabel(string); + label.setHorizontalAlignment(SwingConstants.LEFT); return new JComponent[] { label, textComp }; } diff --git a/designer-base/src/main/java/com/fr/design/javascript/JSContentPane.java b/designer-base/src/main/java/com/fr/design/javascript/JSContentPane.java index 31c45da762..8ec6bebafc 100644 --- a/designer-base/src/main/java/com/fr/design/javascript/JSContentPane.java +++ b/designer-base/src/main/java/com/fr/design/javascript/JSContentPane.java @@ -26,6 +26,7 @@ import com.fr.design.mainframe.DesignerContext; import com.fr.general.IOUtils; import com.fr.js.JavaScriptImpl; +import javax.swing.BorderFactory; import javax.swing.JPanel; import javax.swing.KeyStroke; import javax.swing.SwingConstants; @@ -40,6 +41,9 @@ import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.util.ArrayList; +import static com.fine.swing.ui.layout.Layouts.row; +import static com.fine.swing.ui.layout.Layouts.cell; + public class JSContentPane extends BasicPane { protected RSyntaxTextArea contentTextArea; private UILabel funNameLabel = new UILabel(); @@ -47,7 +51,7 @@ public class JSContentPane extends BasicPane { private static final Dimension FUNCTION_NAME_LABEL_SIZE = new Dimension(300, 80); private String[] defaultArgs; private int titleWidth = 180; - private JPanel labelPane = new JPanel(new BorderLayout(6, 4));; + private JPanel labelPane = new JPanel(); private NewJavaScriptImplPane newJavaScriptImplPane = null; private JavaScriptImpl javaScript; private JSImplUpdateAction jsImplUpdateAction; @@ -97,7 +101,6 @@ public class JSContentPane extends BasicPane { private void addNewPaneLabel(){ UILabel advancedEditorLabel = new UILabel(Toolkit.i18nText("Fine-Design_Advanced_Editor"), IconUtils.readIcon("com/fr/design/images/edit/advancedEditor.svg"), SwingConstants.LEFT); advancedEditorLabel.setCursor(new Cursor(Cursor.HAND_CURSOR)); - advancedEditorLabel.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { @@ -183,15 +186,16 @@ public class JSContentPane extends BasicPane { }.execute(); } }); - + labelPane.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 10)); labelPane.add(label,BorderLayout.CENTER); - JPanel jsParaPane = new JPanel(new BorderLayout(4, 4)); - jsParaPane.setPreferredSize(new Dimension(300, 80)); + JPanel jsParaPane = new JPanel(new BorderLayout()); + UIScrollPane scrollPane = new UIScrollPane(funNameLabel); - scrollPane.setPreferredSize(FUNCTION_NAME_LABEL_SIZE); scrollPane.setBorder(new UIRoundedBorder(UIConstants.TITLED_BORDER_COLOR, 1, UIConstants.ARC)); - jsParaPane.add(scrollPane, BorderLayout.WEST); - jsParaPane.add(labelPane, BorderLayout.EAST); + jsParaPane.add(row(10, + cell(scrollPane).weight(0.6), + cell(labelPane).weight(0.4) + ).getComponent()); return jsParaPane; } diff --git a/designer-base/src/main/java/com/fr/design/javascript/JavaScriptImplPane.java b/designer-base/src/main/java/com/fr/design/javascript/JavaScriptImplPane.java index 37bca2f6eb..e2a740c534 100644 --- a/designer-base/src/main/java/com/fr/design/javascript/JavaScriptImplPane.java +++ b/designer-base/src/main/java/com/fr/design/javascript/JavaScriptImplPane.java @@ -25,11 +25,14 @@ import javax.swing.event.TableModelListener; import java.awt.BorderLayout; import java.awt.Dimension; import java.awt.GridBagConstraints; -import java.awt.GridLayout; import java.util.HashMap; import java.util.HashSet; import java.util.List; +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.cell; + public class JavaScriptImplPane extends AbstractHyperLinkPane { private static final int BOTTOM_BORDER = 12; private UITextField itemNameTextField; @@ -64,21 +67,23 @@ public class JavaScriptImplPane extends AbstractHyperLinkPane { protected void initComponents() { parameterPane = createParameterViewPane(); importedJsPane = createImportedJsPane(); - importedJsPane.setPreferredSize(new Dimension(265, 150)); jsPane = createJSContentPane(defaultArgs); jsPane.setBorder(BorderFactory.createTitledBorder(new ModLineBorder(ModLineBorder.TOP), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_JavaScript"))); - parameterPane.setPreferredSize(new Dimension(265, 150)); - JPanel topPane = new JPanel(new GridLayout(1,2)); - topPane.add(importedJsPane); - topPane.add(parameterPane); + JPanel topPane = new JPanel(new BorderLayout()); + topPane.add(row(10, + cell(importedJsPane).weight(0.5), + cell(parameterPane).weight(0.5) + ).getComponent()); topPane.setBorder(BorderFactory.createEmptyBorder(0, 0, BOTTOM_BORDER, 0)); this.setLayout(new BorderLayout()); - this.add(topPane, BorderLayout.NORTH); - this.add(jsPane, BorderLayout.CENTER); + this.add(column(10, + cell(topPane).weight(0.5), + cell(jsPane).weight(0.5) + ).getComponent()); this.reLayoutForChart(); } diff --git a/designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java b/designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java index 6d33c5946b..818665b989 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java @@ -890,6 +890,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer { propertyPanel = new JPanel(); contentPane = generateContentPane(); popupToolPane = new PopupToolPane(this, PopupToolPane.DOWN_BUTTON); + popupToolPane.setPreferredSize(new Dimension(0, 34)); headerPane = new JPanel(); headerPane.setPreferredSize(new Dimension(headerPane.getPreferredSize().width, 0)); // 默认隐藏 contentArea = new JPanel(new BorderLayout()); 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 22211acff1..a1e73dcfa8 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 @@ -2,6 +2,7 @@ package com.fr.design.parameter; import com.fr.base.Parameter; import com.fr.base.ParameterConfig; +import com.fr.base.svg.IconUtils; import com.fr.design.gui.controlpane.JListControlPane; import com.fr.design.gui.controlpane.NameableCreator; import com.fr.design.gui.controlpane.NameableSelfCreator; @@ -57,7 +58,10 @@ public class ParameterArrayPane extends JListControlPane { */ public NameableCreator[] createNameableCreators() { return new NameableCreator[]{ - new NameableSelfCreator(Toolkit.i18nText("Fine-Design_Basic_Engine_Parameter_Name"), Parameter.class, ParameterPane.class) { + new NameableSelfCreator(Toolkit.i18nText("Fine-Design_Basic_Engine_Parameter_Name"), + "com/fr/design/images/server/global_param.png", + Parameter.class, + ParameterPane.class) { public Parameter createNameable(UnrepeatedNameHelper helper) { // 返回参数设置面板. return new Parameter(helper.createUnrepeatedName(DEFAULT_PARAMETER_NAME_PREFIX)); diff --git a/designer-base/src/main/java/com/fr/design/widget/component/DateValuePane.java b/designer-base/src/main/java/com/fr/design/widget/component/DateValuePane.java index 846bf6b3f0..a02efff2dc 100644 --- a/designer-base/src/main/java/com/fr/design/widget/component/DateValuePane.java +++ b/designer-base/src/main/java/com/fr/design/widget/component/DateValuePane.java @@ -63,7 +63,7 @@ public class DateValuePane extends Column { }); this.add( row( - cell(titleLabel).weight(1.2), cell(widgetValueHead).weight(3) + cell(titleLabel).weight(1.2), cell(widgetValueHead).weight(1.6), flex(1.4) ), cell(customRow) ); diff --git a/designer-base/src/main/java/com/fr/design/widget/component/NumberEditorValidatePane.java b/designer-base/src/main/java/com/fr/design/widget/component/NumberEditorValidatePane.java index 7d5c817e16..3196769942 100644 --- a/designer-base/src/main/java/com/fr/design/widget/component/NumberEditorValidatePane.java +++ b/designer-base/src/main/java/com/fr/design/widget/component/NumberEditorValidatePane.java @@ -70,10 +70,12 @@ public class NumberEditorValidatePane extends JPanel { this.allowNegativeCheckBox.addActionListener(allowNegativeListener); this.setMaxValueCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Need_Max_Value"), false); this.maxValueSpinner = new UISpinner(-Double.MAX_VALUE, Double.MAX_VALUE, 1D, 0D); + this.maxValueSpinner.setSize(this.decimalLength.getSize()); this.setMaxValueCheckBox.addActionListener(setMaxListener); this.maxValueSpinner.addChangeListener(maxValueChangeListener); this.setMinValueCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Need_Min_Value"), false); this.minValueSpinner = new UISpinner(-Double.MAX_VALUE, Double.MAX_VALUE, 1D, 0D); + this.minValueSpinner.setSize(this.decimalLength.getSize()); this.setMinValueCheckBox.addActionListener(setMinListener); this.minValueSpinner.addChangeListener(minValueChangeListener); initErrorMsgPane(); @@ -91,10 +93,10 @@ public class NumberEditorValidatePane extends JPanel { cell(limitNumberPane), cell(allowNegativeCheckBox), row( - cell(setMaxValueCheckBox).weight(1), cell(maxValueSpinner).weight(1.5) + cell(setMaxValueCheckBox).weight(1.2), cell(maxValueSpinner).weight(3) ), row( - cell(setMinValueCheckBox).weight(1), cell(minValueSpinner).weight(1.5) + cell(setMinValueCheckBox).weight(1.2), cell(minValueSpinner).weight(3) ), cell(errorMsgBorderPane) ).getComponent()); 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 717f19b907..a7204f4467 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,5 +1,6 @@ package com.fr.design.write.submit; +import com.fine.theme.utils.FineUIScale; import com.fr.base.GraphHelper; import com.fr.data.AbstractClassJob; import com.fr.design.data.tabledata.tabledatapane.ClassNameSelectPane; @@ -34,22 +35,22 @@ import static com.fine.swing.ui.layout.Layouts.row; public abstract class CustomJobPane extends BasicBeanPane { protected UITextField classNameTextField; protected ObjectProperiesPane objectProperiesPane; - private static final int DEFAULT_LENGTH = 25; + private static final int DEFAULT_LENGTH = 33; public CustomJobPane() { this.setLayout(FRGUIPaneFactory.createBorderLayout()); JPanel reportletNamePane = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane(); - classNameTextField = new UITextField(getLengthOfTextField()); + classNameTextField = new UITextField(); //reportletNamePane.add(classNameTextField); UIButton browserButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Select")); browserButton.setPreferredSize(new Dimension( - GraphHelper.getWidth(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Select")) + 20, + GraphHelper.getWidth(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Select")) + 40, classNameTextField.getPreferredSize().height)); UIButton editButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Edit")); editButton.setPreferredSize(new Dimension( - GraphHelper.getWidth(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Select")) + 20, + GraphHelper.getWidth(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Select")) + 40, classNameTextField.getPreferredSize().height)); /*reportletNamePane.add(browserButton); @@ -94,10 +95,11 @@ 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(1.0), - cell(browserButton), - cell(editButton) + cell(classNameTextField).weight(0.8), + cell(browserButton).weight(0.1), + cell(editButton).weight(0.1) ).getComponent()); //this.add(reportletNamePane, BorderLayout.NORTH); @@ -120,7 +122,7 @@ public abstract class CustomJobPane extends BasicBeanPane { } public int getLengthOfTextField() { - return DEFAULT_LENGTH; + return FineUIScale.scale(DEFAULT_LENGTH); } protected String title4PopupWindow() { 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 103156944d..6dfa381e81 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 @@ -5,7 +5,6 @@ import com.fine.theme.utils.FineUIScale; import com.fr.base.BaseFormula; import com.fr.base.BaseUtils; import com.fr.base.Parameter; -import com.fr.cert.token.lang.Collections; import com.fr.data.DataConstants; import com.fr.data.condition.JoinCondition; import com.fr.data.condition.ListCondition; @@ -34,8 +33,6 @@ import com.fr.design.gui.ilist.CheckBoxList; import com.fr.design.gui.itree.refreshabletree.ExpandMutableTreeNode; import com.fr.design.javascript.JavaScriptActionPane; import com.fr.design.layout.FRGUIPaneFactory; -import com.fr.design.layout.FRLeftFlowLayout; -import com.fr.design.layout.LeftCenterRightLayout; import com.fr.design.mainframe.DesignerContext; import com.fr.design.scrollruler.ModLineBorder; import com.fr.design.utils.gui.GUICoreUtils; @@ -53,6 +50,7 @@ import com.fr.write.config.DeleteConfig; import com.fr.write.config.InsertConfig; import com.fr.write.config.IntelliDMLConfig; import com.fr.write.config.UpdateConfig; +import sun.swing.table.DefaultTableCellHeaderRenderer; import javax.swing.AbstractCellEditor; import javax.swing.BorderFactory; @@ -66,6 +64,7 @@ import javax.swing.JScrollPane; import javax.swing.JTable; import javax.swing.JTree; import javax.swing.ListSelectionModel; +import javax.swing.SwingConstants; import javax.swing.SwingUtilities; import javax.swing.table.AbstractTableModel; import javax.swing.table.DefaultTableCellRenderer; @@ -152,27 +151,20 @@ public class DBManipulationPane extends BasicBeanPane { this.v_Types = v_Types; JPanel northPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); - //this.add(northPane, BorderLayout.NORTH); dmlConfigComboBox = new UIComboBox(DML_CONFIG_TYPES); - //JPanel typePane = GUICoreUtils.createFlowPane(new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Write_Choose_Submit_Type") + ":"), dmlConfigComboBox}, - // FlowLayout.LEFT, 10); 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(dmlConfigComboBox)).getComponent(), BorderLayout.WEST); + cell(dmlConfigComboBox)).getComponent()); typePane.setBorder(BorderFactory.createTitledBorder(new ModLineBorder(ModLineBorder.TOP), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Write_Submit_Type"))); - //northPane.add(typePane, BorderLayout.NORTH); 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); - //northPane.add(chooseTable, BorderLayout.CENTER); - // peter:编辑的TablePane JPanel editTablePane = FRGUIPaneFactory.createBorderLayout_S_Pane(); - //this.add(editTablePane, BorderLayout.CENTER); 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(); @@ -180,6 +172,9 @@ public class DBManipulationPane extends BasicBeanPane { keyColumnValuesTable.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); keyColumnValuesTable.setPreferredScrollableViewportSize(new Dimension(280, 150)); keyColumnValuesTable.setShowHorizontalLines(true); + DefaultTableCellHeaderRenderer headerRenderer = new DefaultTableCellHeaderRenderer(); + headerRenderer.setHorizontalAlignment(SwingConstants.LEFT); + keyColumnValuesTable.getTableHeader().setDefaultRenderer(headerRenderer); northPane.add(column(10, true, cell(typePane), @@ -215,15 +210,9 @@ public class DBManipulationPane extends BasicBeanPane { JPanel controlBtnPane = new JPanel(new BorderLayout()); editTablePane.add(GUICoreUtils.createBorderPane(controlBtnPane, BorderLayout.NORTH), BorderLayout.EAST); List buttonGroup = Arrays.stream(actions).map(action -> cell(new UIButton(action))).collect(Collectors.toList()); - /*for (UpdateAction action : actions) { - controlBtnPane.add(new UIButton(action)); - }*/ checkBoxUpdatePane = new JPanel(new BorderLayout(0, 0)); checkBoxUpdatePane.setPreferredSize(new Dimension(120, 20)); - //buttonGroup.add(cell(checkBoxUpdatePane)); - //controlBtnPane.add(column(5, buttonGroup.toArray(new Layouts.Cell[0])).getComponent()); - //controlBtnPane.add(checkBoxUpdatePane); UpdateCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_RWA_NotChange_Unmodified")); UIButton helpButton = new UIButton(HEIP_ICON); @@ -239,12 +228,8 @@ public class DBManipulationPane extends BasicBeanPane { } }); helpButton.set4ToolbarButton(); - //checkBoxUpdatePane.add(UpdateCheckBox, BorderLayout.WEST); - //checkBoxUpdatePane.add(helpButton, BorderLayout.EAST); buttonGroup.add(row(5, cell(UpdateCheckBox), cell(helpButton))); - //checkBoxUpdatePane.add(row(5, cell(UpdateCheckBox), - // cell(helpButton)).getComponent()); controlBtnPane.add(column(5, buttonGroup.toArray(new Layouts.Cell[0])).getComponent()); } } @@ -323,7 +308,6 @@ public class DBManipulationPane extends BasicBeanPane { DefaultTreeCellRenderer cr = (DefaultTreeCellRenderer) conditionsTree.getCellRenderer(); cr.setForeground(UIConstants.NORMAL_BACKGROUND); JScrollPane jp = new JScrollPane(conditionsTree); - addComponent(conditionPane, jp); UIButton addSubmitConditionButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Set_Submit_Condition")); addSubmitConditionButton.addActionListener(new ActionListener() { @@ -355,8 +339,11 @@ public class DBManipulationPane extends BasicBeanPane { JPanel controlBtnPane = new JPanel(new GridLayout(1, 1, 4, 4)); controlBtnPane.setPreferredSize(createControlBtnPanePreferredSize()); - conditionPane.add(GUICoreUtils.createBorderPane(controlBtnPane, BorderLayout.NORTH), setControlBtnPanePosition()); 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) + ).getComponent()); return conditionPane; } @@ -698,6 +685,7 @@ public class DBManipulationPane extends BasicBeanPane { private void initJTableColumn() { TableColumn column0 = this.keyColumnValuesTable.getColumnModel().getColumn(0); column0.setMaxWidth(50); + column0.setCellRenderer(new ColumnNameTableCellRenderer()); TableColumn column1 = this.keyColumnValuesTable.getColumnModel().getColumn(1); column1.setCellRenderer(new ColumnNameTableCellRenderer()); @@ -1187,7 +1175,7 @@ public class DBManipulationPane extends BasicBeanPane { @Override public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column); - + this.setHorizontalAlignment(SwingConstants.LEFT); if (value instanceof ColumnName) { this.setText(((ColumnName) value).name); } @@ -1203,6 +1191,7 @@ public class DBManipulationPane extends BasicBeanPane { @Override public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column); + this.setHorizontalAlignment(SwingConstants.LEFT); if (value instanceof ColumnValue) { if (((ColumnValue) value).obj != null) { diff --git a/designer-base/src/main/resources/com/fr/design/images/data/hyperlink.png b/designer-base/src/main/resources/com/fr/design/images/data/hyperlink.png new file mode 100644 index 0000000000000000000000000000000000000000..0fae16edfd307b8152a83ab4356135a42f479d91 GIT binary patch literal 844 zcmV-S1GD^zP)oC4Xp)cpZTen6z|P5waCAJC+GRrV5oK-oGK(Mp|~Ox=Kt zNDwsyCHQ)08{(J;*oG|aCn4L<_a5K7`|j=;;C~0sduisj%7jkAKrF~J5%q}R3~1CC zod0OSeGxD>HuI>AW41M%jj2geN2&j*MpNU3i@{SNKB(xE6 z%biSgni{}%x7+MPLfj$X@BD;s^X%_>dH`>Ai<`L@WhTKM!u+x%)SV|o9gP3{veVp~ zwdkPpy+Mw%!#-)TR|-QDYT0bjf@KJ}yC>Xr7bWL#(L@p9Do9KSkTPt!B0*$@he=$S z@Bw0CLV#oGrkVrl8^pkb1Z#l+e?d&FMK#RiN)?vub8<#IVGsGwuOIdFbVcuqeNnZ$n(+?>R7jU91>AebgC4y>uTZ!zHR9QC-5q!I+02k)oxbBoDyL= z4SOuO(|J3L>WQg3k%3CsW{QA>BAtTm`yk=zt8_4zfR+RrpLBMyND%G&k8gr{&=Lre z;E7dMN_Cc9WD?xK*rtI9*1%Nuc-(+F7<41?>s^}XwDwT;{h#*hlfOW1RILTT1qV)vta z#R;M1&0drDELIAGL9O(c600d`2O+f$vv5yPTeLZYKROY-~ zJ6mYOhGsj3wqOVrJidWs0LnUNuCFHU@H4!?lDWbOvycb!4}}3`b}bchuIuZ7W!@Lk zNvC+u84q^f?wc1*TGu4)fHDAO_#-^xz22&vPi_2j=#hp~{^{&ksv>&^gP#5(6X~d#-#r2xlP@N2W(7itRP?Sgt<@OyTikEz#(ip4pO^w zFMCh@ggVCc6f>Vk(?sioi}_$h`jRGT%$#EIw4Qb7df-G*o4A8s^a+FMDA+Lbc<{Li zMO>@oY#*E)_Vbt`x{>#=U2y3G5kk6B+;tbCic+)N0yoM)Ts(+pN@`X%rDhj1*bF>8 zdu-0|tWeU85Hv~EM4sD5;DRCYjYPef7CqIE0F-*cS{*#hzAd_@Nw*drBy$H9ky@S! z8_RWSF4r@;cXM04rTXEN(tW=F<}SgRC{v?dcsDRh|R zJYmp3aU(V|z~exqu*~zK%$^@O!*mEJK)kRY_fa7BA6N@zh>}y&YybcN07*qoM6N<$ Eg4p6*`v3p{ literal 3609 zcmV+!4(9QRP)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U zt5vFIcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^+ya? z2D1z#2HOnI7(B%_ac?{wFUQ;QQA1tBKtrWrm0_3Rgps+?Jfqb{jYbcQX~taRB;#$y zZN{S}1|}gUOHJxc?wV3fxuz+mJ4`!F$IZ;mqRrNsHJd##*D~ju=bP7?-?v~|cv>vB zsJ6IeNwVZxrdjT`yl#bBIa#GxRa#xMMy;K#CDyyGyQdMSxlWT#tDe?p!?5wT$+oGt z8L;Kp2HUQ-ZMJ=3XJQv;x5ci*?vuTfeY$;({XGW_huIFR9a(?@3)XSs8O^N5RyOM=TTmp(3=8^+zpz2r)C z^>JO{deZfso3oq3?Wo(Y?l$ge?uXo;%ru`Vo>?<<(8I_>;8Eq#KMS9gFl*neeosSB zfoHYnBQIkwkyowPu(zdms`p{<7e4kra-ZWq<2*OsGTvEV%s0Td$hXT+!*8Bnh2KMe zBmZRodjHV?r+_5^X9J0WL4jKW`}lf%A-|44I@@LTvf1rHjG(ze6+w@Jt%Bvjts!X0 z?2xS?_ve_-kiKB_KiJlZ$9G`c^=E@oNG)mWWaNo-3TIW8)$Hg0Ub-~8?KhvJ>$ z3*&nim@mj(aCxE5!t{lw7O5^0EIO7zOo&c6l<+|iDySBWCGrz@C5{St!X3hAA}`T4 z(TLbXTq+(;@<=L8dXnssyft|w#WSTW<++3>sgS%(4NTpeI-VAqb|7ssJvzNHgOZVu zaYCvgO_R1~>SyL=cFU|~g|hy|Zi}}s9+d~lYqOB71z9Z$wnC=pR9Yz4DhIM>Wmjgu z&56o6maCpC&F##y%G;1PobR9i?GnNg;gYtchD%p19a!eQtZF&3JaKv33gZ<8D~47E ztUS1iwkmDaPpj=$m#%)jCVEY4fnLGNg2A-`YwHVD3gv};>)hAvT~AmqS>Lr``i7kw zJ{5_It`yrBmlc25DBO7E8;5VoznR>Ww5hAaxn$2~(q`%A-YuS64wkBy=9dm`4cXeX z4c}I@?e+FW+b@^RDBHV(wnMq2zdX3SWv9u`%{xC-q*U}&`cyXV(%rRT*Z6MH?i+i& z_B8C(+grT%{XWUQ+f@NoP1R=AW&26{v-dx)iK^-Nmiuj8txj!m?Z*Ss1N{dh4z}01 z)YTo*JycSU)+_5r4#yw9{+;i4Ee$peRgIj+;v;ZGdF1K$3E%e~4LaI(jC-u%2h$&R z9cLXcYC@Xwnns&bn)_Q~Te?roKGD|d-g^8;+aC{{G(1^(O7m37Y1-+6)01cN&y1aw zoqc{T`P^XJqPBbIW6s}d4{z_f5Om?vMgNQEJG?v2T=KYd^0M3I6IZxbny)%vZR&LD zJpPl@Psh8QyPB@KTx+@RdcC!KX7}kEo;S|j^u2lU7XQ}Oo;f|;z4Ll+_r>@1-xl3| zawq-H%e&ckC+@AhPrP6BKT#_XdT7&;F71j}Joy zkC~6lh7E@6o;W@^IpRNZ{ptLtL(gQ-CY~4mqW;US7Zxvm_|@yz&e53Bp_lTPlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=0000WV@Og>004R=004l4008;_004mL004C`008P>0026e000+nl3&F} z0009-NklW6a3L5_aA87&F505#La`vU|A2T!lrCyojhUuNn%hjxr0FD`+joBFxTxv7e;;@j zkMiELyNRjEJ;3IB<0sw6pMCmsJQf>>$Kw^Y3q&y>pLGbS((#_H+^PK=EFaSt#tHQ8Z|nLYaA z(a7wTD`c)OxYl%9?`>*EYgo(XSYBPDqph{_Xm@w*#S0g3Vtd~`F+LLjXsw5hF~Rzc z6;g>5kM}3F_u#z4i=w%)k*3B*fZFWxGA1xos^QbX%sqtL*#SJ&6s+}e`ykd~$xn2odQ+_D}pfrN~`v>-+Ubb`2760oj{%Q9&0Vzcecsi%;7WyP9#+m ziPSAFE^X|8c)w8!w9zCJiTZqgv+&XM^bU}0h{po477r{eEz$MJfmC1&!NJbXiW6VC z;a3+n@*De7sT2xGC6g)^k4LSw(V9pEqYWa$t*tF;BQ=t$Pi!UX>d_9*rJ2h;Vr@q} z9!JFeui{WZBna@{W5r^fBNmHMDwoXnzyC6HWM~lWLx=bNfVEbv6{=x{Y%Yh0#W{yK zhqXd3mm>^AM1(N3#bUAC4xj~3e^1YO52JILIhUEsgq!*NcYn{$x@s8W#F4p{p;#_o z%49NI^Yimgp-v7DJ@qAk4s8__Ja*{NS7L3m6-gZK>pNzQ(Ml<-SOA_l*mu}@mo8N* z=_3P!XP$d<@NSJOYwP^*+plP2c - - 高级编辑 - - - - - - - \ No newline at end of file + + + + diff --git a/designer-base/src/main/resources/com/fr/design/images/m_format/cellstyle/new_bold.png b/designer-base/src/main/resources/com/fr/design/images/m_format/cellstyle/new_bold.png new file mode 100644 index 0000000000000000000000000000000000000000..51138933a79571ea32183c047a2a67dbf60fab04 GIT binary patch literal 611 zcmV-p0-XJcP)zHs3jhZIE?^(PZ~zRrWjiVih{}b9 zWLUBDc(ZFEQLytsiyQbGdw1XL{QKUUZw7eRTNgd`U?Fa`nRyqQmoO40blGM7>E&>Q zXUIJDz&UP0DVf~Iu9LCd51*ISuUezmU{$hMv?iSmSDMh z4v5C5M-xNt0n4?emDXGhcwL`K+Gkjnk~HUTAeREmuWLYo`p$pEaS3Oq(kx2cirA@SW@o3Irhgh0g}gZfFU{*!}Xw$G@BnVLo<&umHx;xeeEaojw2n002ovPDHLkV1ma#34{Ou literal 0 HcmV?d00001 diff --git a/designer-base/src/main/resources/com/fr/design/images/m_format/cellstyle/new_italic.png b/designer-base/src/main/resources/com/fr/design/images/m_format/cellstyle/new_italic.png new file mode 100644 index 0000000000000000000000000000000000000000..00d3176fb71f09a44ffe1c47d2f99611a14563ed GIT binary patch literal 445 zcmV;u0Yd(XP)9DPmr3yZ~)){8J~cQa1J;DZ~$@vl91XbutS+5g;m*${8Km?oUyc? zN#n2aj%BT$w0@ce1_sWIfCE?4;L|+ry3e3xnylyljYv2_Q`ph^{RJGjO!1&qK5M=c zQoevN1JQy&ugx)~MU=MWaw@?w>iWhP(pwcVQ9jq(pJms%jwLvRr1w}yvCZPW2{1{X zt4O@T61D&}xi8${7cu480+#SkKxSdNIMKKM-NdkjFMz~T733dqfF(dpg3#D#M1;NG zZrS?PNnxL7g7B)mMEP?yWM&ZOIjNe)Atn(hL7&VX|f7n n$%ztB0t?K^u-q^(a5nw`r%rplL>-uY00000NkvXXu0mjf`FOft literal 0 HcmV?d00001 diff --git a/designer-base/src/main/resources/com/fr/design/images/m_format/cellstyle/new_underline.png b/designer-base/src/main/resources/com/fr/design/images/m_format/cellstyle/new_underline.png new file mode 100644 index 0000000000000000000000000000000000000000..4a794e122f7dab58d4ebc026c254f57f94432cf9 GIT binary patch literal 476 zcmV<20VDp2P)ufS4GHl&DqYhuyRc zQ5ri@5e)tpTlRbZ`z${z0WkVwZ53^@cGqp}+4r?wJ50VpA4*6!*HZY{nX!zta#aAo zE(2fy41fVJ0EGaAFqI=BG@+zcIk@zw1c1cTuNYAuN)tdoP33-N0LIWK5GO!%So^34 znquvK4+tDlK8W9*$50jE^K~*6M%QwVXboGfW93!I7(_mlb0YLq@yaG-jBeyf#I!SG zFk%OXowc!IZ^m#WW7E?=U8(#LG$f7DvTjAVEFM@uck`s?%|9L%_uJS%aq9Ktj1yi8 z!=@}woL|K6FTq9tRuF*J01@4yI3juk;sc%Hr2u|F7R`vRNOWX#E{n=yqS?q(HJwpb zxmU1bcV#DQzk5B=I0`4{+0`}AkgEKKtCZ_m%Uj%z;5263fenhq=tp4m5A_W;sCHtr S@KCn^0000opzQ$?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 { JPanel reportEnginePane = new JPanel(new BorderLayout()); clientPaging = new UICheckBox(Toolkit.i18nText("Fine-Design_Report_Enable_Client_Page")); clientPaging.setSelected(false); - /*outPagingEngineSelectPane = new JPanel(); - outPagingEngineSelectPane.setLayout(FRGUIPaneFactory.createBorderLayout()); - outPagingEngineSelectPane.setVisible(false); - outPagingEngineSelectPane.setPreferredSize(new Dimension(FineUIScale.scale(600), FineUIScale.scale(300))); - outPagingEngineSelectPane.add(createPagingEngineSelectPane());*/ clientPaging.addActionListener(new SelectActionListener(clientPaging, outPagingEngineSelectPane)); reportEnginePane.add(clientPaging); return reportEnginePane; @@ -133,17 +128,10 @@ public class ReportEnginePane extends BasicBeanPane { engineSettingPane.add(box(cell(outEngineXSettingPane), cell(outLineEngineSettingPane)).getComponent() , BorderLayout.WEST); - /*engineSettingPane.add(outEngineXSettingPane, JLayeredPane.DEFAULT_LAYER); - engineSettingPane.add(outLineEngineSettingPane, JLayeredPane.DEFAULT_LAYER);*/ - //engineSettingPane.moveToFront(outEngineXSettingPane); engineSettingPane.setVisible(true); - JPanel pagingEngineSelectPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_M_Pane(); - pagingEngineSelectPane.add(createPagingEngineRadioPanel()); - pagingEngineSelectPane.add(engineSettingPane); - /*pagingEngineSelectPane.add(Layouts.column(10, - Layouts.cell(createPagingEngineSelectPane()), - Layouts.cell(engineSettingPane)) - .getComponent());*/ + JPanel pagingEngineSelectPane = new JPanel(new BorderLayout()); + pagingEngineSelectPane.add(createPagingEngineRadioPanel(), BorderLayout.NORTH); + pagingEngineSelectPane.add(engineSettingPane, BorderLayout.CENTER); return pagingEngineSelectPane; } 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 968dfdd896..6a915e58e2 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 @@ -51,18 +51,14 @@ public class WriteShortCutsPane extends JPanel{ contentPane.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 10)); // 纵向布局,横向自适应 - /*contentPane.setLayout(new GridBagLayout()); + 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.setLayout(new BorderLayout()); - contentPane.add(column(10, true, - cell(getFeatureNamePane()), - cell(getHintsPane())).getComponent()); - //contentPane.add(getFeatureNamePane()); - //contentPane.add(getHintsPane()); + cons.insets = new Insets(20, 0, 0, 0); + contentPane.add(getFeatureNamePane(), cons); + contentPane.add(getHintsPane(), cons); return contentPane; } @@ -80,20 +76,16 @@ public class WriteShortCutsPane extends JPanel{ JPanel switchBtnPane = getSwitchBtnPane(); nextRowHK = new UILabel(nextRowString, SwingConstants.CENTER); - JPanel centerPane = new JPanel(new FlowLayout(FlowLayout.CENTER)); + JPanel centerPane = new JPanel(new GridLayout(2, 4, 0, 0)); centerPane.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0)); - /*centerPane.add(name); + 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);*/ - centerPane.add(column(20, true, - row(50, cell(name), cell(nextCol), flex(), cell(nextRow)), - row(50, cell(shortName), cell(nextColHK), cell(switchBtnPane), cell(nextRowHK)) - ).getComponent()); + centerPane.add(nextRowHK); featureNamePane.add(centerPane, BorderLayout.CENTER); @@ -123,22 +115,16 @@ public class WriteShortCutsPane extends JPanel{ preCol = new UILabel("Shift+" + nextColString, SwingConstants.CENTER); preRow = new UILabel("Shift+" + nextRowString, SwingConstants.CENTER); - JPanel centerPane = new JPanel(new FlowLayout(FlowLayout.CENTER)); + JPanel centerPane = new JPanel(new GridLayout(2, 3, 0, V_GAP)); centerPane.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 100)); - /*centerPane.add(systemDefault); + centerPane.add(systemDefault); centerPane.add(preColText); centerPane.add(preCol); centerPane.add(new JPanel()); centerPane.add(preRowText); - centerPane.add(preRow);*/ - centerPane.add(row(80, - column(flex(), cell(systemDefault), flex()), - column(20, - row(80, cell(preColText), cell(preCol)), - row(80, cell(preRowText), cell(preRow))) - ).getComponent()); + centerPane.add(preRow); hintsPane.add(centerPane, BorderLayout.CENTER); diff --git a/designer-realize/src/main/java/com/fr/design/webattr/ReportWriteAttrPane.java b/designer-realize/src/main/java/com/fr/design/webattr/ReportWriteAttrPane.java index 5d9a050c8a..708fef7a86 100644 --- a/designer-realize/src/main/java/com/fr/design/webattr/ReportWriteAttrPane.java +++ b/designer-realize/src/main/java/com/fr/design/webattr/ReportWriteAttrPane.java @@ -1,5 +1,6 @@ package com.fr.design.webattr; +import com.fr.design.gui.frpane.FineTabbedPane; import com.fr.design.gui.frpane.LoadingBasicPane; import com.fr.design.gui.frpane.UITabbedPane; import com.fr.design.layout.FRGUIPaneFactory; @@ -40,8 +41,6 @@ public class ReportWriteAttrPane extends LoadingBasicPane { @Override protected synchronized void initComponents(JPanel container) { container.setLayout(FRGUIPaneFactory.createBorderLayout()); - final UITabbedPane tabbedPane = new UITabbedPane(SwingConstants.TOP, JTabbedPane.WRAP_TAB_LAYOUT); - container.add(tabbedPane, BorderLayout.CENTER); // peter: writeSQLAttrList的编辑. if (submiterListPane == null) { @@ -53,9 +52,15 @@ public class ReportWriteAttrPane extends LoadingBasicPane { } writeShortCutsPane = new WriteShortCutsPane(); - tabbedPane.addTab(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Utils_Submit"), submiterListPane); - tabbedPane.addTab(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Verify_Data_Verify"), verifierListPane); - tabbedPane.addTab(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Writer_ShortCuts_Setting"), writeShortCutsPane); + final FineTabbedPane tabbedPane = FineTabbedPane.builder() + .addTab(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Utils_Submit"), submiterListPane) + .addTab(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Verify_Data_Verify"), verifierListPane) + .addTab(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Writer_ShortCuts_Setting"), writeShortCutsPane) + .withHeadRatio(0.5f) + .build(); + container.setPreferredSize(this.getPreferredSize()); + container.add(tabbedPane, BorderLayout.CENTER); + } @Override 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 71dbd52603..bd2003bf5f 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 @@ -7,7 +7,9 @@ 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; @@ -34,9 +36,7 @@ public class CellWidgetCardPane extends BasicPane { private WidgetMobilePane currentWidgetMobilePane; //属性配置切换面板 private ArrayList paneList; - private JPanel center; - private UIHeadGroup tabsHeaderIconPane; - private CardLayout tabbedPane; + private FineTabbedPane tabsPane; private BasicWidgetPropertySettingPane widgetPropertyPane; //通用属性容器 @@ -64,22 +64,8 @@ public class CellWidgetCardPane extends BasicPane { this.removeAll(); this.setLayout(FRGUIPaneFactory.createBorderLayout()); - tabbedPane = new CardLayout(); - center = new JPanel(tabbedPane); 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(); @@ -111,10 +97,17 @@ 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], basicScrollPane) + .addTab(tabTitles[1], eventTabPane) + .addTab(tabTitles[2], mobileTabPane) + .build(); + JPanel wrapperPane = new JPanel(new BorderLayout()); + wrapperPane.add(tabsPane, BorderLayout.NORTH); + 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(); } @@ -161,7 +154,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/UserDefinedWidgetConfigPane.java b/designer-realize/src/main/java/com/fr/design/widget/UserDefinedWidgetConfigPane.java index c7b24c3cd9..a145078d1e 100644 --- a/designer-realize/src/main/java/com/fr/design/widget/UserDefinedWidgetConfigPane.java +++ b/designer-realize/src/main/java/com/fr/design/widget/UserDefinedWidgetConfigPane.java @@ -1,18 +1,21 @@ package com.fr.design.widget; -import java.awt.BorderLayout; +import java.awt.*; import com.fr.design.beans.BasicBeanPane; +import com.fr.design.gui.icontainer.UIScrollPane; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.form.ui.UserDefinedWidgetConfig; +import javax.swing.*; + public class UserDefinedWidgetConfigPane extends BasicBeanPane { private ValueWidgetPane editorDefPane; public UserDefinedWidgetConfigPane(){ this.setLayout(FRGUIPaneFactory.createBorderLayout()); editorDefPane = new ValueWidgetPane(); - this.add(editorDefPane, BorderLayout.CENTER); + this.add(new UIScrollPane(editorDefPane), BorderLayout.CENTER); } @Override 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 b941b02efa..38316cbd76 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,6 +15,11 @@ 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; @@ -27,18 +32,24 @@ 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(); - 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); + 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()); 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 80ba33ef26..609f9f29bb 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 @@ -80,8 +80,8 @@ public class WidgetPane extends AbstractAttrNoScrollPane implements ItemListener this.add(column( 10, - cell(northPane), - cell(cellEditorCardPane).weight(1) + cell(northPane).weight(0.08), + cell(cellEditorCardPane).weight(0.92) ).getComponent() ); } @@ -90,8 +90,8 @@ public class WidgetPane extends AbstractAttrNoScrollPane implements ItemListener 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) + cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Select_Widget"))).weight(68), + cell(editorTypeComboBox).weight(372) ) ).getComponent(); } 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 c7ff5fdddb..8ba27909f2 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 @@ -15,8 +15,6 @@ import java.awt.BorderLayout; 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 { @@ -33,13 +31,11 @@ public class BasicWidgetPropertySettingPane extends BasicPane { widgetNameComboBox = new ParameterTreeComboBox(); widgetNameComboBox.refreshTree(); - 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) + 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()); } 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 75f3f06d2c..454337d3f0 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,9 +1,8 @@ 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.border.UIRoundedBorder; import com.fr.design.constants.LayoutConstants; import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.gui.icombobox.UIComboBox; @@ -20,10 +19,9 @@ import com.fr.stable.ArrayUtils; import javax.swing.JPanel; import javax.swing.SwingConstants; -import javax.swing.border.TitledBorder; -import java.awt.BorderLayout; -import java.awt.CardLayout; -import java.awt.Color; +import javax.swing.border.EmptyBorder; +import javax.swing.plaf.BorderUIResource; +import java.awt.*; import java.text.SimpleDateFormat; import java.util.Date; @@ -67,7 +65,7 @@ public class DateEditorDefinePane extends DirectWriteEditorDefinePane Date: Mon, 29 Jul 2024 18:33:22 +0800 Subject: [PATCH 06/10] =?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 --- .../fr/design/data/datapane/ChoosePane.java | 23 ++++--------------- .../frpane/ReportletParameterViewPane.java | 5 ++++ .../hyperlink/ReportletHyperlinkPane.java | 14 +++++------ .../fr/design/hyperlink/WebHyperlinkPane.java | 22 +++++++----------- .../hyperlink/popup/StyleSettingPane.java | 9 ++------ 5 files changed, 26 insertions(+), 47 deletions(-) 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 1011d3f254..96ab6bd724 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 @@ -1,8 +1,5 @@ package com.fr.design.data.datapane; -import com.fine.swing.ui.layout.Layouts; -import com.fine.theme.light.ui.FineRoundBorder; -import com.fine.theme.utils.FineUIScale; import com.fr.base.TableData; import com.fr.data.core.DataCoreUtils; import com.fr.data.core.db.DBUtils; @@ -14,7 +11,6 @@ import com.fr.data.impl.DBTableData; import com.fr.data.operator.DataOperator; import com.fr.design.DesignerEnvManager; import com.fr.design.beans.BasicBeanPane; -import com.fr.design.border.FineBorderFactory; import com.fr.design.data.DesignTableDataManager; import com.fr.design.data.datapane.RefreshLabel.Refreshable; import com.fr.design.data.datapane.preview.PreviewLabel; @@ -43,7 +39,6 @@ import com.fr.log.FineLoggerFactory; import com.fr.stable.StringUtils; import com.fr.workspace.WorkContext; import com.fr.workspace.server.connection.DBConnectAuth; -import groovy.swing.factory.BoxLayoutFactory; import javax.swing.JList; import javax.swing.JOptionPane; @@ -59,7 +54,9 @@ import javax.swing.tree.DefaultTreeCellRenderer; import javax.swing.tree.DefaultTreeModel; import javax.swing.tree.TreeCellRenderer; import javax.swing.tree.TreePath; -import java.awt.*; +import java.awt.BorderLayout; +import java.awt.Component; +import java.awt.Dimension; import java.awt.event.FocusAdapter; import java.awt.event.FocusEvent; import java.awt.event.ItemEvent; @@ -71,10 +68,6 @@ import java.util.List; import java.util.Set; import java.util.concurrent.CancellationException; -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.scale; - /** * @author zhou * @since 2012-7-11下午4:49:39 @@ -246,15 +239,7 @@ public class ChoosePane extends BasicBeanPane implements Refresha double p = TableLayout.PREFERRED; double f = TableLayout.FILL; JPanel northDSPane = TableLayoutHelper.createTableLayoutPane(coms, new double[]{p}, new double[]{p, f, p, f, p, f, COLUMN_SIZE, COLUMN_SIZE}); - //JPanel northDSPane = new JPanel(new BorderLayout()); - - /*northDSPane.add( - row(10, - row(5, cell(l1), cell(dsNameComboBox)), - row(5, cell(l2), cell(schemaBox)), - row(5, cell(l3), cell(tableNameComboBox)), - row(5, cell(new RefreshLabel(this)), cell(previewLabel))) - .getComponent());*/ + this.add(northDSPane, BorderLayout.CENTER); } diff --git a/designer-base/src/main/java/com/fr/design/gui/frpane/ReportletParameterViewPane.java b/designer-base/src/main/java/com/fr/design/gui/frpane/ReportletParameterViewPane.java index 369f2ef63b..4cc08c6a6c 100644 --- a/designer-base/src/main/java/com/fr/design/gui/frpane/ReportletParameterViewPane.java +++ b/designer-base/src/main/java/com/fr/design/gui/frpane/ReportletParameterViewPane.java @@ -49,6 +49,11 @@ public class ReportletParameterViewPane extends BasicPane { this(null, useParaType, valueEditorPane, valueRenderPane, null); } + public ReportletParameterViewPane(int useParaType, ValueEditorPane valueEditorPane, ValueEditorPane valueRenderPane, + JPanel otherPane) { + this(null, useParaType, valueEditorPane, valueRenderPane, otherPane); + } + public ReportletParameterViewPane(UITableEditAction[] actions, int useParaType, ValueEditorPane valueEditorPane, ValueEditorPane valueRenderPane) { this.initComponent(actions, useParaType, valueEditorPane, valueRenderPane, null); 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 8efb32aba3..6b3d3252c3 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 @@ -50,25 +50,25 @@ public class ReportletHyperlinkPane extends AbstractHyperLinkPane { @@ -44,18 +40,16 @@ public class WebHyperlinkPane extends AbstractHyperLinkPane { this.setBorder(BorderFactory.createEmptyBorder(BORDER_WIDTH, BORDER_WIDTH, BORDER_WIDTH, BORDER_WIDTH)); northPane = new WebHyperNorthPane(needRenamePane()); - //this.add(northPane, BorderLayout.NORTH); - - parameterViewPane = new ReportletParameterViewPane(getChartParaType(), getValueEditorPane(), getValueEditorPane()); - //this.add(parameterViewPane, BorderLayout.CENTER); + extendParametersCheckBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Extends_Report_Parameters")); + JPanel extendPane = new JPanel(); + extendPane.add(extendParametersCheckBox); + parameterViewPane = new ReportletParameterViewPane(getChartParaType(), getValueEditorPane(), + getValueEditorPane(), extendPane); parameterViewPane.setBorder(GUICoreUtils.createTitledBorder(Toolkit.i18nText("Fine-Design_Basic_Parameters"), null)); - extendParametersCheckBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Extends_Report_Parameters")); - //this.add(GUICoreUtils.createFlowPane(new Component[]{extendParametersCheckBox}, FlowLayout.LEFT), BorderLayout.SOUTH); this.add(column( cell(northPane), - cell(parameterViewPane).weight(1.0), - cell(extendParametersCheckBox) + cell(parameterViewPane).weight(1.0) ).getComponent()); } diff --git a/designer-base/src/main/java/com/fr/design/hyperlink/popup/StyleSettingPane.java b/designer-base/src/main/java/com/fr/design/hyperlink/popup/StyleSettingPane.java index 6ca7048af1..531efa35dc 100644 --- a/designer-base/src/main/java/com/fr/design/hyperlink/popup/StyleSettingPane.java +++ b/designer-base/src/main/java/com/fr/design/hyperlink/popup/StyleSettingPane.java @@ -7,9 +7,7 @@ import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ispinner.UISpinner; import com.fr.design.i18n.Toolkit; import com.fr.design.layout.FRGUIPaneFactory; -import com.fr.design.layout.VerticalFlowLayout; import com.fr.design.style.color.NewColorSelectBox; -import com.fr.design.utils.gui.GUICoreUtils; import com.fr.js.MobilePopupHyperlink; import com.fr.stable.StringUtils; @@ -81,14 +79,12 @@ public class StyleSettingPane extends BasicBeanPane { borderPane.setLayout(new BorderLayout()); borderType = new LineComboBox(MobilePopupConstants.BORDER_LINE_STYLE_ARRAY); - borderType.setPreferredSize(new Dimension(115, 20)); borderColor = new NewColorSelectBox(100); borderRadiusSpinner = new UISpinner(0, maxBorderRadius, 1, 20); - borderRadiusSpinner.setPreferredSize(new Dimension(120, 20)); - JLabel label = new JLabel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Border")); + UILabel borderLabel = new UILabel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Border")); borderPane.add(row(40, column(10, - cell(label).weight(0.3), + cell(borderLabel).weight(0.3), flex().weight(0.7)), column(10, cell(MobilePopupUIUtils.createLeftTileRightContentPanel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Line"), borderType, Color.GRAY)), @@ -106,7 +102,6 @@ public class StyleSettingPane extends BasicBeanPane { JPanel transparencyPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); this.numberDragPane = new UINumberDragPane(0,100); - this.numberDragPane.setPreferredSize(new Dimension(140, 20)); transparencyPane.add(numberDragPane, BorderLayout.CENTER); transparencyPane.add(new UILabel(" %"), BorderLayout.EAST); JLabel bgLabel = new JLabel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Background")); From b903883399e97874ffccffee05a5d20818d7c13d Mon Sep 17 00:00:00 2001 From: renekton Date: Mon, 29 Jul 2024 18:51:24 +0800 Subject: [PATCH 07/10] =?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/itableeditorpane/UITableEditorPane.java | 5 +++-- .../design/hyperlink/ReportletHyperlinkPane.java | 5 ++--- .../design/mainframe/EastRegionContainerPane.java | 1 - .../mainframe/widget/editors/DataTableEditor.java | 4 ++-- .../com/fr/design/write/submit/CustomJobPane.java | 9 --------- .../design/actions/server/WidgetManagerAction.java | 2 +- .../design/cell/smartaction/SmartJTablePane.java | 4 +++- .../com/fr/design/report/WriteShortCutsPane.java | 14 +++++++------- .../design/widget/UserDefinedWidgetConfigPane.java | 4 +--- .../submit/SmartInsertDBManipulationPane.java | 7 ++++++- 10 files changed, 25 insertions(+), 30 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/itableeditorpane/UITableEditorPane.java b/designer-base/src/main/java/com/fr/design/gui/itableeditorpane/UITableEditorPane.java index 9e8faf3944..f9cd308a3d 100644 --- a/designer-base/src/main/java/com/fr/design/gui/itableeditorpane/UITableEditorPane.java +++ b/designer-base/src/main/java/com/fr/design/gui/itableeditorpane/UITableEditorPane.java @@ -8,9 +8,10 @@ import com.fr.design.gui.ilable.UILabel; import com.fr.design.layout.FRGUIPaneFactory; import sun.swing.table.DefaultTableCellHeaderRenderer; -import javax.swing.*; +import javax.swing.JPanel; +import javax.swing.JTable; +import javax.swing.SwingConstants; import javax.swing.event.TableModelListener; -import javax.swing.table.DefaultTableCellRenderer; import java.awt.BorderLayout; import java.awt.GridLayout; import java.awt.Insets; 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 6b3d3252c3..d7d9817b55 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,12 +1,10 @@ package com.fr.design.hyperlink; -import com.fine.theme.light.ui.FineRoundBorder; import com.fr.base.BaseUtils; import com.fr.base.Parameter; import com.fr.design.dialog.FineJOptionPane; import com.fr.design.gui.frpane.ReportletParameterViewPane; import com.fr.design.gui.icheckbox.UICheckBox; -import com.fr.design.gui.icontainer.UIScrollPane; import com.fr.design.gui.itableeditorpane.ParameterTableModel; import com.fr.design.gui.itableeditorpane.UITableEditAction; import com.fr.design.i18n.Toolkit; @@ -18,7 +16,8 @@ import com.fr.js.ReportletHyperlink; import com.fr.stable.ParameterProvider; import com.fr.stable.StringUtils; -import javax.swing.*; +import javax.swing.JOptionPane; +import javax.swing.JPanel; import java.awt.event.ActionEvent; import java.util.HashMap; import java.util.List; diff --git a/designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java b/designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java index 818665b989..6d33c5946b 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java @@ -890,7 +890,6 @@ public class EastRegionContainerPane extends UIEastResizableContainer { propertyPanel = new JPanel(); contentPane = generateContentPane(); popupToolPane = new PopupToolPane(this, PopupToolPane.DOWN_BUTTON); - popupToolPane.setPreferredSize(new Dimension(0, 34)); headerPane = new JPanel(); headerPane.setPreferredSize(new Dimension(headerPane.getPreferredSize().width, 0)); // 默认隐藏 contentArea = new JPanel(new BorderLayout()); diff --git a/designer-base/src/main/java/com/fr/design/mainframe/widget/editors/DataTableEditor.java b/designer-base/src/main/java/com/fr/design/mainframe/widget/editors/DataTableEditor.java index 9e3adf672c..de85b63041 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/widget/editors/DataTableEditor.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/widget/editors/DataTableEditor.java @@ -12,8 +12,8 @@ import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.editor.editor.Editor; import com.fr.form.data.DataTableConfig; - -import java.awt.*; +import java.awt.BorderLayout; +import java.awt.Dimension; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; 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 a7204f4467..5b0cd2c3b6 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 @@ -41,7 +41,6 @@ public abstract class CustomJobPane extends BasicBeanPane { this.setLayout(FRGUIPaneFactory.createBorderLayout()); JPanel reportletNamePane = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane(); classNameTextField = new UITextField(); - //reportletNamePane.add(classNameTextField); UIButton browserButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Select")); browserButton.setPreferredSize(new Dimension( @@ -53,8 +52,6 @@ public abstract class CustomJobPane extends BasicBeanPane { GraphHelper.getWidth(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Select")) + 40, classNameTextField.getPreferredSize().height)); - /*reportletNamePane.add(browserButton); - reportletNamePane.add(editButton);*/ UITextArea area = new UITextArea(2, 1); browserButton.addActionListener(new ActionListener() { @@ -101,18 +98,12 @@ public abstract class CustomJobPane extends BasicBeanPane { cell(browserButton).weight(0.1), cell(editButton).weight(0.1) ).getComponent()); - //this.add(reportletNamePane, BorderLayout.NORTH); objectProperiesPane = new ObjectProperiesPane(); objectProperiesPane.setBorder(GUICoreUtils.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Property"), null)); - //this.add(objectProperiesPane, BorderLayout.CENTER); - - //UITextArea area = new UITextArea(2, 1); - //area.setText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Extend_Class", "com.fr.data.AbstractSubmitTask")); 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(dsPane, BorderLayout.SOUTH); this.add(column( cell(reportletNamePane), cell(objectProperiesPane).weight(1.0), diff --git a/designer-realize/src/main/java/com/fr/design/actions/server/WidgetManagerAction.java b/designer-realize/src/main/java/com/fr/design/actions/server/WidgetManagerAction.java index cd14fb63b4..d551285f32 100644 --- a/designer-realize/src/main/java/com/fr/design/actions/server/WidgetManagerAction.java +++ b/designer-realize/src/main/java/com/fr/design/actions/server/WidgetManagerAction.java @@ -16,7 +16,7 @@ import com.fr.transaction.Configurations; import com.fr.transaction.WorkerFacade; import javax.swing.KeyStroke; -import java.awt.*; +import java.awt.Dimension; import java.awt.event.ActionEvent; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; diff --git a/designer-realize/src/main/java/com/fr/design/cell/smartaction/SmartJTablePane.java b/designer-realize/src/main/java/com/fr/design/cell/smartaction/SmartJTablePane.java index 7e0ff5a4ed..4d9ef68670 100644 --- a/designer-realize/src/main/java/com/fr/design/cell/smartaction/SmartJTablePane.java +++ b/designer-realize/src/main/java/com/fr/design/cell/smartaction/SmartJTablePane.java @@ -5,7 +5,9 @@ import java.awt.Window; import com.fr.design.gui.ilable.UILabel; -import javax.swing.*; +import javax.swing.JScrollPane; +import javax.swing.JTable; +import javax.swing.SwingConstants; import javax.swing.event.ListSelectionEvent; import javax.swing.event.ListSelectionListener; import javax.swing.table.AbstractTableModel; 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 6a915e58e2..4c7c03d2c5 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 @@ -14,16 +14,16 @@ import com.fr.transaction.WorkerAdaptor; import javax.swing.BorderFactory; import javax.swing.JPanel; import javax.swing.SwingConstants; -import java.awt.*; + +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.flex; -import static com.fine.swing.ui.layout.Layouts.row; - - public class WriteShortCutsPane extends JPanel{ private static final int V_GAP = 20; private static final int MAX_LABEL_WIDTH = 100; diff --git a/designer-realize/src/main/java/com/fr/design/widget/UserDefinedWidgetConfigPane.java b/designer-realize/src/main/java/com/fr/design/widget/UserDefinedWidgetConfigPane.java index a145078d1e..91f10f23dc 100644 --- a/designer-realize/src/main/java/com/fr/design/widget/UserDefinedWidgetConfigPane.java +++ b/designer-realize/src/main/java/com/fr/design/widget/UserDefinedWidgetConfigPane.java @@ -1,13 +1,11 @@ package com.fr.design.widget; -import java.awt.*; - import com.fr.design.beans.BasicBeanPane; import com.fr.design.gui.icontainer.UIScrollPane; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.form.ui.UserDefinedWidgetConfig; -import javax.swing.*; +import java.awt.BorderLayout; public class UserDefinedWidgetConfigPane extends BasicBeanPane { private ValueWidgetPane editorDefPane; diff --git a/designer-realize/src/main/java/com/fr/design/write/submit/SmartInsertDBManipulationPane.java b/designer-realize/src/main/java/com/fr/design/write/submit/SmartInsertDBManipulationPane.java index e403e9179c..7d0dc693ec 100644 --- a/designer-realize/src/main/java/com/fr/design/write/submit/SmartInsertDBManipulationPane.java +++ b/designer-realize/src/main/java/com/fr/design/write/submit/SmartInsertDBManipulationPane.java @@ -33,7 +33,12 @@ import com.fr.stable.ColumnRowGroup; import com.fr.stable.StringUtils; import com.fr.write.DMLConfigJob; -import javax.swing.*; +import javax.swing.BorderFactory; +import javax.swing.JDialog; +import javax.swing.JTable; +import javax.swing.SwingConstants; +import javax.swing.SwingUtilities; +import javax.swing.SwingWorker; import javax.swing.table.DefaultTableCellRenderer; import javax.swing.table.TableColumn; import java.awt.BorderLayout; From bd330de3b5fd9cd57616862a5ec22071b9948115 Mon Sep 17 00:00:00 2001 From: renekton Date: Mon, 29 Jul 2024 20:07:58 +0800 Subject: [PATCH 08/10] =?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 --- .../fr/design/gui/controlpane/JListControlPane.java | 3 +++ .../com/fr/design/widget/CellWidgetCardPane.java | 12 +++--------- .../design/widget/UserDefinedWidgetConfigPane.java | 3 +-- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/controlpane/JListControlPane.java b/designer-base/src/main/java/com/fr/design/gui/controlpane/JListControlPane.java index 3dec4e1c32..db31287ee1 100644 --- a/designer-base/src/main/java/com/fr/design/gui/controlpane/JListControlPane.java +++ b/designer-base/src/main/java/com/fr/design/gui/controlpane/JListControlPane.java @@ -3,6 +3,7 @@ package com.fr.design.gui.controlpane; import com.fine.theme.icon.LazyIcon; import com.fine.theme.light.ui.FineRoundBorder; import com.formdev.flatlaf.ui.FlatUIUtils; +import com.formdev.flatlaf.util.ScaledEmptyBorder; import com.fr.design.beans.BasicBeanPane; import com.fr.design.border.FineBorderFactory; import com.fr.design.dialog.FineJOptionPane; @@ -368,6 +369,8 @@ public abstract class JListControlPane extends JControlPane implements ListContr setLayout(new BorderLayout()); this.textLabel = new JLabel(); this.iconLabel = new JLabel(); + this.textLabel.setBorder(new ScaledEmptyBorder(0, 4, 0, 0)); + this.iconLabel.setBorder(new ScaledEmptyBorder(0, 4, 0, 0)); add(this.textLabel, BorderLayout.CENTER); add(this.iconLabel, BorderLayout.WEST); this.iconLabel.setBackground(FlatUIUtils.getUIColor("List.cellRender.background", Color.WHITE)); 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 bd2003bf5f..d99058d205 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 @@ -69,12 +69,6 @@ public class CellWidgetCardPane extends BasicPane { // 属性 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); attriCardPane = FRGUIPaneFactory.createCardLayout_S_Pane(); @@ -98,12 +92,12 @@ public class CellWidgetCardPane extends BasicPane { mobileTabPane.add(mobileCardPane, BorderLayout.CENTER); mobileCardLayout = (CardLayout) mobileCardPane.getLayout(); tabsPane = FineTabbedPane.builder() - .addTab(tabTitles[0], basicScrollPane) + .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.NORTH); + wrapperPane.add(tabsPane, BorderLayout.CENTER); wrapperPane.setBorder(new ScaledEmptyBorder(0, 10, 0, 10)); wrapperPane.setOpaque(false); this.add(wrapperPane, BorderLayout.CENTER); @@ -115,7 +109,7 @@ public class CellWidgetCardPane extends BasicPane { private void initPaneList() { paneList = new ArrayList(); paneList.add(attriTabPane); - paneList.add(eventPane); + paneList.add(eventTabPane); paneList.add(mobileTabPane); } diff --git a/designer-realize/src/main/java/com/fr/design/widget/UserDefinedWidgetConfigPane.java b/designer-realize/src/main/java/com/fr/design/widget/UserDefinedWidgetConfigPane.java index 91f10f23dc..acea484e1a 100644 --- a/designer-realize/src/main/java/com/fr/design/widget/UserDefinedWidgetConfigPane.java +++ b/designer-realize/src/main/java/com/fr/design/widget/UserDefinedWidgetConfigPane.java @@ -1,7 +1,6 @@ package com.fr.design.widget; import com.fr.design.beans.BasicBeanPane; -import com.fr.design.gui.icontainer.UIScrollPane; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.form.ui.UserDefinedWidgetConfig; @@ -13,7 +12,7 @@ public class UserDefinedWidgetConfigPane extends BasicBeanPane Date: Tue, 30 Jul 2024 10:41:36 +0800 Subject: [PATCH 09/10] =?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/hyperlink/ReportletHyperNorthPane.java | 8 ++++---- .../com/fr/design/hyperlink/popup/ContentSettingPane.java | 2 -- .../com/fr/design/hyperlink/popup/MobilePopupUIUtils.java | 8 ++++++++ .../main/java/com/fr/design/headerfooter/ImagePane.java | 3 ++- .../main/java/com/fr/design/report/ReportEnginePane.java | 7 ------- 5 files changed, 14 insertions(+), 14 deletions(-) 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 2b757db6df..df7374e757 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 @@ -370,19 +370,19 @@ public class ReportletHyperNorthPane extends AbstractHyperNorthPane dialogComponents) {// 对话框大小 - final JPanel sizeJPanel = new JPanel(new BorderLayout()); + final JPanel sizePane = new JPanel(new BorderLayout()); UILabel heightLabel = new UILabel(Toolkit.i18nText("Fine-Design_Chart_Height")); UISpinner heightTextFiled = new UISpinner(0, Integer.MAX_VALUE, 1, DEFAULT_H_VALUE); this.setHeightTextFiled(heightTextFiled); UILabel widthLabel = new UILabel(Toolkit.i18nText("Fine-Design_Basic_Designer_Width")); UISpinner widthTextFiled = new UISpinner(0, Integer.MAX_VALUE, 1, DEFAULT_V_VALUE); this.setWidthTextFiled(widthTextFiled); - sizeJPanel.add(column(8, + sizePane.add(column(8, row(10, cell(heightLabel).weight(0.2), cell(heightTextFiled).weight(0.8)), row(10, cell(widthLabel).weight(0.2), cell(widthTextFiled).weight(0.8)) ).getComponent()); - sizeJPanel.setVisible(true); - dialogComponents.add(new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Dialog_Size")), sizeJPanel}); + sizePane.setVisible(true); + dialogComponents.add(new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Dialog_Size")), sizePane}); } private void initDialogLocationPanel(List dialogComponents) { 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 2b5f42398f..07be5714a4 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 @@ -138,12 +138,10 @@ public class ContentSettingPane extends AbstractHyperLinkPane { radioButtons.get(0).setSelected(ob.getEngineState() == LayerReportAttr.ENGINE_X); radioButtons.get(1).setSelected(ob.getEngineState() == LayerReportAttr.LINE_ENGINE); if (ob.getEngineState() == LayerReportAttr.ENGINE_X) { - //engineSettingPane.moveToFront(outEngineXSettingPane); outEngineXSettingPane.setVisible(true); outLineEngineSettingPane.setVisible(false); engineXCountPerPageEditor.setValue(new Integer(ob.getCountPerPage())); engineXPageQueryBox.setSelected(ob.isPageQuery()); engineXPageQueryPane.setVisible(ob.isPageQuery()); } else { - //engineSettingPane.moveToFront(outLineEngineSettingPane); outEngineXSettingPane.setVisible(false); outLineEngineSettingPane.setVisible(true); lineEngineCountPerPageEditor.setValue(new Integer(ob.getCountPerPage())); @@ -380,7 +374,6 @@ public class ReportEnginePane extends BasicBeanPane { target.setVisible(true); showTarget.setVisible(true); notShowTarget.setVisible(false); - //target.moveToFront(showTarget); } else { target.setVisible(false); } From 877289dbb63173c0ac3de4e7db961c37578087cc Mon Sep 17 00:00:00 2001 From: renekton Date: Tue, 30 Jul 2024 11:52:31 +0800 Subject: [PATCH 10/10] =?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 --- .../design/fun/impl/AbstractHyperlinkProvider.java | 2 +- .../gui/itableeditorpane/UITableEditorPane.java | 6 +++--- .../fr/design/hyperlink/ReportletHyperNorthPane.java | 6 ++---- .../fr/design/hyperlink/popup/CustomFontPane.java | 6 +++--- .../com/fr/design/images/data/hyperlink.svg | 11 +++++++++++ .../com/fr/design/images/data/user_widget.svg | 10 ++++++++++ .../com/fr/design/images/m_format/cellstyle/bold.svg | 3 +++ .../fr/design/images/m_format/cellstyle/italic.svg | 3 +++ .../design/images/m_format/cellstyle/underline.svg | 3 +++ .../com/fr/design/module/ChartHyperlinkGroup.java | 8 ++++---- .../com/fr/design/module/FormHyperlinkGroup.java | 6 +++--- .../java/com/fr/design/widget/WidgetConfigPane.java | 2 +- .../main/java/com/fr/design/widget/WidgetPane.java | 4 ++-- .../java/com/fr/start/module/DesignerActivator.java | 12 ++++++------ 14 files changed, 55 insertions(+), 27 deletions(-) create mode 100644 designer-base/src/main/resources/com/fr/design/images/data/hyperlink.svg create mode 100644 designer-base/src/main/resources/com/fr/design/images/data/user_widget.svg create mode 100644 designer-base/src/main/resources/com/fr/design/images/m_format/cellstyle/bold.svg create mode 100644 designer-base/src/main/resources/com/fr/design/images/m_format/cellstyle/italic.svg create mode 100644 designer-base/src/main/resources/com/fr/design/images/m_format/cellstyle/underline.svg diff --git a/designer-base/src/main/java/com/fr/design/fun/impl/AbstractHyperlinkProvider.java b/designer-base/src/main/java/com/fr/design/fun/impl/AbstractHyperlinkProvider.java index 2527d64621..57e31c52f8 100644 --- a/designer-base/src/main/java/com/fr/design/fun/impl/AbstractHyperlinkProvider.java +++ b/designer-base/src/main/java/com/fr/design/fun/impl/AbstractHyperlinkProvider.java @@ -26,7 +26,7 @@ public abstract class AbstractHyperlinkProvider extends AbstractProvider impleme @Override public NameableCreator createHyperlinkCreator() { - return new NameObjectCreator(text(), IconUtils.readIcon("com/fr/design/images/data/hyperlink.png"), target(), appearance()); + return new NameObjectCreator(text(), IconUtils.readIcon("com/fr/design/images/data/hyperlink.svg"), target(), appearance()); } @Override diff --git a/designer-base/src/main/java/com/fr/design/gui/itableeditorpane/UITableEditorPane.java b/designer-base/src/main/java/com/fr/design/gui/itableeditorpane/UITableEditorPane.java index 23d90bed2f..4319025013 100644 --- a/designer-base/src/main/java/com/fr/design/gui/itableeditorpane/UITableEditorPane.java +++ b/designer-base/src/main/java/com/fr/design/gui/itableeditorpane/UITableEditorPane.java @@ -39,7 +39,6 @@ public class UITableEditorPane extends BasicPane { public UITableEditorPane(UITableModelAdapter model) { this.tableModel = model; this.initComponent(model.createAction()); - this.editTable.getTableHeader().setDefaultRenderer(new TableHeaderRenderer()); } public UITableEditorPane(UITableModelAdapter model, JPanel panel) { @@ -51,7 +50,6 @@ public class UITableEditorPane extends BasicPane { leftLabelName = s; this.tableModel = model; this.initComponent(model.createAction()); - this.editTable.getTableHeader().setDefaultRenderer(new TableHeaderRenderer()); } protected void initComponent(UITableEditAction[] action) { @@ -78,7 +76,9 @@ public class UITableEditorPane extends BasicPane { pane.add(controlPane, BorderLayout.NORTH); - } + this.editTable.getTableHeader().setDefaultRenderer(new TableHeaderRenderer()); + + } public UITableModelAdapter getTableModel() { return tableModel; 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 df7374e757..57db2f06f5 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 @@ -378,8 +378,8 @@ public class ReportletHyperNorthPane extends AbstractHyperNorthPane + + + + + + + + + + diff --git a/designer-base/src/main/resources/com/fr/design/images/data/user_widget.svg b/designer-base/src/main/resources/com/fr/design/images/data/user_widget.svg new file mode 100644 index 0000000000..af4281adf2 --- /dev/null +++ b/designer-base/src/main/resources/com/fr/design/images/data/user_widget.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/designer-base/src/main/resources/com/fr/design/images/m_format/cellstyle/bold.svg b/designer-base/src/main/resources/com/fr/design/images/m_format/cellstyle/bold.svg new file mode 100644 index 0000000000..4aa1b6c071 --- /dev/null +++ b/designer-base/src/main/resources/com/fr/design/images/m_format/cellstyle/bold.svg @@ -0,0 +1,3 @@ + + + diff --git a/designer-base/src/main/resources/com/fr/design/images/m_format/cellstyle/italic.svg b/designer-base/src/main/resources/com/fr/design/images/m_format/cellstyle/italic.svg new file mode 100644 index 0000000000..3d53d5ffe8 --- /dev/null +++ b/designer-base/src/main/resources/com/fr/design/images/m_format/cellstyle/italic.svg @@ -0,0 +1,3 @@ + + + diff --git a/designer-base/src/main/resources/com/fr/design/images/m_format/cellstyle/underline.svg b/designer-base/src/main/resources/com/fr/design/images/m_format/cellstyle/underline.svg new file mode 100644 index 0000000000..326f2fa6e0 --- /dev/null +++ b/designer-base/src/main/resources/com/fr/design/images/m_format/cellstyle/underline.svg @@ -0,0 +1,3 @@ + + + diff --git a/designer-chart/src/main/java/com/fr/design/module/ChartHyperlinkGroup.java b/designer-chart/src/main/java/com/fr/design/module/ChartHyperlinkGroup.java index d9eb5bc87f..e81c4de238 100644 --- a/designer-chart/src/main/java/com/fr/design/module/ChartHyperlinkGroup.java +++ b/designer-chart/src/main/java/com/fr/design/module/ChartHyperlinkGroup.java @@ -42,10 +42,10 @@ public class ChartHyperlinkGroup extends BaseHyperlinkGroup { FormHyperlinkProvider formHyperlink = StableFactory.getMarkedInstanceObjectFromClass(FormHyperlinkProvider.XML_TAG, FormHyperlinkProvider.class); NameableCreator[] related4ChartHyper = { - new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Float_Chart"), IconUtils.readIcon("com/fr/design/images/data/hyperlink.png"), ChartHyperPoplink.class, ChartHyperPoplinkPane.ChartNoRename.class), - new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Cell"), IconUtils.readIcon("com/fr/design/images/data/hyperlink.png"), ChartHyperRelateCellLink.class, ChartHyperRelateCellLinkPane.ChartNoRename.class), - new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Float"), IconUtils.readIcon("com/fr/design/images/data/hyperlink.png"), ChartHyperRelateFloatLink.class, ChartHyperRelateFloatLinkPane.ChartNoRename.class), - new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Hyperlink_Form_Link"), IconUtils.readIcon("com/fr/design/images/data/hyperlink.png"), formHyperlink.getClass(), FormHyperlinkPane.class)}; + new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Float_Chart"), IconUtils.readIcon("com/fr/design/images/data/hyperlink.svg"), ChartHyperPoplink.class, ChartHyperPoplinkPane.ChartNoRename.class), + new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Cell"), IconUtils.readIcon("com/fr/design/images/data/hyperlink.svg"), ChartHyperRelateCellLink.class, ChartHyperRelateCellLinkPane.ChartNoRename.class), + new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Float"), IconUtils.readIcon("com/fr/design/images/data/hyperlink.svg"), ChartHyperRelateFloatLink.class, ChartHyperRelateFloatLinkPane.ChartNoRename.class), + new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Hyperlink_Form_Link"), IconUtils.readIcon("com/fr/design/images/data/hyperlink.svg"), formHyperlink.getClass(), FormHyperlinkPane.class)}; return ArrayUtils.addAll(super.getHyperlinkCreators(), related4ChartHyper); } diff --git a/designer-chart/src/main/java/com/fr/design/module/FormHyperlinkGroup.java b/designer-chart/src/main/java/com/fr/design/module/FormHyperlinkGroup.java index 4e9411d745..12025a4115 100644 --- a/designer-chart/src/main/java/com/fr/design/module/FormHyperlinkGroup.java +++ b/designer-chart/src/main/java/com/fr/design/module/FormHyperlinkGroup.java @@ -32,9 +32,9 @@ public class FormHyperlinkGroup extends BaseHyperlinkGroup { public NameableCreator[] getHyperlinkCreators() { FormHyperlinkProvider formHyperlink = StableFactory.getMarkedInstanceObjectFromClass(FormHyperlinkProvider.XML_TAG, FormHyperlinkProvider.class); NameableCreator[] related4ChartHyper = { - new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Float_Chart"), IconUtils.readIcon("com/fr/design/images/data/hyperlink.png"), ChartHyperPoplink.class, ChartHyperPoplinkPane.ChartNoRename.class), - new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Cell"), IconUtils.readIcon("com/fr/design/images/data/hyperlink.png"), ChartHyperRelateCellLink.class, ChartHyperRelateCellLinkPane.ChartNoRename.class), - new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Hyperlink_Form_Link"), IconUtils.readIcon("com/fr/design/images/data/hyperlink.png"), formHyperlink.getClass(), FormHyperlinkPane.class)}; + new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Float_Chart"), IconUtils.readIcon("com/fr/design/images/data/hyperlink.svg"), ChartHyperPoplink.class, ChartHyperPoplinkPane.ChartNoRename.class), + new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Cell"), IconUtils.readIcon("com/fr/design/images/data/hyperlink.svg"), ChartHyperRelateCellLink.class, ChartHyperRelateCellLinkPane.ChartNoRename.class), + new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Hyperlink_Form_Link"), IconUtils.readIcon("com/fr/design/images/data/hyperlink.svg"), formHyperlink.getClass(), FormHyperlinkPane.class)}; return ArrayUtils.addAll(super.getHyperlinkCreators(), related4ChartHyper); } 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 bc6764b91f..7d8f744e53 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 @@ -42,7 +42,7 @@ public class WidgetConfigPane extends JListControlPane { */ public NameableCreator[] createNameableCreators() { NameableCreator defaultWidget = new NameObjectCreator(WidgetConstants.USER_DEFINED_WIDGETCONFIG, - "/com/fr/design/images/data/user_widget.png", UserDefinedWidgetConfig.class, + "/com/fr/design/images/data/user_widget.svg", UserDefinedWidgetConfig.class, UserDefinedWidgetConfigPane.class); return new NameableCreator[] { defaultWidget }; } 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 609f9f29bb..162ed117c2 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 @@ -80,8 +80,8 @@ public class WidgetPane extends AbstractAttrNoScrollPane implements ItemListener this.add(column( 10, - cell(northPane).weight(0.08), - cell(cellEditorCardPane).weight(0.92) + cell(northPane).weight(0.17), + cell(cellEditorCardPane).weight(0.83) ).getComponent() ); } diff --git a/designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java b/designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java index f88dd644e4..d44a2d72f3 100644 --- a/designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java +++ b/designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java @@ -342,12 +342,12 @@ public class DesignerActivator extends Activator implements Prepare { private static NameableCreator[] hyperlinkTypes() { return new NameableCreator[]{ - new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Reportlet"), IconUtils.readIcon("com/fr/design/images/data/hyperlink.png"), ReportletHyperlink.class, ReportletHyperlinkPane.ChartNoRename.class), - new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Email"), IconUtils.readIcon("com/fr/design/images/data/hyperlink.png"), EmailJavaScript.class, EmailPane.class), - new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Web_Link"), IconUtils.readIcon("com/fr/design/images/data/hyperlink.png"), WebHyperlink.class, WebHyperlinkPane.ChartNoRename.class), - new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_JavaScript_Dynamic_Parameters"), IconUtils.readIcon("com/fr/design/images/data/hyperlink.png"), ParameterJavaScript.class, ParameterJavaScriptPane.ChartNoRename.class), - new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_JavaScript"), IconUtils.readIcon("com/fr/design/images/data/hyperlink.png"), JavaScriptImpl.class, JavaScriptImplPane.ChartNoRename.class), - new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup"), IconUtils.readIcon("com/fr/design/images/data/hyperlink.png"), MobilePopupHyperlink.class, MobilePopupPane.class), + new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Reportlet"), IconUtils.readIcon("com/fr/design/images/data/hyperlink.svg"), ReportletHyperlink.class, ReportletHyperlinkPane.ChartNoRename.class), + new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Email"), IconUtils.readIcon("com/fr/design/images/data/hyperlink.svg"), EmailJavaScript.class, EmailPane.class), + new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Web_Link"), IconUtils.readIcon("com/fr/design/images/data/hyperlink.svg"), WebHyperlink.class, WebHyperlinkPane.ChartNoRename.class), + new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_JavaScript_Dynamic_Parameters"), IconUtils.readIcon("com/fr/design/images/data/hyperlink.svg"), ParameterJavaScript.class, ParameterJavaScriptPane.ChartNoRename.class), + new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_JavaScript"), IconUtils.readIcon("com/fr/design/images/data/hyperlink.svg"), JavaScriptImpl.class, JavaScriptImplPane.ChartNoRename.class), + new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup"), IconUtils.readIcon("com/fr/design/images/data/hyperlink.svg"), MobilePopupHyperlink.class, MobilePopupPane.class), }; }