Browse Source

Merge branch 'release/10.0' of ssh://code.fineres.com:7999/~kerry/design_10.0 into release/10.0

feature/big-screen
kerry 4 years ago
parent
commit
6b70b8a239
  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. 4
      designer-form/src/main/java/com/fr/design/mainframe/FormDesignerUI.java

12
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"),
"ds",
"/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",
"/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",
"/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",
"/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",
"/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"),
"Multi",
"/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"),
"Proc",
"/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]));
}
}

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;
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<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) {
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;
topXCreators=new TopXCreators(this);
topXCreators.setVisible(true);
add(topXCreators);
// 必须刷新"参数/控件树"面板,否则,若最近一次打开模版为 cpt,重启设计器,打开 frm,控件树消失
populateParameterPropertyPane();

4
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);
}

Loading…
Cancel
Save