Browse Source

Merge pull request #1142 in BA/design from ~PLOUGH/design:release/9.0 to release/9.0

* commit '14a439529dc2781f09dabfdd4ba567d1100b0bdc':
  调整代码
  REPORT-3914 调整代码
  REPORT-3914 [9.0一轮回归]选中一片单元格后右侧工具栏中插入单元格元素可用
master
superman 7 years ago
parent
commit
3c8643406b
  1. 2
      designer/src/com/fr/design/mainframe/ElementCasePaneDelegate.java
  2. 2
      designer/src/com/fr/design/mainframe/form/FormElementCasePaneDelegate.java
  3. 11
      designer/src/com/fr/poly/creator/ECBlockEditor.java
  4. 18
      designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java

2
designer/src/com/fr/design/mainframe/ElementCasePaneDelegate.java

@ -97,6 +97,8 @@ public class ElementCasePaneDelegate extends ElementCasePane<WorkSheet> {
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());
EastRegionContainerPane.getInstance().updateCellElementState(isSelectedOneCell());
} }
EastRegionContainerPane.getInstance().replaceHyperlinkPane(hyperlinkGroupPane); EastRegionContainerPane.getInstance().replaceHyperlinkPane(hyperlinkGroupPane);
EastRegionContainerPane.getInstance().removeParameterPane(); EastRegionContainerPane.getInstance().removeParameterPane();

2
designer/src/com/fr/design/mainframe/form/FormElementCasePaneDelegate.java

@ -46,7 +46,7 @@ public class FormElementCasePaneDelegate extends ElementCasePane<FormElementCase
ConditionAttributesGroupPane conditionAttributesGroupPane = ConditionAttributesGroupPane.getInstance(); ConditionAttributesGroupPane conditionAttributesGroupPane = ConditionAttributesGroupPane.getInstance();
conditionAttributesGroupPane.populate(FormElementCasePaneDelegate.this); conditionAttributesGroupPane.populate(FormElementCasePaneDelegate.this);
// populateHyperLinkGroupPane(); EastRegionContainerPane.getInstance().updateCellElementState(isSelectedOneCell());
} }
}); });
this.addTargetModifiedListener(new TargetModifiedListener() { this.addTargetModifiedListener(new TargetModifiedListener() {

11
designer/src/com/fr/poly/creator/ECBlockEditor.java

@ -157,6 +157,8 @@ public class ECBlockEditor extends BlockEditor<ECBlockPane, PolyECBlock> {
EastRegionContainerPane.getInstance().replaceCellAttrPane(CellElementPropertyPane.getInstance()); EastRegionContainerPane.getInstance().replaceCellAttrPane(CellElementPropertyPane.getInstance());
EastRegionContainerPane.getInstance().replaceCellElementPane(QuickEditorRegion.getInstance()); EastRegionContainerPane.getInstance().replaceCellElementPane(QuickEditorRegion.getInstance());
EastRegionContainerPane.getInstance().replaceWidgetSettingsPane(CellWidgetPropertyPane.getInstance()); EastRegionContainerPane.getInstance().replaceWidgetSettingsPane(CellWidgetPropertyPane.getInstance());
EastRegionContainerPane.getInstance().updateCellElementState(isSelectedOneCell());
} }
EastRegionContainerPane.getInstance().replaceCellAttrPane(CellElementPropertyPane.getInstance()); EastRegionContainerPane.getInstance().replaceCellAttrPane(CellElementPropertyPane.getInstance());
@ -169,4 +171,13 @@ public class ECBlockEditor extends BlockEditor<ECBlockPane, PolyECBlock> {
ConditionAttributesGroupPane conditionAttributesGroupPane = ConditionAttributesGroupPane.getInstance(); ConditionAttributesGroupPane conditionAttributesGroupPane = ConditionAttributesGroupPane.getInstance();
conditionAttributesGroupPane.populate(editComponent); conditionAttributesGroupPane.populate(editComponent);
} }
private boolean isSelectedOneCell() {
JTemplate jTemplate = DesignerContext.getDesignerFrame().getSelectedJTemplate();
if (jTemplate == null) {
return false;
}
ElementCasePane ePane = (ElementCasePane)jTemplate.getCurrentElementCasePane();
return ePane != null && ePane.isSelectedOneCell();
}
} }

18
designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java

@ -153,6 +153,24 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
return defaultPane; return defaultPane;
} }
public void updateCellElementState(boolean isSelectedOneCell) {
if (isSelectedOneCell) {
enableCellElementPane();
} else { // 如果选中多个单元格,禁用单元格元素 tab
disableCellElementPane();
refreshRightPane();
}
}
// 禁用单元格元素tab
private void disableCellElementPane() {
propertyItemMap.get(KEY_CELL_ELEMENT).setEnabled(false);
}
// 禁用单元格元素tab
private void enableCellElementPane() {
propertyItemMap.get(KEY_CELL_ELEMENT).setEnabled(true);
}
private void initContentPane() { private void initContentPane() {
initRightPane(); initRightPane();
initLeftPane(); initLeftPane();

Loading…
Cancel
Save