Browse Source

REPORT-80695 模板全局级别查找替换二期 增加关闭面板后的清除数据动作

feature/x
Destiny.Lin 2 years ago
parent
commit
a9314ea89a
  1. 19
      designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITReplaceMainDialog.java
  2. 8
      designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITReplaceNorthPanel.java

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

@ -25,11 +25,15 @@ import com.fr.stable.StringUtils;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.WindowConstants;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.Point;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.awt.event.WindowListener;
import java.util.ArrayList;
import java.util.List;
@ -132,6 +136,7 @@ public class ITReplaceMainDialog extends UIDialog {
southPanel = new ITReplaceSouthPanel();
westPanel = new ITReplaceWestPanel();
initCloseListener();
northPane.fitScreen(0, 0, jTemplate.getWidth());
JPanel center = new JPanel(new BorderLayout());
@ -187,6 +192,20 @@ public class ITReplaceMainDialog extends UIDialog {
center.setVisible(true);
}
private void initCloseListener() {
this.addWindowListener(new WindowAdapter() {
@Override
public void windowClosing(WindowEvent e) {
searchContentResultList.clear();
searchSettingResultList.clear();
ITReplaceSouthPanel.getItTableEditor().clear();
northPane.clear();
dialogExit();
}
});
}
/**
* 模板内容替换相关
*/

8
designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITReplaceNorthPanel.java

@ -791,4 +791,12 @@ public class ITReplaceNorthPanel {
((UITextField) (findSettingInputComboBox.getEditor().getEditorComponent())).setPlaceholder(Toolkit.i18nText("Fine-Design_Replace_Choose_Search") + str);
((UITextField) (replaceSettingInputComboBox.getEditor().getEditorComponent())).setPlaceholder(Toolkit.i18nText("Fine-Design_Replace_Choose_Replace") + str);
}
/**
* 清除搜索结果
*/
public void clear() {
settingResultLabel.setText(StringUtils.EMPTY);
resultLabel.setText(StringUtils.EMPTY);
}
}

Loading…
Cancel
Save