|
|
|
@ -10,6 +10,7 @@ import com.fr.design.dialog.UIDialog;
|
|
|
|
|
import com.fr.design.formula.FormulaFactory; |
|
|
|
|
import com.fr.design.formula.UIFormula; |
|
|
|
|
import com.fr.design.jxbrowser.JxUIPane; |
|
|
|
|
import com.fr.design.ui.util.UIUtil; |
|
|
|
|
import com.fr.json.revise.EmbedJson; |
|
|
|
|
import com.fr.locale.InterProviderFactory; |
|
|
|
|
import com.fr.log.FineLoggerFactory; |
|
|
|
@ -178,11 +179,11 @@ public class DatacentersJSBridge {
|
|
|
|
|
public void okAction() { |
|
|
|
|
CompletableFuture |
|
|
|
|
.runAsync(() -> relationPanel.updateNamePane()) |
|
|
|
|
.thenRunAsync(() -> { |
|
|
|
|
.thenRun(() -> { |
|
|
|
|
Window ancestor = SwingUtilities.getWindowAncestor(relationPanel); |
|
|
|
|
if (ancestor instanceof UIDialog) { |
|
|
|
|
try { |
|
|
|
|
((UIDialog) ancestor).doOK(); |
|
|
|
|
SwingUtilities.invokeLater(() -> ((UIDialog) ancestor).doOK()); |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
FineLoggerFactory.getLogger().error(e.getMessage(), e); |
|
|
|
|
} |
|
|
|
@ -195,9 +196,11 @@ public class DatacentersJSBridge {
|
|
|
|
|
*/ |
|
|
|
|
@JSBridge |
|
|
|
|
public void cancelAction() { |
|
|
|
|
Window ancestor = SwingUtilities.getWindowAncestor(relationPanel); |
|
|
|
|
if (ancestor instanceof UIDialog) { |
|
|
|
|
((UIDialog) ancestor).doCancel(); |
|
|
|
|
} |
|
|
|
|
UIUtil.invokeLaterIfNeeded(() -> { |
|
|
|
|
Window ancestor = SwingUtilities.getWindowAncestor(relationPanel); |
|
|
|
|
if (ancestor instanceof UIDialog) { |
|
|
|
|
((UIDialog) ancestor).doCancel(); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|