From ccb9f387ea02be42c6d25cf8f8ae9c55200ad801 Mon Sep 17 00:00:00 2001 From: Kalven Date: Mon, 2 Sep 2019 11:09:52 +0800 Subject: [PATCH] =?UTF-8?q?KERNEL-1117=20=E6=A0=B9=E6=8D=AE=E8=A6=81?= =?UTF-8?q?=E6=B1=82=E8=BF=9B=E8=A1=8C=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../{QuickList.java => UIQuickList.java} | 4 +-- .../ui/container/DialogActionAdapter.java | 11 ------- .../ui/container/FurtherBasicBeanPane.java | 8 ----- .../api/design/util/NameAndFunctionList.java | 17 ----------- .../util/NameAndTypeAndFunctionList.java | 15 ---------- .../ParameterInputPane.java | 2 +- src/main/java/com/fanruan/api/io/IOFile.java | 7 ----- .../fanruan/api/macro/OperatingSystem.java | 30 +++++++++++++++++++ .../fanruan/api/macro/OperatingSystemKit.java | 18 ----------- .../com/fanruan/api/structure/Expression.java | 7 ----- .../com/fanruan/api/structure/Parameter.java | 18 ----------- 11 files changed, 33 insertions(+), 104 deletions(-) rename src/main/java/com/fanruan/api/design/ui/component/{QuickList.java => UIQuickList.java} (57%) delete mode 100644 src/main/java/com/fanruan/api/design/ui/container/DialogActionAdapter.java delete mode 100644 src/main/java/com/fanruan/api/design/ui/container/FurtherBasicBeanPane.java delete mode 100644 src/main/java/com/fanruan/api/design/util/NameAndFunctionList.java delete mode 100644 src/main/java/com/fanruan/api/design/util/NameAndTypeAndFunctionList.java rename src/main/java/com/fanruan/api/design/{ui/container => work}/ParameterInputPane.java (89%) delete mode 100644 src/main/java/com/fanruan/api/io/IOFile.java create mode 100644 src/main/java/com/fanruan/api/macro/OperatingSystem.java delete mode 100644 src/main/java/com/fanruan/api/macro/OperatingSystemKit.java delete mode 100644 src/main/java/com/fanruan/api/structure/Expression.java delete mode 100644 src/main/java/com/fanruan/api/structure/Parameter.java diff --git a/src/main/java/com/fanruan/api/design/ui/component/QuickList.java b/src/main/java/com/fanruan/api/design/ui/component/UIQuickList.java similarity index 57% rename from src/main/java/com/fanruan/api/design/ui/component/QuickList.java rename to src/main/java/com/fanruan/api/design/ui/component/UIQuickList.java index 9269a1c..b60283b 100644 --- a/src/main/java/com/fanruan/api/design/ui/component/QuickList.java +++ b/src/main/java/com/fanruan/api/design/ui/component/UIQuickList.java @@ -5,8 +5,8 @@ import javax.swing.*; /** * 支持键盘输入快速查找项的JList */ -public class QuickList extends com.fr.design.gui.ilist.QuickList { - public QuickList(ListModel listModel) { +public class UIQuickList extends com.fr.design.gui.ilist.QuickList { + public UIQuickList(ListModel listModel) { super(listModel); } } diff --git a/src/main/java/com/fanruan/api/design/ui/container/DialogActionAdapter.java b/src/main/java/com/fanruan/api/design/ui/container/DialogActionAdapter.java deleted file mode 100644 index a6ef245..0000000 --- a/src/main/java/com/fanruan/api/design/ui/container/DialogActionAdapter.java +++ /dev/null @@ -1,11 +0,0 @@ -package com.fanruan.api.design.ui.container; - -/** - * 定义弹窗适配器,可以监听事件实现弹框功能 - */ -public class DialogActionAdapter extends com.fr.design.dialog.DialogActionAdapter { - - public DialogActionAdapter() { - - } -} diff --git a/src/main/java/com/fanruan/api/design/ui/container/FurtherBasicBeanPane.java b/src/main/java/com/fanruan/api/design/ui/container/FurtherBasicBeanPane.java deleted file mode 100644 index 34df3cb..0000000 --- a/src/main/java/com/fanruan/api/design/ui/container/FurtherBasicBeanPane.java +++ /dev/null @@ -1,8 +0,0 @@ -package com.fanruan.api.design.ui.container; - -/** - * 对基本的容器做了进一步封装,提供了通用的方法 - * @param - */ -public abstract class FurtherBasicBeanPane extends com.fr.design.beans.FurtherBasicBeanPane { -} diff --git a/src/main/java/com/fanruan/api/design/util/NameAndFunctionList.java b/src/main/java/com/fanruan/api/design/util/NameAndFunctionList.java deleted file mode 100644 index 99d9089..0000000 --- a/src/main/java/com/fanruan/api/design/util/NameAndFunctionList.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.fanruan.api.design.util; - -import com.fr.stable.script.Function; - -import java.util.Arrays; - -/** - * 名称对应的函数列表 - * @author Kalven - * @version 10.0 - * Created by Kalven on 2019/8/31 - */ -public class NameAndFunctionList extends com.fr.design.formula.NameAndFunctionList { - public NameAndFunctionList(String name, Function[] fns) { - super(name, fns); - } -} diff --git a/src/main/java/com/fanruan/api/design/util/NameAndTypeAndFunctionList.java b/src/main/java/com/fanruan/api/design/util/NameAndTypeAndFunctionList.java deleted file mode 100644 index 300d800..0000000 --- a/src/main/java/com/fanruan/api/design/util/NameAndTypeAndFunctionList.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.fanruan.api.design.util; - -import com.fr.stable.script.Function; - -/** - * 名字和类型对应的函数列表 - * @author Kalven - * @version 10.0 - * Created by Kalven on 2019/8/31 - */ -public class NameAndTypeAndFunctionList extends com.fr.design.formula.NameAndTypeAndFunctionList { - public NameAndTypeAndFunctionList(String name, Function.Type type) { - super(name, type); - } -} diff --git a/src/main/java/com/fanruan/api/design/ui/container/ParameterInputPane.java b/src/main/java/com/fanruan/api/design/work/ParameterInputPane.java similarity index 89% rename from src/main/java/com/fanruan/api/design/ui/container/ParameterInputPane.java rename to src/main/java/com/fanruan/api/design/work/ParameterInputPane.java index 6b505ad..c96b72b 100644 --- a/src/main/java/com/fanruan/api/design/ui/container/ParameterInputPane.java +++ b/src/main/java/com/fanruan/api/design/work/ParameterInputPane.java @@ -1,4 +1,4 @@ -package com.fanruan.api.design.ui.container; +package com.fanruan.api.design.work; import com.fr.stable.ParameterProvider; diff --git a/src/main/java/com/fanruan/api/io/IOFile.java b/src/main/java/com/fanruan/api/io/IOFile.java deleted file mode 100644 index b7e15b4..0000000 --- a/src/main/java/com/fanruan/api/io/IOFile.java +++ /dev/null @@ -1,7 +0,0 @@ -package com.fanruan.api.io; - -/** - * 需要进行XML读写的类,该类是数据源类的一个子类 - */ -public abstract class IOFile extends com.fr.base.io.IOFile { -} diff --git a/src/main/java/com/fanruan/api/macro/OperatingSystem.java b/src/main/java/com/fanruan/api/macro/OperatingSystem.java new file mode 100644 index 0000000..da783a3 --- /dev/null +++ b/src/main/java/com/fanruan/api/macro/OperatingSystem.java @@ -0,0 +1,30 @@ +package com.fanruan.api.macro; + +import com.fr.stable.os.AbstractOperatingSystem; + +/** + * @author Kalven + * @version 10.0 + * Created by Kalven on 2019/8/31 + */ +public class OperatingSystem { + + private static final AbstractOperatingSystem myOS = com.fr.stable.os.OperatingSystem.getOperatingSystem(); + + private OperatingSystem() { + } + + + public static boolean isWindows() { + return myOS.getType() == com.fr.stable.os.OperatingSystem.WINDOWS; + } + + public static boolean isUnix() { + return myOS.isUnix(); + } + + public static boolean isMacOS() { + return myOS.getType() == com.fr.stable.os.OperatingSystem.MACOS; + } + +} diff --git a/src/main/java/com/fanruan/api/macro/OperatingSystemKit.java b/src/main/java/com/fanruan/api/macro/OperatingSystemKit.java deleted file mode 100644 index 134b69e..0000000 --- a/src/main/java/com/fanruan/api/macro/OperatingSystemKit.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.fanruan.api.macro; - -import com.fr.stable.OperatingSystem; - -/** - * @author Kalven - * @version 10.0 - * Created by Kalven on 2019/8/31 - */ -public class OperatingSystemKit { - /** - * 判断是否为windows - * @return 判断结果 - */ - public static boolean isWindows() { - return OperatingSystem.isWindows(); - } -} diff --git a/src/main/java/com/fanruan/api/structure/Expression.java b/src/main/java/com/fanruan/api/structure/Expression.java deleted file mode 100644 index e543be8..0000000 --- a/src/main/java/com/fanruan/api/structure/Expression.java +++ /dev/null @@ -1,7 +0,0 @@ -package com.fanruan.api.structure; - -/** - * 表达式 - */ -public class Expression extends com.fr.stable.script.Expression { -} diff --git a/src/main/java/com/fanruan/api/structure/Parameter.java b/src/main/java/com/fanruan/api/structure/Parameter.java deleted file mode 100644 index c4640fc..0000000 --- a/src/main/java/com/fanruan/api/structure/Parameter.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.fanruan.api.structure; - -/** - * 参数,参数是可以动态赋值的对象 - */ -public class Parameter extends com.fr.base.Parameter { - public Parameter() { - super(); - } - - public Parameter(String text) { - super(text); - } - - public Parameter(String name, Object value) { - super(name, value); - } -}