Browse Source

Merge pull request #2385 in DESIGN/design from bugfix/10.0 to feature/10.0

* commit '97879c934b45f2f23f096a63b5accbfb2ae1e4a6':
  MOBILE-29516【设计器】tab手势切换样式》圆点指示器设置项在不勾选滑动的时候也会显示修改 按照交互的设计调整显示规则
  REPORT-39884 回退成国际化版本
  REPORT-38618【回归】表单-下方缩放缩小之后,拖入tab块,查看右侧边框线消失
  MOBILE-29339 两个横向布局块中间无法插入新报表块
  REPORT-39884 服务器数据集和模板数据集同名时,数据字典显示问题
  REPORT-40028 在UI类的paint方法中已经进行了顶层组件的绘制,就不将其加入FormDesigner了
research/11.0
superman 4 years ago
parent
commit
26887a2680
  1. 12
      designer-base/src/main/java/com/fr/design/data/datapane/TableDataCreatorProducer.java
  2. 18
      designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRFitLayoutAdapter.java
  3. 1
      designer-form/src/main/java/com/fr/design/mainframe/FormDesigner.java
  4. 10
      designer-form/src/main/java/com/fr/design/mainframe/FormDesignerUI.java
  5. 40
      designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/component/MobileTabCommonSettingPane.java

12
designer-base/src/main/java/com/fr/design/data/datapane/TableDataCreatorProducer.java

@ -72,24 +72,18 @@ public class TableDataCreatorProducer {
public TableDataNameObjectCreator[] createServerTableDataCreator() { public TableDataNameObjectCreator[] createServerTableDataCreator() {
TableDataNameObjectCreator dataBase = new TableDataNameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_DS_Database_Query"), TableDataNameObjectCreator dataBase = new TableDataNameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_DS_Database_Query"),
"ds",
"/com/fr/design/images/data/dock/serverdatabase.png", DBTableData.class, "/com/fr/design/images/data/dock/serverdatabase.png", DBTableData.class,
DBTableDataPane.class); DBTableDataPane.class);
TableDataNameObjectCreator ds_Class = new TableDataNameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tabledata_Type_Class"), TableDataNameObjectCreator ds_Class = new TableDataNameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tabledata_Type_Class"),
"Class",
"/com/fr/design/images/data/dock/serverclasstabledata.png", ClassTableData.class, "/com/fr/design/images/data/dock/serverclasstabledata.png", ClassTableData.class,
ClassTableDataPane.class); ClassTableDataPane.class);
TableDataNameObjectCreator table = new TableDataNameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tabledata_Type_Embedded"), TableDataNameObjectCreator table = new TableDataNameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tabledata_Type_Embedded"),
"Embedded",
"/com/fr/design/images/data/dock/serverdatatable.png", EmbeddedTableData.class, "/com/fr/design/images/data/dock/serverdatatable.png", EmbeddedTableData.class,
EmbeddedTableDataPane.class); EmbeddedTableDataPane.class);
TableDataNameObjectCreator fileTable = new TableDataNameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tabledata_Type_File"), TableDataNameObjectCreator fileTable = new TableDataNameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tabledata_Type_File"),
"File",
"/com/fr/design/images/data/file.png", FileTableData.class, "/com/fr/design/images/data/file.png", FileTableData.class,
FileTableDataSmallPane.class); FileTableDataSmallPane.class);
TableDataNameObjectCreator treeTable = new TableDataNameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tabledata_Type_Tree"), TableDataNameObjectCreator treeTable = new TableDataNameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tabledata_Type_Tree"),
"Tree",
"/com/fr/design/images/data/tree.png", "/com/fr/design/images/data/tree.png",
RecursionTableData.class, GlobalTreeTableDataPane.class) { RecursionTableData.class, GlobalTreeTableDataPane.class) {
public boolean isNeedParameterWhenPopulateJControlPane() { 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"), TableDataNameObjectCreator multiTable = new TableDataNameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tabledata_Type_Relation"),
"Multi",
"/com/fr/design/images/data/multi.png", "/com/fr/design/images/data/multi.png",
ConditionTableData.class, GlobalMultiTDTableDataPane.class) { ConditionTableData.class, GlobalMultiTDTableDataPane.class) {
public boolean isNeedParameterWhenPopulateJControlPane() { 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"), TableDataNameObjectCreator storeProcedure = new TableDataNameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tabledata_Type_Stored_Procedure"),
"Proc",
"/com/fr/design/images/data/store_procedure.png", "/com/fr/design/images/data/store_procedure.png",
StoreProcedure.class, ProcedureDataPane.class) { StoreProcedure.class, ProcedureDataPane.class) {
@Override @Override
@ -113,9 +105,7 @@ public class TableDataCreatorProducer {
return true; return true;
} }
}; };
TableDataNameObjectCreator[] creators = new TableDataNameObjectCreator[]{dataBase, ds_Class, table, fileTable, storeProcedure, multiTable, treeTable}; TableDataNameObjectCreator[] creators = new TableDataNameObjectCreator[]{dataBase, ds_Class, table, fileTable, storeProcedure, multiTable, treeTable};
return merge(creators, ExtraDesignClassManager.getInstance().getServerTableDataCreators()); return merge(creators, ExtraDesignClassManager.getInstance().getServerTableDataCreators());
} }
@ -141,6 +131,6 @@ public class TableDataCreatorProducer {
for (int i = 0; i < coverIndexList.size(); i ++) { for (int i = 0; i < coverIndexList.size(); i ++) {
creators[coverIndexList.get(i)] = coverCreators.get(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]));
} }
} }

