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