Browse Source

REPORT-5840 控件生成和使用填报功能

MoMeak 8 years ago
parent
commit
988689ad4e
  1. 7
      designer/src/com/fr/design/present/ConditionAttributesGroupPane.java

7
designer/src/com/fr/design/present/ConditionAttributesGroupPane.java

@ -16,6 +16,7 @@ import com.fr.design.gui.controlpane.NameObjectCreator;
import com.fr.design.gui.controlpane.NameableCreator; import com.fr.design.gui.controlpane.NameableCreator;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.grid.selection.CellSelection; import com.fr.grid.selection.CellSelection;
import com.fr.grid.selection.Selection;
import com.fr.report.cell.CellElement; import com.fr.report.cell.CellElement;
import com.fr.report.cell.DefaultTemplateCellElement; import com.fr.report.cell.DefaultTemplateCellElement;
import com.fr.report.cell.TemplateCellElement; import com.fr.report.cell.TemplateCellElement;
@ -29,6 +30,7 @@ import com.fr.stable.Nameable;
public class ConditionAttributesGroupPane extends UIListControlPane { public class ConditionAttributesGroupPane extends UIListControlPane {
private static ConditionAttributesGroupPane singleton; private static ConditionAttributesGroupPane singleton;
private TemplateCellElement editCellElement; // 当前单元格对象 private TemplateCellElement editCellElement; // 当前单元格对象
private Selection editSelection; // 当前编辑对象
private ElementCasePane ePane; private ElementCasePane ePane;
private ConditionAttributesGroupPane() { private ConditionAttributesGroupPane() {
@ -52,10 +54,8 @@ public class ConditionAttributesGroupPane extends UIListControlPane {
if (isPopulating) { if (isPopulating) {
return; return;
} }
final CellSelection finalCS = (CellSelection) ePane.getSelection();
final TemplateElementCase tplEC = ePane.getEditingElementCase(); final TemplateElementCase tplEC = ePane.getEditingElementCase();
ReportActionUtils.actionIterateWithCellSelection((CellSelection) editSelection, tplEC, new ReportActionUtils.IterAction() {
ReportActionUtils.actionIterateWithCellSelection(finalCS, tplEC, new ReportActionUtils.IterAction() {
public void dealWith(CellElement editCellElement) { public void dealWith(CellElement editCellElement) {
((TemplateCellElement)editCellElement).setHighlightGroup(updateHighlightGroup()); ((TemplateCellElement)editCellElement).setHighlightGroup(updateHighlightGroup());
} }
@ -75,6 +75,7 @@ public class ConditionAttributesGroupPane extends UIListControlPane {
public void populate(ElementCasePane ePane) { public void populate(ElementCasePane ePane) {
this.ePane = ePane; this.ePane = ePane;
this.editSelection = ePane.getSelection();
CellSelection cs = (CellSelection) ePane.getSelection(); CellSelection cs = (CellSelection) ePane.getSelection();
final TemplateElementCase tplEC = ePane.getEditingElementCase(); final TemplateElementCase tplEC = ePane.getEditingElementCase();
editCellElement = tplEC.getTemplateCellElement(cs.getColumn(), cs.getRow()); editCellElement = tplEC.getTemplateCellElement(cs.getColumn(), cs.getRow());

Loading…
Cancel
Save