From 4cb90204042d0e0b6c5982820c80af6ee10c1bde Mon Sep 17 00:00:00 2001 From: "Yuan.Wang" <1536296691@qq.com> Date: Fri, 18 Sep 2020 15:17:20 +0800 Subject: [PATCH 1/6] =?UTF-8?q?REPORT-40028=20=E5=9C=A8UI=E7=B1=BB?= =?UTF-8?q?=E7=9A=84paint=E6=96=B9=E6=B3=95=E4=B8=AD=E5=B7=B2=E7=BB=8F?= =?UTF-8?q?=E8=BF=9B=E8=A1=8C=E4=BA=86=E9=A1=B6=E5=B1=82=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E7=9A=84=E7=BB=98=E5=88=B6=EF=BC=8C=E5=B0=B1=E4=B8=8D=E5=B0=86?= =?UTF-8?q?=E5=85=B6=E5=8A=A0=E5=85=A5FormDesigner=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/mainframe/FormDesigner.java | 1 - .../src/main/java/com/fr/design/mainframe/FormDesignerUI.java | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/mainframe/FormDesigner.java b/designer-form/src/main/java/com/fr/design/mainframe/FormDesigner.java index eefeb01a3..55c2106b0 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/FormDesigner.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/FormDesigner.java @@ -189,7 +189,6 @@ public class FormDesigner extends TargetComponent
implements TreeSelection this.switchAction = switchAction; topXCreators=new TopXCreators(this); topXCreators.setVisible(true); - add(topXCreators); // 必须刷新"参数/控件树"面板,否则,若最近一次打开模版为 cpt,重启设计器,打开 frm,控件树消失 populateParameterPropertyPane(); diff --git a/designer-form/src/main/java/com/fr/design/mainframe/FormDesignerUI.java b/designer-form/src/main/java/com/fr/design/mainframe/FormDesignerUI.java index 2a8e255e8..a54ec1211 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/FormDesignerUI.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/FormDesignerUI.java @@ -84,7 +84,7 @@ public class FormDesignerUI extends ComponentUI { // 设计参数面板 repaintPara(g, paraComponent, c); } - repaintTopXCreators(g); + paintTopXCreators(g); if (designer.isDrawLineMode() && designer.getDrawLineHelper().drawLining()) { designer.getDrawLineHelper().drawAuxiliaryLine(g); @@ -446,7 +446,7 @@ public class FormDesignerUI extends ComponentUI { ComponentUtils.resetBuffer(dbcomponents); } - private void repaintTopXCreators(Graphics g){ + private void paintTopXCreators(Graphics g){ designer.paintTopCreators(g); } From 16d4926011d426e6a22c70b4bdc68a2acd659dfb Mon Sep 17 00:00:00 2001 From: Yyming Date: Fri, 18 Sep 2020 16:28:23 +0800 Subject: [PATCH 2/6] =?UTF-8?q?REPORT-39884=20=E6=9C=8D=E5=8A=A1=E5=99=A8?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=9B=86=E5=92=8C=E6=A8=A1=E6=9D=BF=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E9=9B=86=E5=90=8C=E5=90=8D=E6=97=B6=EF=BC=8C=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=AD=97=E5=85=B8=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data/datapane/TableDataCreatorProducer.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/TableDataCreatorProducer.java b/designer-base/src/main/java/com/fr/design/data/datapane/TableDataCreatorProducer.java index bebcd14e2..fad88af71 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/TableDataCreatorProducer.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/TableDataCreatorProducer.java @@ -72,24 +72,24 @@ public class TableDataCreatorProducer { public TableDataNameObjectCreator[] createServerTableDataCreator() { TableDataNameObjectCreator dataBase = new TableDataNameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_DS_Database_Query"), - "ds", + "ds0", "/com/fr/design/images/data/dock/serverdatabase.png", DBTableData.class, DBTableDataPane.class); TableDataNameObjectCreator ds_Class = new TableDataNameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tabledata_Type_Class"), - "Class", + "Class0", "/com/fr/design/images/data/dock/serverclasstabledata.png", ClassTableData.class, ClassTableDataPane.class); TableDataNameObjectCreator table = new TableDataNameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tabledata_Type_Embedded"), - "Embedded", + "Embedded0", "/com/fr/design/images/data/dock/serverdatatable.png", EmbeddedTableData.class, EmbeddedTableDataPane.class); TableDataNameObjectCreator fileTable = new TableDataNameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tabledata_Type_File"), - "File", + "File0", "/com/fr/design/images/data/file.png", FileTableData.class, FileTableDataSmallPane.class); TableDataNameObjectCreator treeTable = new TableDataNameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tabledata_Type_Tree"), - "Tree", + "Tree0", "/com/fr/design/images/data/tree.png", RecursionTableData.class, GlobalTreeTableDataPane.class) { public boolean isNeedParameterWhenPopulateJControlPane() { @@ -97,7 +97,7 @@ public class TableDataCreatorProducer { } }; TableDataNameObjectCreator multiTable = new TableDataNameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tabledata_Type_Relation"), - "Multi", + "Multi0", "/com/fr/design/images/data/multi.png", ConditionTableData.class, GlobalMultiTDTableDataPane.class) { public boolean isNeedParameterWhenPopulateJControlPane() { @@ -105,7 +105,7 @@ public class TableDataCreatorProducer { } }; TableDataNameObjectCreator storeProcedure = new TableDataNameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tabledata_Type_Stored_Procedure"), - "Proc", + "Proc0", "/com/fr/design/images/data/store_procedure.png", StoreProcedure.class, ProcedureDataPane.class) { @Override From 5910f0a3e42805e32d85503a183242fdc8860e87 Mon Sep 17 00:00:00 2001 From: hades Date: Fri, 18 Sep 2020 17:59:49 +0800 Subject: [PATCH 3/6] =?UTF-8?q?MOBILE-29339=20=E4=B8=A4=E4=B8=AA=E6=A8=AA?= =?UTF-8?q?=E5=90=91=E5=B8=83=E5=B1=80=E5=9D=97=E4=B8=AD=E9=97=B4=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E6=8F=92=E5=85=A5=E6=96=B0=E6=8A=A5=E8=A1=A8=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../adapters/layout/FRFitLayoutAdapter.java | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRFitLayoutAdapter.java b/designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRFitLayoutAdapter.java index dfb4d9409..24c3a19db 100644 --- a/designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRFitLayoutAdapter.java +++ b/designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRFitLayoutAdapter.java @@ -3,6 +3,7 @@ */ package com.fr.design.designer.beans.adapters.layout; +import com.fr.design.ExtraDesignClassManager; import com.fr.design.beans.GroupModel; import com.fr.design.designer.beans.ConstraintsGroupModel; import com.fr.design.designer.beans.HoverPainter; @@ -18,6 +19,7 @@ import com.fr.design.designer.creator.cardlayout.XWCardTitleLayout; import com.fr.design.designer.creator.cardlayout.XWTabFitLayout; import com.fr.design.designer.properties.FRFitLayoutConstraints; import com.fr.design.designer.properties.FRFitLayoutPropertiesGroupModel; +import com.fr.design.fun.FormWidgetOptionProvider; import com.fr.design.utils.ComponentUtils; import com.fr.form.ui.LayoutBorderStyle; import com.fr.form.ui.container.WAbsoluteLayout; @@ -32,6 +34,7 @@ import java.awt.Dimension; import java.awt.Rectangle; import java.util.ArrayList; import java.util.List; +import java.util.Set; /** * 自适应布局的容器适配器 @@ -161,7 +164,8 @@ public class FRFitLayoutAdapter extends FRBodyLayoutAdapter { //布局控件要先判断是不是可编辑 XLayoutContainer topLayout = XCreatorUtils.getHotspotContainer((XCreator) comp).getTopLayout(); - if (topLayout != null && !isMatchEdge && !topLayout.isEditable() && !topLayout.acceptType(XWAbsoluteLayout.class)) { + boolean access = topLayout != null && !isMatchEdge && !topLayout.isEditable() && !topLayout.acceptType(XWAbsoluteLayout.class) && !isExtraContainer(comp); + if (access) { return false; } @@ -178,6 +182,18 @@ public class FRFitLayoutAdapter extends FRBodyLayoutAdapter { return y > upHeight && y < downHeight ? horizonValid : verticalValid; } + private boolean isExtraContainer(Component comp) { + if (container != null) { + Set set = ExtraDesignClassManager.getInstance().getArray(FormWidgetOptionProvider.XML_TAG); + for (FormWidgetOptionProvider provider : set) { + if (provider.isContainer() && ComparatorUtils.equals(provider.appearanceForWidget(), comp.getClass())) { + return true; + } + } + } + return false; + } + // 间隔区域 private boolean checkInterval(Component comp) { return container.getComponentCount() > 0 && comp == container; From 2812d09ea389566fb812d4c96cd11ab7f789c711 Mon Sep 17 00:00:00 2001 From: kerry Date: Mon, 21 Sep 2020 09:43:04 +0800 Subject: [PATCH 4/6] =?UTF-8?q?REPORT-38618=E3=80=90=E5=9B=9E=E5=BD=92?= =?UTF-8?q?=E3=80=91=E8=A1=A8=E5=8D=95-=E4=B8=8B=E6=96=B9=E7=BC=A9?= =?UTF-8?q?=E6=94=BE=E7=BC=A9=E5=B0=8F=E4=B9=8B=E5=90=8E=EF=BC=8C=E6=8B=96?= =?UTF-8?q?=E5=85=A5tab=E5=9D=97=EF=BC=8C=E6=9F=A5=E7=9C=8B=E5=8F=B3?= =?UTF-8?q?=E4=BE=A7=E8=BE=B9=E6=A1=86=E7=BA=BF=E6=B6=88=E5=A4=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/design/mainframe/FormDesignerUI.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/mainframe/FormDesignerUI.java b/designer-form/src/main/java/com/fr/design/mainframe/FormDesignerUI.java index 2a8e255e8..c3994e384 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/FormDesignerUI.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/FormDesignerUI.java @@ -410,8 +410,8 @@ public class FormDesignerUI extends ComponentUI { clipg = g.create( -designer.getHorizontalScaleValue(), -designer.getVerticalScaleValue() + designer.getParaHeight(), - parent.getSize().width + designer.getHorizontalScaleValue(), - parent.getSize().height + designer.getVerticalScaleValue()); + component.getSize().width + designer.getHorizontalScaleValue(), + component.getSize().height + designer.getVerticalScaleValue()); designer.paintContent(clipg); paintWatermark((Graphics2D) clipg); @@ -436,7 +436,7 @@ public class FormDesignerUI extends ComponentUI { Graphics clipg1; clipg1 = g.create(-designer.getHorizontalScaleValue(), -designer.getVerticalScaleValue(), - parent.getSize().width + designer.getHorizontalScaleValue(), + component.getSize().width + designer.getHorizontalScaleValue(), designer.getParaHeight() + designer.getVerticalScaleValue()); designer.paintPara(clipg1); From 41309234d2b63cfc827e57cacd92f0cee6df1c5f Mon Sep 17 00:00:00 2001 From: Yyming Date: Mon, 21 Sep 2020 10:46:03 +0800 Subject: [PATCH 5/6] =?UTF-8?q?REPORT-39884=20=E5=9B=9E=E9=80=80=E6=88=90?= =?UTF-8?q?=E5=9B=BD=E9=99=85=E5=8C=96=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data/datapane/TableDataCreatorProducer.java | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/TableDataCreatorProducer.java b/designer-base/src/main/java/com/fr/design/data/datapane/TableDataCreatorProducer.java index fad88af71..51bd8b49b 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/TableDataCreatorProducer.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/TableDataCreatorProducer.java @@ -72,24 +72,18 @@ public class TableDataCreatorProducer { public TableDataNameObjectCreator[] createServerTableDataCreator() { TableDataNameObjectCreator dataBase = new TableDataNameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_DS_Database_Query"), - "ds0", "/com/fr/design/images/data/dock/serverdatabase.png", DBTableData.class, DBTableDataPane.class); TableDataNameObjectCreator ds_Class = new TableDataNameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tabledata_Type_Class"), - "Class0", "/com/fr/design/images/data/dock/serverclasstabledata.png", ClassTableData.class, ClassTableDataPane.class); TableDataNameObjectCreator table = new TableDataNameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tabledata_Type_Embedded"), - "Embedded0", "/com/fr/design/images/data/dock/serverdatatable.png", EmbeddedTableData.class, EmbeddedTableDataPane.class); TableDataNameObjectCreator fileTable = new TableDataNameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tabledata_Type_File"), - "File0", "/com/fr/design/images/data/file.png", FileTableData.class, FileTableDataSmallPane.class); - TableDataNameObjectCreator treeTable = new TableDataNameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tabledata_Type_Tree"), - "Tree0", "/com/fr/design/images/data/tree.png", RecursionTableData.class, GlobalTreeTableDataPane.class) { public boolean isNeedParameterWhenPopulateJControlPane() { @@ -97,7 +91,6 @@ public class TableDataCreatorProducer { } }; TableDataNameObjectCreator multiTable = new TableDataNameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tabledata_Type_Relation"), - "Multi0", "/com/fr/design/images/data/multi.png", ConditionTableData.class, GlobalMultiTDTableDataPane.class) { public boolean isNeedParameterWhenPopulateJControlPane() { @@ -105,7 +98,6 @@ public class TableDataCreatorProducer { } }; TableDataNameObjectCreator storeProcedure = new TableDataNameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tabledata_Type_Stored_Procedure"), - "Proc0", "/com/fr/design/images/data/store_procedure.png", StoreProcedure.class, ProcedureDataPane.class) { @Override @@ -113,9 +105,7 @@ public class TableDataCreatorProducer { return true; } }; - TableDataNameObjectCreator[] creators = new TableDataNameObjectCreator[]{dataBase, ds_Class, table, fileTable, storeProcedure, multiTable, treeTable}; - return merge(creators, ExtraDesignClassManager.getInstance().getServerTableDataCreators()); } @@ -141,6 +131,6 @@ public class TableDataCreatorProducer { for (int i = 0; i < coverIndexList.size(); i ++) { creators[coverIndexList.get(i)] = coverCreators.get(i); } - return (TableDataNameObjectCreator[])ArrayUtils.addAll(creators, list.toArray(new TableDataNameObjectCreator[list.size()])); + return ArrayUtils.addAll(creators, list.toArray(new TableDataNameObjectCreator[0])); } } From 4860a9c94c4f7c171f07cb7885e8c8a0db1348f2 Mon Sep 17 00:00:00 2001 From: Hans Date: Mon, 21 Sep 2020 14:02:37 +0800 Subject: [PATCH 6/6] =?UTF-8?q?MOBILE-29516=E3=80=90=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E3=80=91tab=E6=89=8B=E5=8A=BF=E5=88=87=E6=8D=A2?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E3=80=8B=E5=9C=86=E7=82=B9=E6=8C=87=E7=A4=BA?= =?UTF-8?q?=E5=99=A8=E8=AE=BE=E7=BD=AE=E9=A1=B9=E5=9C=A8=E4=B8=8D=E5=8B=BE?= =?UTF-8?q?=E9=80=89=E6=BB=91=E5=8A=A8=E7=9A=84=E6=97=B6=E5=80=99=E4=B9=9F?= =?UTF-8?q?=E4=BC=9A=E6=98=BE=E7=A4=BA=E4=BF=AE=E6=94=B9=20=E6=8C=89?= =?UTF-8?q?=E7=85=A7=E4=BA=A4=E4=BA=92=E7=9A=84=E8=AE=BE=E8=AE=A1=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E6=98=BE=E7=A4=BA=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/MobileTabCommonSettingPane.java | 40 +++++++++++-------- 1 file changed, 24 insertions(+), 16 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/component/MobileTabCommonSettingPane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/component/MobileTabCommonSettingPane.java index cf4923aed..85475fd68 100644 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/component/MobileTabCommonSettingPane.java +++ b/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/component/MobileTabCommonSettingPane.java @@ -112,20 +112,10 @@ public class MobileTabCommonSettingPane extends BasicPane { JPanel selectDotColorPane = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{selectColor, selectDotColorBox}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_L1, LayoutConstants.VGAP_MEDIUM); double[] rowSize = {TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED}; - double[] columnSize = {TableLayout.FILL}; - int[][] rowCount = {{1}, {1}, {1}}; - double[] verticalGaps = {10, 10, 10}; + double[] verticalGaps = {IntervalConstants.INTERVAL_L1, IntervalConstants.INTERVAL_L1, IntervalConstants.INTERVAL_L1}; double[] dotSettingColumnSize = {TableLayout.PREFERRED, TableLayout.FILL}; - Component[][] components = new Component[][]{ - new Component[]{this.showTabTitleCheck}, - new Component[]{this.tabSlideCheck}, - new Component[]{this.showTabDotIndicatorCheck} - }; - - JPanel tabBaseConfigPane = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, - IntervalConstants.INTERVAL_L1, IntervalConstants.INTERVAL_L1); - tabBaseConfigPane.setBorder(BorderFactory.createEmptyBorder(0, 0, IntervalConstants.INTERVAL_L1, 0)); + final JPanel tabBaseConfigPanel = createTableConfigJPanel(); JPanel dotIndicatorSettingPanel = TableLayoutHelper.createDiffVGapTableLayoutPane(new JComponent[][]{ {label, dotIndicatorShowTypePane}, @@ -135,11 +125,18 @@ public class MobileTabCommonSettingPane extends BasicPane { BorderFactory.createEmptyBorder(0, IntervalConstants.INTERVAL_L2, IntervalConstants.INTERVAL_L1, 0) ); - final JPanel jPanel = FRGUIPaneFactory.createBorderLayout_S_Pane(); - jPanel.add(tabBaseConfigPane, BorderLayout.NORTH); - jPanel.add(dotIndicatorSettingPanel, BorderLayout.CENTER); + final JPanel tableConfigJPanel = FRGUIPaneFactory.createBorderLayout_S_Pane(); + tableConfigJPanel.add(tabBaseConfigPanel, BorderLayout.NORTH); + tableConfigJPanel.add(dotIndicatorSettingPanel, BorderLayout.CENTER); + this.add(tableConfigJPanel, BorderLayout.CENTER); - this.add(jPanel, BorderLayout.CENTER); + tabSlideCheck.addChangeListener(new ChangeListener() { + @Override + public void stateChanged(ChangeEvent e) { + showTabDotIndicatorCheck.setVisible(tabSlideCheck.isSelected()); + dotIndicatorSettingPanel.setVisible(tabSlideCheck.isSelected() && showTabDotIndicatorCheck.isSelected()); + } + }); showTabDotIndicatorCheck.addChangeListener(new ChangeListener() { @Override @@ -200,4 +197,15 @@ public class MobileTabCommonSettingPane extends BasicPane { colorBox.setSelectObject(color); } } + + private JPanel createTableConfigJPanel() { + final JPanel jPanel = new JPanel(); + BorderLayout borderLayout = new BorderLayout(0, IntervalConstants.INTERVAL_L1); + jPanel.setLayout(borderLayout); + jPanel.add(this.showTabTitleCheck, BorderLayout.NORTH); + jPanel.add(this.tabSlideCheck, BorderLayout.CENTER); + jPanel.add(this.showTabDotIndicatorCheck, BorderLayout.SOUTH); + jPanel.setBorder(BorderFactory.createEmptyBorder(0, 0, IntervalConstants.INTERVAL_L1, 0)); + return jPanel; + } }