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