Browse Source

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

* commit '00ff1c6014f52220546d11205a4f74a677295167':
  无JIRA任务,代码规范
  REPORT-3163 合作开发9.0设计器=>悬停1s后出现提示文字
  REPORT-3163 合作开发9.0设计器=>右侧tab按钮增加提示文字
  REPORT-3993 - [9.0一轮回归]选中一片单元格设置控件、条件属性,只有第一个单元格有效
  REPORT-3899 [9.0一轮回归]聚合报表聚合块复制粘贴功能不可用
master
superman 7 years ago
parent
commit
a584f66a36
  1. 15
      designer/src/com/fr/design/mainframe/CellWidgetPropertyPane.java
  2. 13
      designer/src/com/fr/design/present/ConditionAttributesGroupPane.java
  3. 13
      designer/src/com/fr/poly/PolyDesigner.java
  4. 2
      designer_base/src/com/fr/design/gui/ibutton/UIButton.java
  5. 1
      designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java

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

@ -1,6 +1,7 @@
package com.fr.design.mainframe; package com.fr.design.mainframe;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.design.actions.utils.ReportActionUtils;
import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.BasicDialog;
import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.BasicPane;
import com.fr.design.dialog.DialogActionAdapter; import com.fr.design.dialog.DialogActionAdapter;
@ -15,6 +16,7 @@ import com.fr.grid.selection.CellSelection;
import com.fr.grid.selection.FloatSelection; import com.fr.grid.selection.FloatSelection;
import com.fr.grid.selection.Selection; import com.fr.grid.selection.Selection;
import com.fr.privilege.finegrain.WidgetPrivilegeControl; import com.fr.privilege.finegrain.WidgetPrivilegeControl;
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;
import com.fr.report.elementcase.TemplateElementCase; import com.fr.report.elementcase.TemplateElementCase;
@ -30,6 +32,7 @@ public class CellWidgetPropertyPane extends BasicPane {
private TemplateCellElement cellElement; private TemplateCellElement cellElement;
private WidgetPane cellEditorDefPane; private WidgetPane cellEditorDefPane;
private ElementCasePane ePane;
public static CellWidgetPropertyPane getInstance(){ public static CellWidgetPropertyPane getInstance(){
if (singleton == null) { if (singleton == null) {
@ -84,6 +87,7 @@ public class CellWidgetPropertyPane extends BasicPane {
public void reInit(ElementCasePane ePane){ public void reInit(ElementCasePane ePane){
this.ePane = ePane;
cellEditorDefPane = new WidgetPane(ePane); cellEditorDefPane = new WidgetPane(ePane);
this.removeAll(); this.removeAll();
this.add(cellEditorDefPane, BorderLayout.CENTER); this.add(cellEditorDefPane, BorderLayout.CENTER);
@ -108,9 +112,13 @@ public class CellWidgetPropertyPane extends BasicPane {
if (cellElement == null) {// 利用默认的CellElement. if (cellElement == null) {// 利用默认的CellElement.
return; return;
} }
final CellSelection finalCS = (CellSelection) ePane.getSelection();
Widget cellWidget = this.cellEditorDefPane.update(); final TemplateElementCase tplEC = ePane.getEditingElementCase();
ReportActionUtils.actionIterateWithCellSelection(finalCS, tplEC, new ReportActionUtils.IterAction() {
public void dealWith(CellElement editCellElement) {
Widget cellWidget = cellEditorDefPane.update();
// p:最后把这个cellEditorDef设置到CellGUIAttr. // p:最后把这个cellEditorDef设置到CellGUIAttr.
TemplateCellElement cellElement = (TemplateCellElement) editCellElement;
if (cellWidget instanceof NoneWidget) { if (cellWidget instanceof NoneWidget) {
cellElement.setWidget(null); cellElement.setWidget(null);
} else { } else {
@ -119,7 +127,8 @@ public class CellWidgetPropertyPane extends BasicPane {
} }
cellElement.setWidget(cellWidget); cellElement.setWidget(cellWidget);
} }
}
});
} }

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

@ -4,6 +4,7 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.design.actions.utils.ReportActionUtils;
import com.fr.design.gui.controlpane.UIListControlPane; import com.fr.design.gui.controlpane.UIListControlPane;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.ElementCasePane; 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.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.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;
import com.fr.report.cell.cellattr.highlight.DefaultHighlight; import com.fr.report.cell.cellattr.highlight.DefaultHighlight;
@ -27,6 +29,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 ElementCasePane ePane;
private ConditionAttributesGroupPane() { private ConditionAttributesGroupPane() {
super(); super();
@ -49,7 +52,14 @@ public class ConditionAttributesGroupPane extends UIListControlPane {
if (isPopulating) { if (isPopulating) {
return; return;
} }
editCellElement.setHighlightGroup(updateHighlightGroup()); final CellSelection finalCS = (CellSelection) ePane.getSelection();
final TemplateElementCase tplEC = ePane.getEditingElementCase();
ReportActionUtils.actionIterateWithCellSelection(finalCS, tplEC, new ReportActionUtils.IterAction() {
public void dealWith(CellElement editCellElement) {
((TemplateCellElement)editCellElement).setHighlightGroup(updateHighlightGroup());
}
});
DesignerContext.getDesignerFrame().getSelectedJTemplate().fireTargetModified(); DesignerContext.getDesignerFrame().getSelectedJTemplate().fireTargetModified();
} }
@ -64,6 +74,7 @@ public class ConditionAttributesGroupPane extends UIListControlPane {
} }
public void populate(ElementCasePane ePane) { public void populate(ElementCasePane ePane) {
this.ePane = ePane;
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());

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

@ -738,7 +738,7 @@ public class PolyDesigner extends ReportComponent<PolyWorkSheet, PolyElementCase
* @return 工具 * @return 工具
*/ */
public ToolBarDef[] toolbars4Target() { public ToolBarDef[] toolbars4Target() {
return selection == null || isChooseBlock() ? null : this.selection.toolbars4Target(); return selection == null || isChooseBlock() || isChooseChartInner() ? null : this.selection.toolbars4Target();
} }
/** /**
@ -753,7 +753,7 @@ public class PolyDesigner extends ReportComponent<PolyWorkSheet, PolyElementCase
} }
if (selection == null || isChooseBlock()) { if (selection == null || isChooseBlock() || isChooseChartInner()) {
setToolBarElemEnabled(selection != null); setToolBarElemEnabled(selection != null);
return toolBarComponent; return toolBarComponent;
} else { } else {
@ -909,6 +909,15 @@ public class PolyDesigner extends ReportComponent<PolyWorkSheet, PolyElementCase
return selectedtype == SelectionType.BLOCK; return selectedtype == SelectionType.BLOCK;
} }
/**
* 是否选中图表聚合块内部
*
* @return 是则返回true
*/
public boolean isChooseChartInner() {
return selectedtype == SelectionType.CHART_INNER;
}
/** /**
* Fire gridSelection Changed * Fire gridSelection Changed
*/ */

2
designer_base/src/com/fr/design/gui/ibutton/UIButton.java

@ -36,6 +36,7 @@ public class UIButton extends JButton implements UIObserver {
private CellBorderStyle border = null; private CellBorderStyle border = null;
protected UIObserverListener uiObserverListener; protected UIObserverListener uiObserverListener;
private static final int TOOLTIP_INIT_DELAY = 1000; // 延迟 1s 显示提示文字
public UIButton() { public UIButton() {
this(StringUtils.EMPTY); this(StringUtils.EMPTY);
@ -139,6 +140,7 @@ public class UIButton extends JButton implements UIObserver {
setBackground(null); setBackground(null);
setRolloverEnabled(true); setRolloverEnabled(true);
initListener(); initListener();
ToolTipManager.sharedInstance().setInitialDelay(TOOLTIP_INIT_DELAY);
} }
@Override @Override

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

@ -643,6 +643,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
setTabButtonSelected(); setTabButtonSelected();
} }
}); });
button.setToolTipText(title);
} }
public UIButton getButton() { public UIButton getButton() {

Loading…
Cancel
Save