Browse Source

REPORT-3914 [9.0一轮回归]选中一片单元格后右侧工具栏中插入单元格元素可用

master
plough 7 years ago
parent
commit
13274e77ab
  1. 8
      designer/src/com/fr/design/mainframe/ElementCasePaneDelegate.java
  2. 7
      designer/src/com/fr/design/mainframe/form/FormElementCasePaneDelegate.java
  3. 16
      designer/src/com/fr/poly/creator/ECBlockEditor.java
  4. 9
      designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java

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

@ -62,6 +62,7 @@ public class ElementCasePaneDelegate extends ElementCasePane<WorkSheet> {
}
private void doOnSelectionChanged(SelectionEvent e) {
System.out.println();
//在编辑权限,所以要更新权限编辑面板
if (BaseUtils.isAuthorityEditing()) {
AuthorityPropertyPane authorityPropertyPane = new AuthorityPropertyPane(ElementCasePaneDelegate.this);
@ -97,6 +98,13 @@ public class ElementCasePaneDelegate extends ElementCasePane<WorkSheet> {
EastRegionContainerPane.getInstance().replaceCellElementPane(QuickEditorRegion.getInstance());
EastRegionContainerPane.getInstance().replaceConditionAttrPane(conditionAttributesGroupPane);
EastRegionContainerPane.getInstance().replaceWidgetSettingsPane(CellWidgetPropertyPane.getInstance());
if (isSelectedOneCell()) {
EastRegionContainerPane.getInstance().enableCellElementPane();
} else { // 如果选中多个单元格,禁用单元格元素 tab
EastRegionContainerPane.getInstance().disableCellElementPane();
EastRegionContainerPane.getInstance().refreshRightPane();
}
}
EastRegionContainerPane.getInstance().replaceHyperlinkPane(hyperlinkGroupPane);
EastRegionContainerPane.getInstance().removeParameterPane();

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

@ -46,7 +46,12 @@ public class FormElementCasePaneDelegate extends ElementCasePane<FormElementCase
ConditionAttributesGroupPane conditionAttributesGroupPane = ConditionAttributesGroupPane.getInstance();
conditionAttributesGroupPane.populate(FormElementCasePaneDelegate.this);
// populateHyperLinkGroupPane();
if (isSelectedOneCell()) {
EastRegionContainerPane.getInstance().enableCellElementPane();
} else { // 如果选中多个单元格,禁用单元格元素 tab
EastRegionContainerPane.getInstance().disableCellElementPane();
EastRegionContainerPane.getInstance().refreshRightPane();
}
}
});
this.addTargetModifiedListener(new TargetModifiedListener() {

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

@ -157,6 +157,13 @@ public class ECBlockEditor extends BlockEditor<ECBlockPane, PolyECBlock> {
EastRegionContainerPane.getInstance().replaceCellAttrPane(CellElementPropertyPane.getInstance());
EastRegionContainerPane.getInstance().replaceCellElementPane(QuickEditorRegion.getInstance());
EastRegionContainerPane.getInstance().replaceWidgetSettingsPane(CellWidgetPropertyPane.getInstance());
if (isSelectedOneCell()) {
EastRegionContainerPane.getInstance().enableCellElementPane();
} else { // 如果选中多个单元格,禁用单元格元素 tab
EastRegionContainerPane.getInstance().disableCellElementPane();
EastRegionContainerPane.getInstance().refreshRightPane();
}
}
EastRegionContainerPane.getInstance().replaceCellAttrPane(CellElementPropertyPane.getInstance());
@ -169,4 +176,13 @@ public class ECBlockEditor extends BlockEditor<ECBlockPane, PolyECBlock> {
ConditionAttributesGroupPane conditionAttributesGroupPane = ConditionAttributesGroupPane.getInstance();
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();
}
}

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

@ -153,6 +153,15 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
return defaultPane;
}
// 禁用单元格元素tab
public void disableCellElementPane() {
propertyItemMap.get(KEY_CELL_ELEMENT).setEnabled(false);
}
// 禁用单元格元素tab
public void enableCellElementPane() {
propertyItemMap.get(KEY_CELL_ELEMENT).setEnabled(true);
}
private void initContentPane() {
initRightPane();
initLeftPane();

Loading…
Cancel
Save