Browse Source

Pull request #14563: REPORT-119475 - 【设计器】参数面板的控件选中后,无法使用工具栏的剪切、复制功能

Merge in DESIGN/design from ~RENEKTON/design:release/11.0 to release/11.0

* commit '3ffa64c109b943ca34da13d4aae2f6d4522ee44b':
  控件剪切、复制按钮fix
  控件剪切、复制按钮fix
  控件剪切、复制按钮fix
  报表引擎属性弹窗翻新
  报表引擎属性弹窗翻新
release/11.0
Renekton-张世豪 4 months ago
parent
commit
b056d1564d
  1. 22
      designer-form/src/main/java/com/fr/design/form/parameter/FormParaDesigner.java
  2. 12
      designer-form/src/main/java/com/fr/design/mainframe/FormDesigner.java

22
designer-form/src/main/java/com/fr/design/form/parameter/FormParaDesigner.java

@ -88,6 +88,8 @@ public class FormParaDesigner extends FormDesigner implements ParameterDesignerP
private static Image paraImage = BaseUtils.readImage("/com/fr/design/images/form/parameter.png"); private static Image paraImage = BaseUtils.readImage("/com/fr/design/images/form/parameter.png");
private UpdateAction[] basicMainPaneActions;
public FormParaDesigner() { public FormParaDesigner() {
this(new FormParameterUI()); this(new FormParameterUI());
} }
@ -342,6 +344,18 @@ public class FormParaDesigner extends FormDesigner implements ParameterDesignerP
return designerActions.toArray(new UpdateAction[designerActions.size()]); return designerActions.toArray(new UpdateAction[designerActions.size()]);
} }
/**
* 主面板区域控件按钮action组
* @return
*/
public UpdateAction[] getBasicMainActions() {
if (basicMainPaneActions == null) {
basicMainPaneActions = new UpdateAction[]{new CutAction(this), new CopyAction(this), new PasteAction(this),
new FormDeleteAction(this)};
}
return basicMainPaneActions;
}
private boolean searchQueryCreators(XLayoutContainer rootContainer) { private boolean searchQueryCreators(XLayoutContainer rootContainer) {
boolean b = false; boolean b = false;
for (int i = 0; i < rootContainer.getXCreatorCount(); i++) { for (int i = 0; i < rootContainer.getXCreatorCount(); i++) {
@ -736,8 +750,12 @@ public class FormParaDesigner extends FormDesigner implements ParameterDesignerP
* @return 按钮组 a * @return 按钮组 a
*/ */
public JComponent[] toolBarButton4Form() { public JComponent[] toolBarButton4Form() {
return new JComponent[]{new CutAction(this).createToolBarComponent(), new CopyAction(this).createToolBarComponent(), new PasteAction(this).createToolBarComponent(), UpdateAction[] actions = getBasicMainActions();
new FormDeleteAction(this).createToolBarComponent()}; JComponent[] components = new JComponent[actions.length];
for (int i = 0; i < actions.length; i++) {
components[i] = actions[i].createToolBarComponent();
}
return components;
} }
@Override @Override

12
designer-form/src/main/java/com/fr/design/mainframe/FormDesigner.java

@ -777,6 +777,14 @@ public class FormDesigner extends TargetComponent<Form> implements TreeSelection
for (UpdateAction action : getActions()) { for (UpdateAction action : getActions()) {
action.update(); action.update();
} }
UpdateAction[] actions = getBasicMainActions();
if (actions != null) {
for (UpdateAction action : actions) {
action.update();
}
}
} }
} }
@ -1485,6 +1493,10 @@ public class FormDesigner extends TargetComponent<Form> implements TreeSelection
return designerActions.toArray(new UpdateAction[designerActions.size()]); return designerActions.toArray(new UpdateAction[designerActions.size()]);
} }
public UpdateAction[] getBasicMainActions() {
return null;
}
private List<UpdateAction> getBasicActions(){ private List<UpdateAction> getBasicActions(){
if (basicActions == null) { if (basicActions == null) {
basicActions = new ArrayList<UpdateAction>(); basicActions = new ArrayList<UpdateAction>();

Loading…
Cancel
Save