Browse Source

KERNEL-7376 优化设计器上一些性能问题

feature/10.0
Henry.Wang 4 years ago
parent
commit
258b8e9ccc
  1. 2
      designer-base/src/main/java/com/fr/design/selection/SelectableElement.java
  2. 1
      designer-realize/src/main/java/com/fr/design/mainframe/ElementCasePane.java
  3. 9
      designer-realize/src/main/java/com/fr/design/mainframe/ElementCasePaneDelegate.java

2
designer-base/src/main/java/com/fr/design/selection/SelectableElement.java

@ -14,7 +14,7 @@ public interface SelectableElement {
* *
* @return * @return
*/ */
@SuppressWarnings("rawtypes")
QuickEditor getQuickEditor(TargetComponent tc); QuickEditor getQuickEditor(TargetComponent tc);
/** /**

1
designer-realize/src/main/java/com/fr/design/mainframe/ElementCasePane.java

@ -149,7 +149,6 @@ public abstract class ElementCasePane<T extends TemplateElementCase> extends Tar
public static final int HORIZONTAL_OVER = 1; public static final int HORIZONTAL_OVER = 1;
public static final int VERTICAL_OVER = 2; public static final int VERTICAL_OVER = 2;
public static int C = 0;
// alex:既可以是选中一片单元格,也可以是选中一个悬浮元素 // alex:既可以是选中一片单元格,也可以是选中一个悬浮元素
//august:默认是个不存在的选择。方便初始化时触发GridSelectionChangeListener事件 //august:默认是个不存在的选择。方便初始化时触发GridSelectionChangeListener事件
private Selection selection = new CellSelection(-1, -1, -1, -1); private Selection selection = new CellSelection(-1, -1, -1, -1);

9
designer-realize/src/main/java/com/fr/design/mainframe/ElementCasePaneDelegate.java

@ -26,7 +26,6 @@ import com.fr.design.menu.MenuDef;
import com.fr.design.menu.SeparatorDef; import com.fr.design.menu.SeparatorDef;
import com.fr.design.present.ConditionAttributesGroupPane; import com.fr.design.present.ConditionAttributesGroupPane;
import com.fr.design.roleAuthority.RolesAlreadyEditedPane; import com.fr.design.roleAuthority.RolesAlreadyEditedPane;
import com.fr.design.selection.QuickEditor;
import com.fr.design.selection.SelectionEvent; import com.fr.design.selection.SelectionEvent;
import com.fr.design.selection.SelectionListener; import com.fr.design.selection.SelectionListener;
import com.fr.grid.selection.FloatSelection; import com.fr.grid.selection.FloatSelection;
@ -82,10 +81,8 @@ public class ElementCasePaneDelegate extends ElementCasePane<WorkSheet> {
} }
CellWidgetPropertyPane.getInstance().populate(ElementCasePaneDelegate.this); CellWidgetPropertyPane.getInstance().populate(ElementCasePaneDelegate.this);
CellElementPropertyPane.getInstance().populate(ElementCasePaneDelegate.this); CellElementPropertyPane.getInstance().populate(ElementCasePaneDelegate.this);
long s = System.currentTimeMillis();
QuickEditor quickEditor = getCurrentEditor(); QuickEditorRegion.getInstance().populate(getCurrentEditor());
QuickEditorRegion.getInstance().populate(quickEditor);
System.out.println("getAndPopulate:"+(System.currentTimeMillis()-s));
JTemplate editingTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); JTemplate editingTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate();
// 模板初始化完成后,才能初始化超级链接面板 // 模板初始化完成后,才能初始化超级链接面板
if (editingTemplate != null && !editingTemplate.isUpMode()) { if (editingTemplate != null && !editingTemplate.isUpMode()) {
@ -105,9 +102,7 @@ public class ElementCasePaneDelegate extends ElementCasePane<WorkSheet> {
EastRegionContainerPane.getInstance().replaceFloatElementPane(ReportFloatPane.getInstance()); EastRegionContainerPane.getInstance().replaceFloatElementPane(ReportFloatPane.getInstance());
EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.REPORT); EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.REPORT);
s = System.currentTimeMillis();
EastRegionContainerPane.getInstance().replaceCellAttrPane(CellElementPropertyPane.getInstance()); EastRegionContainerPane.getInstance().replaceCellAttrPane(CellElementPropertyPane.getInstance());
System.out.println("EastRegionContainerPane.getInstance().replaceCellAttrPane:"+(System.currentTimeMillis()-s));
EastRegionContainerPane.getInstance().replaceCellElementPane(QuickEditorRegion.getInstance()); EastRegionContainerPane.getInstance().replaceCellElementPane(QuickEditorRegion.getInstance());
EastRegionContainerPane.getInstance().replaceConditionAttrPane(conditionAttributesGroupPane); EastRegionContainerPane.getInstance().replaceConditionAttrPane(conditionAttributesGroupPane);
EastRegionContainerPane.getInstance().replaceWidgetSettingsPane(CellWidgetPropertyPane.getInstance()); EastRegionContainerPane.getInstance().replaceWidgetSettingsPane(CellWidgetPropertyPane.getInstance());

Loading…
Cancel
Save