Browse Source

REPORT-3163 合作开发9.0设计器=>聚合报表=》修改逻辑,正确显示tab项

master
plough 7 years ago
parent
commit
13f99988d5
  1. 15
      designer/src/com/fr/design/mainframe/JWorkBook.java
  2. 4
      designer/src/com/fr/design/mainframe/SheetNameTabPane.java
  3. 7
      designer/src/com/fr/poly/PolyDesigner.java
  4. 8
      designer/src/com/fr/poly/creator/ChartBlockEditor.java

15
designer/src/com/fr/design/mainframe/JWorkBook.java

@ -64,6 +64,7 @@ import com.fr.privilege.finegrain.WorkSheetPrivilegeControl;
import com.fr.report.ReportHelper;
import com.fr.report.elementcase.ElementCase;
import com.fr.report.elementcase.TemplateElementCase;
import com.fr.report.poly.PolyWorkSheet;
import com.fr.report.worksheet.WorkSheet;
import com.fr.stable.ArrayUtils;
import com.fr.stable.StableUtils;
@ -109,9 +110,17 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> {
@Override
public void refreshEastPropertiesPane() {
EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.REPORT);
EastRegionContainerPane.getInstance().replaceCellElementPane(getEastUpPane());
EastRegionContainerPane.getInstance().replaceCellAttrPane(getEastDownPane());
if (isEditingPolySheet()) {
EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.POLY);
} else {
EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.REPORT);
EastRegionContainerPane.getInstance().replaceCellElementPane(getEastUpPane());
EastRegionContainerPane.getInstance().replaceCellAttrPane(getEastDownPane());
}
}
private boolean isEditingPolySheet() {
return template.getReport(getEditingReportIndex()) instanceof PolyWorkSheet;
}
@Override

4
designer/src/com/fr/design/mainframe/SheetNameTabPane.java

@ -23,6 +23,7 @@ import com.fr.base.BaseUtils;
import com.fr.base.GraphHelper;
import com.fr.design.actions.UpdateAction;
import com.fr.design.constants.UIConstants;
import com.fr.design.file.HistoryTemplateListPane;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.menu.MenuDef;
import com.fr.design.menu.SeparatorDef;
@ -553,6 +554,9 @@ public class SheetNameTabPane extends JComponent implements MouseListener, Mouse
for (int i = scrollIndex; i <= lastOneIndex; i++) {
int textWidth = widthArray[i];
if (evtX >= textX && evtX < textX + textWidth) {
if (getSelectedIndex() != i) {
HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().refreshEastPropertiesPane();
}
setSelectedIndex(i);
isBlank = false;
reportComposite.setComposite();

7
designer/src/com/fr/poly/PolyDesigner.java

@ -72,8 +72,8 @@ public class PolyDesigner extends ReportComponent<PolyWorkSheet, PolyElementCase
/**
* 选中的类型--1.什么都没选中2.选中一个聚合块内部的内容3.选中聚合块本省
*/
public static enum SelectionType {
NONE, INNER, BLOCK
public enum SelectionType {
NONE, INNER, BLOCK, CHART_INNER
}
public JComponent polyArea;
@ -892,6 +892,9 @@ public class PolyDesigner extends ReportComponent<PolyWorkSheet, PolyElementCase
} else if (isChooseBlock()) {
EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.POLY_CHART);
EastRegionContainerPane.getInstance().replaceWidgetSettingsPane(PolyBlockProperPane.getInstance(PolyDesigner.this));
} else if (type == SelectionType.CHART_INNER) {
EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.POLY_CHART);
EastRegionContainerPane.getInstance().replaceWidgetSettingsPane(getEastUpPane());
} else if (type != SelectionType.NONE) {
EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.POLY_REPORT);
EastRegionContainerPane.getInstance().replaceCellAttrPane(CellElementPropertyPane.getInstance());

8
designer/src/com/fr/poly/creator/ChartBlockEditor.java

@ -122,6 +122,12 @@ public class ChartBlockEditor extends BlockEditor<MiddleChartComponent, PolyChar
protected MiddleChartComponent createEffective() {
if (editComponent == null) {
initEffective(creator.getValue().getChartCollection());
editComponent.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
designer.setChooseType(SelectionType.CHART_INNER);
}
});
}
return editComponent;
}
@ -266,7 +272,7 @@ public class ChartBlockEditor extends BlockEditor<MiddleChartComponent, PolyChar
* 刷新选中状态.日EC
*/
public void resetSelectionAndChooseState() {
designer.setChooseType(SelectionType.BLOCK);
designer.setChooseType(SelectionType.CHART_INNER);
// refreshChartComponent();// 选中之后 刷新下图表编辑层
if (BaseUtils.isAuthorityEditing()) {
JTemplate jTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate();

Loading…
Cancel
Save