Browse Source

REPORT-76040

【迭代】【起始页】打开起始页再关闭,上次的进程应该杀掉
feature/x
Harrison 2 years ago
parent
commit
ec842468f8
  1. 14
      designer-base/src/main/java/com/fr/startup/ui/StartupPageWindow.java

14
designer-base/src/main/java/com/fr/startup/ui/StartupPageWindow.java

@ -12,6 +12,7 @@ import com.fr.design.layout.VerticalFlowLayout;
import com.fr.design.ui.util.UIUtil;
import com.fr.design.utils.ColorUtils;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.exit.DesignerExiter;
import com.fr.general.GeneralUtils;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.ProductConstants;
@ -41,6 +42,8 @@ import java.awt.LayoutManager;
import java.awt.RenderingHints;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.util.List;
import java.util.Map;
@ -138,6 +141,7 @@ public class StartupPageWindow extends JFrame {
// Workspace-detail
setSize(SCREEN_SIZE);
setDefaultTitle();
addDefaultListeners();
repaint();
validate();
@ -146,6 +150,16 @@ public class StartupPageWindow extends JFrame {
GUICoreUtils.centerWindow(this);
}
private void addDefaultListeners() {
addWindowListener(new WindowAdapter() {
@Override
public void windowClosing(WindowEvent e) {
DesignerExiter.getInstance().execute();
}
});
}
private void setDefaultTitle() {
StringBuilder sb = new StringBuilder();

Loading…
Cancel
Save