Browse Source

REPORT-138249 cpt支持数据集替换 优化按钮禁用逻辑,去除多余提交

release/11.0
Destiny.Lin 2 weeks ago
parent
commit
6f29a0c33f
  1. 8
      designer-base/src/main/java/com/fr/design/data/datapane/TableDataTreePane.java
  2. 15
      designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITReplaceMainDialog.java

8
designer-base/src/main/java/com/fr/design/data/datapane/TableDataTreePane.java

@ -729,10 +729,16 @@ public class TableDataTreePane extends BasicTableDataTreePane {
pasteAction.setEnabled(false); pasteAction.setEnabled(false);
removeAction.setEnabled(false); removeAction.setEnabled(false);
previewTableDataAction.setEnabled(false); previewTableDataAction.setEnabled(false);
for (AbstractExtraAction action : extraActions) {
action.setEnabled(false);
}
if (op == null || op.interceptButtonEnabled()) { if (op == null || op.interceptButtonEnabled()) {
// 保持false状态 // 保持false状态
return; return;
} }
if(getDataTree() != null) {
checkExtraActionEnable(op.getDataMode(), getDataTree().getSelectedTableDataCounts(), getDataTree().hasSelectedIndependentColumns());
}
// 获取选中的数据集数量 // 获取选中的数据集数量
int selectioncount = getDataTree().getSelectedTableDataCounts(); int selectioncount = getDataTree().getSelectedTableDataCounts();
if (op.getDataMode() == SERVER_TABLE_DATA) { if (op.getDataMode() == SERVER_TABLE_DATA) {
@ -756,7 +762,7 @@ public class TableDataTreePane extends BasicTableDataTreePane {
} }
removeAction.setEnabled(true); removeAction.setEnabled(true);
copyAction.setEnabled(true); copyAction.setEnabled(true);
checkExtraActionEnable(op.getDataMode(), selectioncount, getDataTree().hasSelectedIndependentColumns());
} }
private void checkExtraActionEnable(int dataMode, int selectioncount, boolean hasSelectedIndependentColumns) { private void checkExtraActionEnable(int dataMode, int selectioncount, boolean hasSelectedIndependentColumns) {

15
designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITReplaceMainDialog.java

@ -3,8 +3,10 @@ package com.fr.design.actions.replace.ui;
import com.fr.design.actions.replace.action.ITChecker; import com.fr.design.actions.replace.action.ITChecker;
import com.fr.design.actions.replace.action.ShowSearchResultAction; import com.fr.design.actions.replace.action.ShowSearchResultAction;
import com.fr.design.actions.replace.action.setting.SettingController; import com.fr.design.actions.replace.action.setting.SettingController;
import com.fr.design.actions.replace.info.Info; import com.fr.design.actions.replace.info.Info;
import com.fr.design.actions.replace.utils.ShowValueUtils; import com.fr.design.actions.replace.utils.ShowValueUtils;
import com.fr.design.dialog.FineJOptionPane; import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.dialog.UIDialog; import com.fr.design.dialog.UIDialog;
@ -14,18 +16,25 @@ import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.JTemplate; import com.fr.design.mainframe.JTemplate;
import com.fr.design.mainframe.toast.DesignerToastMsgUtil; import com.fr.design.mainframe.toast.DesignerToastMsgUtil;
import com.fr.design.mainframe.toast.ToastMsgDialog; import com.fr.design.mainframe.toast.ToastMsgDialog;
import com.fr.general.GeneralUtils; import com.fr.general.GeneralUtils;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import javax.swing.*;
import java.awt.*; import javax.swing.JOptionPane;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.Point;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
import java.awt.event.WindowAdapter; import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent; import java.awt.event.WindowEvent;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.regex.Pattern; import java.util.regex.Pattern;
@ -117,7 +126,7 @@ public class ITReplaceMainDialog extends UIDialog {
northPane.fitScreen(0, 0, width); northPane.fitScreen(0, 0, width);
} }
/** /**

Loading…
Cancel
Save