Browse Source

无jira任务 代码规范

release/11.0
vito 1 year ago
parent
commit
08cf5012c6
  1. 31
      designer-base/src/main/java/com/fr/design/ui/compatible/BuilderDiff.java
  2. 10
      designer-base/src/main/java/com/fr/design/ui/compatible/ModernUIPaneFactory.java

31
designer-base/src/main/java/com/fr/design/ui/compatible/BuilderDiff.java

@ -11,20 +11,45 @@ import com.teamdev.jxbrowser.event.Observer;
* 封装jxbrwoser v6/v7的构建方式的差异
*
* @author hades
* @version 10.0
* Created by hades on 2021/6/13
* @see {@link JxUIPane}
* @since 10.0
* Created on 2021/6/13
* @deprecated 6在下个版本弃用
*/
@Deprecated
public interface BuilderDiff<T> {
/**
* v6准备工作
*
* @param contextListener 上下文监听器
* @return 构造器
*/
ModernUIPane.Builder<T> prepareForV6(ScriptContextListener contextListener);
/**
* v6准备工作
*
* @param loadListener 加载监听器
* @return 构造器
*/
ModernUIPane.Builder<T> prepareForV6(LoadListener loadListener);
/**
* v7准备工作
*
* @param callback 注入js回调器
* @return 构造器
*/
ModernUIPane.Builder<T> prepareForV7(InjectJsCallback callback);
/**
* v7准备工作
*
* @param event 事件
* @param listener 监听器
* @return 构造器
*/
ModernUIPane.Builder<T> prepareForV7(Class event, Observer listener);
}
}

10
designer-base/src/main/java/com/fr/design/ui/compatible/ModernUIPaneFactory.java

@ -7,9 +7,9 @@ import com.fr.design.ui.ModernUIPane;
* 根据版本选择构造器
*
* @author hades
* @version 10.0
* Created by hades on 2021/6/13
* @see {@link JxUIPane}
* @since 10.0
* Created on 2021/6/13
* @deprecated 6在下个版本弃用
*/
public class ModernUIPaneFactory {
@ -34,12 +34,12 @@ public class ModernUIPaneFactory {
* @return 是否7或之上
*/
public static boolean isV7() {
boolean hasJxBrowserV7 = true;
boolean jxBrowserV7 = true;
try {
Class.forName("com.teamdev.jxbrowser.net.Scheme");
} catch (ClassNotFoundException e) {
hasJxBrowserV7 = false;
jxBrowserV7 = false;
}
return hasJxBrowserV7;
return jxBrowserV7;
}
}

Loading…
Cancel
Save