|
|
|
@ -100,7 +100,7 @@ public abstract class UIControlPane extends JControlPane {
|
|
|
|
|
this.checkButtonEnabled(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
protected Window getPopupEditDialog(){ |
|
|
|
|
protected Window getPopupEditDialog() { |
|
|
|
|
return this.popupEditDialog; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -241,6 +241,11 @@ public abstract class UIControlPane extends JControlPane {
|
|
|
|
|
|
|
|
|
|
private void hideDialog() { |
|
|
|
|
if (needToHidePopupEditDialog()) { |
|
|
|
|
//在Linux上拉回焦点,不然导致一些面板关不掉
|
|
|
|
|
if (OperatingSystem.isLinux()) { |
|
|
|
|
requestFocus(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
saveSettings(); |
|
|
|
|
setVisible(false); |
|
|
|
|
PopupDialogSaveAction saveAction = OSSupportCenter.getAction(PopupDialogSaveAction.class); |
|
|
|
@ -252,10 +257,6 @@ public abstract class UIControlPane extends JControlPane {
|
|
|
|
|
addWindowFocusListener(new WindowAdapter() { |
|
|
|
|
@Override |
|
|
|
|
public void windowLostFocus(WindowEvent e) { |
|
|
|
|
//在Linux上拉回焦点,不然导致一些面板关不掉
|
|
|
|
|
if(OperatingSystem.isLinux()) { |
|
|
|
|
requestFocus(); |
|
|
|
|
} |
|
|
|
|
hideDialog(); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
@ -263,8 +264,8 @@ public abstract class UIControlPane extends JControlPane {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 是否需要隐藏popupEditDialog |
|
|
|
|
*/ |
|
|
|
|
* 是否需要隐藏popupEditDialog |
|
|
|
|
*/ |
|
|
|
|
protected boolean needToHidePopupEditDialog() { |
|
|
|
|
// 检查是否有子弹窗,如果有,则不隐藏
|
|
|
|
|
for (Window window : popupEditDialog.getOwnedWindows()) { |
|
|
|
|