Browse Source

v7的构造函数不能走v6的,会一直创建v6的Chromium进程,先搞个构造函数这样处理下..

new-design
WeiYanglu 3 years ago
parent
commit
4a8fd982c5
  1. 4
      designer-base/src/main/java/com/fr/design/ui/ModernUIPane.java
  2. 4
      designer-base/src/main/java/com/fr/design/ui/compatible/NewModernUIPane.java

4
designer-base/src/main/java/com/fr/design/ui/ModernUIPane.java

@ -203,6 +203,10 @@ public class ModernUIPane<T> extends BasicPane {
this.pane = new ModernUIPane<>(browserType); this.pane = new ModernUIPane<>(browserType);
} }
public Builder(ModernUIPane<T> pane) {
this.pane = pane;
}
public Builder<T> prepare(ScriptContextListener contextListener) { public Builder<T> prepare(ScriptContextListener contextListener) {
pane.browser.addScriptContextListener(contextListener); pane.browser.addScriptContextListener(contextListener);
return this; return this;

4
designer-base/src/main/java/com/fr/design/ui/compatible/NewModernUIPane.java

@ -206,6 +206,10 @@ public class NewModernUIPane<T> extends ModernUIPane<T> {
private NewModernUIPane<T> pane = new NewModernUIPane<>(); private NewModernUIPane<T> pane = new NewModernUIPane<>();
public Builder() {
super((ModernUIPane<T>)null);
}
public NewModernUIPane.Builder<T> prepare(InjectJsCallback callback) { public NewModernUIPane.Builder<T> prepare(InjectJsCallback callback) {
pane.browser.set(InjectJsCallback.class, callback); pane.browser.set(InjectJsCallback.class, callback);
return this; return this;

Loading…
Cancel
Save