18
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; package com.fr.design.designer.beans.adapters.layout;
import com.fr.design.ExtraDesignClassManager;
import com.fr.design.beans.GroupModel; import com.fr.design.beans.GroupModel;
import com.fr.design.designer.beans.ConstraintsGroupModel; import com.fr.design.designer.beans.ConstraintsGroupModel;
import com.fr.design.designer.beans.HoverPainter; 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.creator.cardlayout.XWTabFitLayout;
import com.fr.design.designer.properties.FRFitLayoutConstraints; import com.fr.design.designer.properties.FRFitLayoutConstraints;
import com.fr.design.designer.properties.FRFitLayoutPropertiesGroupModel; import com.fr.design.designer.properties.FRFitLayoutPropertiesGroupModel;
import com.fr.design.fun.FormWidgetOptionProvider;
import com.fr.design.utils.ComponentUtils; import com.fr.design.utils.ComponentUtils;
import com.fr.form.ui.LayoutBorderStyle; import com.fr.form.ui.LayoutBorderStyle;
import com.fr.form.ui.container.WAbsoluteLayout; import com.fr.form.ui.container.WAbsoluteLayout;
@ -32,6 +34,7 @@ import java.awt.Dimension;
import java.awt.Rectangle; import java.awt.Rectangle;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Set;
/** /**
* 自适应布局的容器适配器 * 自适应布局的容器适配器
@ -161,7 +164,8 @@ public class FRFitLayoutAdapter extends FRBodyLayoutAdapter {
//布局控件要先判断是不是可编辑 //布局控件要先判断是不是可编辑
XLayoutContainer topLayout = XCreatorUtils.getHotspotContainer((XCreator) comp).getTopLayout(); 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; return false;
} }
@ -178,6 +182,18 @@ public class FRFitLayoutAdapter extends FRBodyLayoutAdapter {
return y > upHeight && y < downHeight ? horizonValid : verticalValid; return y > upHeight && y < downHeight ? horizonValid : verticalValid;
} }
private boolean isExtraContainer(Component comp) {
if (container != null) {
Set<FormWidgetOptionProvider> 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) { private boolean checkInterval(Component comp) {
return container.getComponentCount() > 0 && comp == container; return container.getComponentCount() > 0 && comp == container;

1
designer-form/src/main/java/com/fr/design/mainframe/FormDesigner.java

@ -189,7 +189,6 @@ public class FormDesigner extends TargetComponent<Form> implements TreeSelection
this.switchAction = switchAction; this.switchAction = switchAction;
topXCreators=new TopXCreators(this); topXCreators=new TopXCreators(this);
topXCreators.setVisible(true); topXCreators.setVisible(true);
add(topXCreators);
// 必须刷新"参数/控件树"面板,否则,若最近一次打开模版为 cpt,重启设计器,打开 frm,控件树消失 // 必须刷新"参数/控件树"面板,否则,若最近一次打开模版为 cpt,重启设计器,打开 frm,控件树消失
populateParameterPropertyPane(); populateParameterPropertyPane();

10
designer-form/src/main/java/com/fr/design/mainframe/FormDesignerUI.java

@ -84,7 +84,7 @@ public class FormDesignerUI extends ComponentUI {
// 设计参数面板 // 设计参数面板
repaintPara(g, paraComponent, c); repaintPara(g, paraComponent, c);
} }
repaintTopXCreators(g); paintTopXCreators(g);
if (designer.isDrawLineMode() && designer.getDrawLineHelper().drawLining()) { if (designer.isDrawLineMode() && designer.getDrawLineHelper().drawLining()) {
designer.getDrawLineHelper().drawAuxiliaryLine(g); designer.getDrawLineHelper().drawAuxiliaryLine(g);
@ -410,8 +410,8 @@ public class FormDesignerUI extends ComponentUI {
clipg = g.create( clipg = g.create(
-designer.getHorizontalScaleValue(), -designer.getHorizontalScaleValue(),
-designer.getVerticalScaleValue() + designer.getParaHeight(), -designer.getVerticalScaleValue() + designer.getParaHeight(),
parent.getSize().width + designer.getHorizontalScaleValue(), component.getSize().width + designer.getHorizontalScaleValue(),
parent.getSize().height + designer.getVerticalScaleValue()); component.getSize().height + designer.getVerticalScaleValue());
designer.paintContent(clipg); designer.paintContent(clipg);
paintWatermark((Graphics2D) clipg); paintWatermark((Graphics2D) clipg);
@ -436,7 +436,7 @@ public class FormDesignerUI extends ComponentUI {
Graphics clipg1; Graphics clipg1;
clipg1 = g.create(-designer.getHorizontalScaleValue(), clipg1 = g.create(-designer.getHorizontalScaleValue(),
-designer.getVerticalScaleValue(), -designer.getVerticalScaleValue(),
parent.getSize().width + designer.getHorizontalScaleValue(), component.getSize().width + designer.getHorizontalScaleValue(),
designer.getParaHeight() + designer.getVerticalScaleValue()); designer.getParaHeight() + designer.getVerticalScaleValue());
designer.paintPara(clipg1); designer.paintPara(clipg1);
@ -446,7 +446,7 @@ public class FormDesignerUI extends ComponentUI {
ComponentUtils.resetBuffer(dbcomponents); ComponentUtils.resetBuffer(dbcomponents);
} }
private void repaintTopXCreators(Graphics g){ private void paintTopXCreators(Graphics g){
designer.paintTopCreators(g); designer.paintTopCreators(g);
} }

40
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); 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[] rowSize = {TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED};
double[] columnSize = {TableLayout.FILL}; double[] verticalGaps = {IntervalConstants.INTERVAL_L1, IntervalConstants.INTERVAL_L1, IntervalConstants.INTERVAL_L1};
int[][] rowCount = {{1}, {1}, {1}};
double[] verticalGaps = {10, 10, 10};
double[] dotSettingColumnSize = {TableLayout.PREFERRED, TableLayout.FILL}; double[] dotSettingColumnSize = {TableLayout.PREFERRED, TableLayout.FILL};
Component[][] components = new Component[][]{ final JPanel tabBaseConfigPanel = createTableConfigJPanel();
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));
JPanel dotIndicatorSettingPanel = TableLayoutHelper.createDiffVGapTableLayoutPane(new JComponent[][]{ JPanel dotIndicatorSettingPanel = TableLayoutHelper.createDiffVGapTableLayoutPane(new JComponent[][]{
{label, dotIndicatorShowTypePane}, {label, dotIndicatorShowTypePane},
@ -135,11 +125,18 @@ public class MobileTabCommonSettingPane extends BasicPane {
BorderFactory.createEmptyBorder(0, IntervalConstants.INTERVAL_L2, IntervalConstants.INTERVAL_L1, 0) BorderFactory.createEmptyBorder(0, IntervalConstants.INTERVAL_L2, IntervalConstants.INTERVAL_L1, 0)
); );
final JPanel jPanel = FRGUIPaneFactory.createBorderLayout_S_Pane(); final JPanel tableConfigJPanel = FRGUIPaneFactory.createBorderLayout_S_Pane();
jPanel.add(tabBaseConfigPane, BorderLayout.NORTH); tableConfigJPanel.add(tabBaseConfigPanel, BorderLayout.NORTH);
jPanel.add(dotIndicatorSettingPanel, BorderLayout.CENTER); 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() { showTabDotIndicatorCheck.addChangeListener(new ChangeListener() {
@Override @Override
@ -200,4 +197,15 @@ public class MobileTabCommonSettingPane extends BasicPane {
colorBox.setSelectObject(color); 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;
}
} }

Loading…
Cancel
Save