Browse Source

无jira任务 代码规范

newui
vito 2 years ago
parent
commit
08cf5012c6
  1. 29
      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

29
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的构建方式的差异 * 封装jxbrwoser v6/v7的构建方式的差异
* *
* @author hades * @author hades
* @version 10.0
* Created by hades on 2021/6/13
* @see {@link JxUIPane} * @see {@link JxUIPane}
* @since 10.0
* Created on 2021/6/13
* @deprecated 6在下个版本弃用 * @deprecated 6在下个版本弃用
*/ */
@Deprecated @Deprecated
public interface BuilderDiff<T> { public interface BuilderDiff<T> {
/**
* v6准备工作
*
* @param contextListener 上下文监听器
* @return 构造器
*/
ModernUIPane.Builder<T> prepareForV6(ScriptContextListener contextListener); ModernUIPane.Builder<T> prepareForV6(ScriptContextListener contextListener);
/**
* v6准备工作
*
* @param loadListener 加载监听器
* @return 构造器
*/
ModernUIPane.Builder<T> prepareForV6(LoadListener loadListener); ModernUIPane.Builder<T> prepareForV6(LoadListener loadListener);
/**
* v7准备工作
*
* @param callback 注入js回调器
* @return 构造器
*/
ModernUIPane.Builder<T> prepareForV7(InjectJsCallback callback); ModernUIPane.Builder<T> prepareForV7(InjectJsCallback callback);
/**
* v7准备工作
*
* @param event 事件
* @param listener 监听器
* @return 构造器
*/
ModernUIPane.Builder<T> prepareForV7(Class event, Observer listener); 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 * @author hades
* @version 10.0
* Created by hades on 2021/6/13
* @see {@link JxUIPane} * @see {@link JxUIPane}
* @since 10.0
* Created on 2021/6/13
* @deprecated 6在下个版本弃用 * @deprecated 6在下个版本弃用
*/ */
public class ModernUIPaneFactory { public class ModernUIPaneFactory {
@ -34,12 +34,12 @@ public class ModernUIPaneFactory {
* @return 是否7或之上 * @return 是否7或之上
*/ */
public static boolean isV7() { public static boolean isV7() {
boolean hasJxBrowserV7 = true; boolean jxBrowserV7 = true;
try { try {
Class.forName("com.teamdev.jxbrowser.net.Scheme"); Class.forName("com.teamdev.jxbrowser.net.Scheme");
} catch (ClassNotFoundException e) { } catch (ClassNotFoundException e) {
hasJxBrowserV7 = false; jxBrowserV7 = false;
} }
return hasJxBrowserV7; return jxBrowserV7;
} }
} }

Loading…
Cancel
Save