hades
4 years ago
4 changed files with 52 additions and 2 deletions
@ -0,0 +1,39 @@
|
||||
package com.fr.design.os.impl; |
||||
|
||||
import com.fr.design.gui.controlpane.UIListControlPane; |
||||
import com.fr.stable.os.OperatingSystem; |
||||
import com.fr.stable.os.support.OSBasedAction; |
||||
|
||||
import java.awt.*; |
||||
|
||||
/** |
||||
* linux下超链弹窗等保存问题 |
||||
* |
||||
* @author hades |
||||
* @version 10.0 |
||||
* Created by hades on 2020/7/21 |
||||
*/ |
||||
public class PopupDialogSaveAction implements OSBasedAction { |
||||
|
||||
private UIListControlPane currentControlPane; |
||||
private Window popupDialog; |
||||
|
||||
@Override |
||||
public void execute(Object... objects) { |
||||
boolean canSave = OperatingSystem.isLinux() && popupDialog != null && popupDialog.isVisible() && currentControlPane != null; |
||||
if (canSave) { |
||||
currentControlPane.saveSettings(); |
||||
} |
||||
} |
||||
|
||||
public void register(UIListControlPane currentControlPane, Window popupDialog) { |
||||
this.currentControlPane = currentControlPane; |
||||
this.popupDialog = popupDialog; |
||||
} |
||||
|
||||
public void unregister() { |
||||
this.currentControlPane = null; |
||||
this.popupDialog = null; |
||||
} |
||||
|
||||
} |
Loading…
Reference in new issue