|
|
|
@ -8,18 +8,18 @@ import com.fr.design.i18n.Toolkit;
|
|
|
|
|
import com.fr.design.utils.gui.GUICoreUtils; |
|
|
|
|
import com.fr.web.struct.AssembleComponent; |
|
|
|
|
import com.teamdev.jxbrowser.chromium.Browser; |
|
|
|
|
import com.teamdev.jxbrowser.chromium.BrowserPreferences; |
|
|
|
|
import com.teamdev.jxbrowser.chromium.JSValue; |
|
|
|
|
import com.teamdev.jxbrowser.chromium.events.FinishLoadingEvent; |
|
|
|
|
import com.teamdev.jxbrowser.chromium.events.LoadAdapter; |
|
|
|
|
import com.teamdev.jxbrowser.chromium.events.LoadListener; |
|
|
|
|
import com.teamdev.jxbrowser.chromium.events.ScriptContextAdapter; |
|
|
|
|
import com.teamdev.jxbrowser.chromium.events.ScriptContextEvent; |
|
|
|
|
import com.teamdev.jxbrowser.chromium.events.ScriptContextListener; |
|
|
|
|
import com.teamdev.jxbrowser.chromium.swing.BrowserView; |
|
|
|
|
|
|
|
|
|
import javax.swing.*; |
|
|
|
|
import java.awt.*; |
|
|
|
|
import javax.swing.JDialog; |
|
|
|
|
import javax.swing.SwingUtilities; |
|
|
|
|
import javax.swing.WindowConstants; |
|
|
|
|
import java.awt.BorderLayout; |
|
|
|
|
import java.awt.Dimension; |
|
|
|
|
import java.awt.event.ActionEvent; |
|
|
|
|
import java.awt.event.ActionListener; |
|
|
|
|
import java.util.Map; |
|
|
|
@ -44,7 +44,7 @@ public class ModernUIPane<T> extends BasicPane {
|
|
|
|
|
private void initialize() { |
|
|
|
|
if (browser == null) { |
|
|
|
|
setLayout(new BorderLayout()); |
|
|
|
|
BrowserPreferences.setChromiumSwitches("--disable-google-traffic"); |
|
|
|
|
Assistant.addChromiumSwitches("--disable-google-traffic"); |
|
|
|
|
if (DesignerEnvManager.getEnvManager().isOpenDebug()) { |
|
|
|
|
UIToolbar toolbar = new UIToolbar(); |
|
|
|
|
add(toolbar, BorderLayout.NORTH); |
|
|
|
@ -75,7 +75,7 @@ public class ModernUIPane<T> extends BasicPane {
|
|
|
|
|
SwingUtilities.getWindowAncestor(ModernUIPane.this).setVisible(false); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
BrowserPreferences.setChromiumSwitches("--remote-debugging-port=9222"); |
|
|
|
|
Assistant.addChromiumSwitches("--remote-debugging-port=9222"); |
|
|
|
|
initializeBrowser(); |
|
|
|
|
add(new BrowserView(browser), BorderLayout.CENTER); |
|
|
|
|
} else { |
|
|
|
|