|
|
|
@ -4,6 +4,7 @@ import java.util.ArrayList;
|
|
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
|
import com.fr.base.FRContext; |
|
|
|
|
import com.fr.design.actions.utils.ReportActionUtils; |
|
|
|
|
import com.fr.design.gui.controlpane.UIListControlPane; |
|
|
|
|
import com.fr.design.mainframe.DesignerContext; |
|
|
|
|
import com.fr.design.mainframe.ElementCasePane; |
|
|
|
@ -15,6 +16,7 @@ import com.fr.design.gui.controlpane.NameObjectCreator;
|
|
|
|
|
import com.fr.design.gui.controlpane.NameableCreator; |
|
|
|
|
import com.fr.general.Inter; |
|
|
|
|
import com.fr.grid.selection.CellSelection; |
|
|
|
|
import com.fr.report.cell.CellElement; |
|
|
|
|
import com.fr.report.cell.DefaultTemplateCellElement; |
|
|
|
|
import com.fr.report.cell.TemplateCellElement; |
|
|
|
|
import com.fr.report.cell.cellattr.highlight.DefaultHighlight; |
|
|
|
@ -27,6 +29,7 @@ import com.fr.stable.Nameable;
|
|
|
|
|
public class ConditionAttributesGroupPane extends UIListControlPane { |
|
|
|
|
private static ConditionAttributesGroupPane singleton; |
|
|
|
|
private TemplateCellElement editCellElement; // 当前单元格对象
|
|
|
|
|
private ElementCasePane ePane; |
|
|
|
|
|
|
|
|
|
private ConditionAttributesGroupPane() { |
|
|
|
|
super(); |
|
|
|
@ -49,7 +52,25 @@ public class ConditionAttributesGroupPane extends UIListControlPane {
|
|
|
|
|
if (isPopulating) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
editCellElement.setHighlightGroup(updateHighlightGroup()); |
|
|
|
|
final CellSelection finalCS = (CellSelection) ePane.getSelection(); |
|
|
|
|
final TemplateElementCase tplEC = ePane.getEditingElementCase(); |
|
|
|
|
// for (int i = 0; i < finalCS.getRowSpan(); i++) {
|
|
|
|
|
// for (int j = 0; j < finalCS.getColumnSpan(); j++) {
|
|
|
|
|
// int row = i + finalCS.getRow();
|
|
|
|
|
// int column = j + finalCS.getColumn();
|
|
|
|
|
// TemplateCellElement editCellElement = tplEC.getTemplateCellElement(column, row);
|
|
|
|
|
// // alex:不加这一句话会导致跨行跨列的格子被多次update
|
|
|
|
|
// if (editCellElement.getColumn() != column || editCellElement.getRow() != row) {
|
|
|
|
|
// continue;
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
ReportActionUtils.actionIterateWithCellSelection(finalCS, tplEC, new ReportActionUtils.IterAction() { |
|
|
|
|
public void dealWith(CellElement editCellElement) { |
|
|
|
|
((TemplateCellElement)editCellElement).setHighlightGroup(updateHighlightGroup()); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
DesignerContext.getDesignerFrame().getSelectedJTemplate().fireTargetModified(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -64,6 +85,7 @@ public class ConditionAttributesGroupPane extends UIListControlPane {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void populate(ElementCasePane ePane) { |
|
|
|
|
this.ePane = ePane; |
|
|
|
|
CellSelection cs = (CellSelection) ePane.getSelection(); |
|
|
|
|
final TemplateElementCase tplEC = ePane.getEditingElementCase(); |
|
|
|
|
editCellElement = tplEC.getTemplateCellElement(cs.getColumn(), cs.getRow()); |
|
|
|
|