From c202c430b3d65480b142595762fbdebfa902cf67 Mon Sep 17 00:00:00 2001 From: "Mars.Ma" Date: Fri, 30 Aug 2019 09:56:33 +0800 Subject: [PATCH 01/13] =?UTF-8?q?KERNEL-1118=20=20=E5=B0=86=E6=8F=92?= =?UTF-8?q?=E4=BB=B6=E4=B8=AD=E8=AE=BE=E8=AE=A1=E5=88=B0=E7=9A=84=E8=83=BD?= =?UTF-8?q?=E5=8C=85=E8=A3=85=E7=9A=84=E7=B1=BB=E5=85=A8=E9=83=A8=E5=8A=A0?= =?UTF-8?q?=E4=B8=80=E5=B1=82=E5=8C=85=E8=A3=85=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/AbstractHighlightProvider.java | 4 +++ .../ConditionAttrSingleConditionPane.java | 13 +++++++ .../ui/condition/ConditionAttributesPane.java | 4 +++ .../layout/AbstractStyleHighlightAction.java | 5 +++ .../fanruan/api/design/ui/layout/Style.java | 5 +++ .../cell/AbstractStyleHighlightAction.java | 9 +++++ .../com/fanruan/api/stable/Constants.java | 4 +++ .../api/stable/fum/AbstractLocaleFinder.java | 4 +++ .../java/com/fanruan/api/util/AssistKit.java | 35 +++++++------------ .../api/util/PluginLicenseManagerKit.java | 9 +++++ 10 files changed, 69 insertions(+), 23 deletions(-) create mode 100644 src/main/java/com/fanruan/api/design/impl/AbstractHighlightProvider.java create mode 100644 src/main/java/com/fanruan/api/design/ui/condition/ConditionAttrSingleConditionPane.java create mode 100644 src/main/java/com/fanruan/api/design/ui/condition/ConditionAttributesPane.java create mode 100644 src/main/java/com/fanruan/api/design/ui/layout/AbstractStyleHighlightAction.java create mode 100644 src/main/java/com/fanruan/api/design/ui/layout/Style.java create mode 100644 src/main/java/com/fanruan/api/report/cell/AbstractStyleHighlightAction.java create mode 100644 src/main/java/com/fanruan/api/stable/Constants.java create mode 100644 src/main/java/com/fanruan/api/stable/fum/AbstractLocaleFinder.java create mode 100644 src/main/java/com/fanruan/api/util/PluginLicenseManagerKit.java diff --git a/src/main/java/com/fanruan/api/design/impl/AbstractHighlightProvider.java b/src/main/java/com/fanruan/api/design/impl/AbstractHighlightProvider.java new file mode 100644 index 0000000..d871590 --- /dev/null +++ b/src/main/java/com/fanruan/api/design/impl/AbstractHighlightProvider.java @@ -0,0 +1,4 @@ +package com.fanruan.api.design.impl; + +public abstract class AbstractHighlightProvider extends com.fr.design.fun.impl.AbstractHighlightProvider { +} diff --git a/src/main/java/com/fanruan/api/design/ui/condition/ConditionAttrSingleConditionPane.java b/src/main/java/com/fanruan/api/design/ui/condition/ConditionAttrSingleConditionPane.java new file mode 100644 index 0000000..5783379 --- /dev/null +++ b/src/main/java/com/fanruan/api/design/ui/condition/ConditionAttrSingleConditionPane.java @@ -0,0 +1,13 @@ +package com.fanruan.api.design.ui.condition; + +import com.fr.design.condition.ConditionAttributesPane; + +public abstract class ConditionAttrSingleConditionPane extends com.fr.design.condition.ConditionAttrSingleConditionPane { + public ConditionAttrSingleConditionPane(ConditionAttributesPane conditionAttributesPane){ + super(conditionAttributesPane); + } + + public ConditionAttrSingleConditionPane(ConditionAttributesPane conditionAttributesPane, boolean var){ + super(conditionAttributesPane, var); + } +} diff --git a/src/main/java/com/fanruan/api/design/ui/condition/ConditionAttributesPane.java b/src/main/java/com/fanruan/api/design/ui/condition/ConditionAttributesPane.java new file mode 100644 index 0000000..a3d00d4 --- /dev/null +++ b/src/main/java/com/fanruan/api/design/ui/condition/ConditionAttributesPane.java @@ -0,0 +1,4 @@ +package com.fanruan.api.design.ui.condition; + +public abstract class ConditionAttributesPane extends com.fr.design.condition.ConditionAttributesPane { +} diff --git a/src/main/java/com/fanruan/api/design/ui/layout/AbstractStyleHighlightAction.java b/src/main/java/com/fanruan/api/design/ui/layout/AbstractStyleHighlightAction.java new file mode 100644 index 0000000..b58615f --- /dev/null +++ b/src/main/java/com/fanruan/api/design/ui/layout/AbstractStyleHighlightAction.java @@ -0,0 +1,5 @@ +package com.fanruan.api.design.ui.layout; + +public abstract class AbstractStyleHighlightAction extends com.fr.report.cell.cellattr.highlight.AbstractStyleHighlightAction{ + +} diff --git a/src/main/java/com/fanruan/api/design/ui/layout/Style.java b/src/main/java/com/fanruan/api/design/ui/layout/Style.java new file mode 100644 index 0000000..50a719f --- /dev/null +++ b/src/main/java/com/fanruan/api/design/ui/layout/Style.java @@ -0,0 +1,5 @@ +package com.fanruan.api.design.ui.layout; + +public class Style extends com.fr.base.Style{ + +} diff --git a/src/main/java/com/fanruan/api/report/cell/AbstractStyleHighlightAction.java b/src/main/java/com/fanruan/api/report/cell/AbstractStyleHighlightAction.java new file mode 100644 index 0000000..b92b1c3 --- /dev/null +++ b/src/main/java/com/fanruan/api/report/cell/AbstractStyleHighlightAction.java @@ -0,0 +1,9 @@ +package com.fanruan.api.report.cell; + +public abstract class AbstractStyleHighlightAction extends com.fr.report.cell.cellattr.highlight.AbstractStyleHighlightAction{ + public AbstractStyleHighlightAction() { + } + public AbstractStyleHighlightAction(int scope) { + super(scope); + } +} diff --git a/src/main/java/com/fanruan/api/stable/Constants.java b/src/main/java/com/fanruan/api/stable/Constants.java new file mode 100644 index 0000000..9e84688 --- /dev/null +++ b/src/main/java/com/fanruan/api/stable/Constants.java @@ -0,0 +1,4 @@ +package com.fanruan.api.stable; + +public class Constants extends com.fr.stable.Constants { +} diff --git a/src/main/java/com/fanruan/api/stable/fum/AbstractLocaleFinder.java b/src/main/java/com/fanruan/api/stable/fum/AbstractLocaleFinder.java new file mode 100644 index 0000000..91c251d --- /dev/null +++ b/src/main/java/com/fanruan/api/stable/fum/AbstractLocaleFinder.java @@ -0,0 +1,4 @@ +package com.fanruan.api.stable.fum; + +public abstract class AbstractLocaleFinder extends com.fr.stable.fun.impl.AbstractLocaleFinder { +} diff --git a/src/main/java/com/fanruan/api/util/AssistKit.java b/src/main/java/com/fanruan/api/util/AssistKit.java index 5fd70ae..4f52ac3 100644 --- a/src/main/java/com/fanruan/api/util/AssistKit.java +++ b/src/main/java/com/fanruan/api/util/AssistKit.java @@ -5,8 +5,8 @@ import com.fr.stable.AssistUtils; public class AssistKit { /** * 比较两个双精度浮点型数据是否相等 - * @param parm1 - * @param parm2 + * @param parm1 第一个double数据 + * @param parm2 第二个double数据 * @return 相等返回true 错误返回false */ public static boolean equals(double parm1, double parm2) { @@ -15,8 +15,8 @@ public class AssistKit { /** * 比较两个单精度浮点型数据是否相等 - * @param parm1 - * @param parm2 + * @param parm1 第一个float数据 + * @param parm2 第二个float数据 * @return 相等返回true 错误返回false */ public static boolean equals(float parm1, float parm2) { @@ -25,8 +25,8 @@ public class AssistKit { /** * 判断两个Object类型数据是否相等 - * @param parm1 - * @param parm2 + * @param parm1 第一个Object数据 + * @param parm2 第二个 * @return 相等返回true 错误返回false */ public static boolean equals(Object parm1, Object parm2) { @@ -35,8 +35,8 @@ public class AssistKit { /** * 判断两个int类型数据是否相等 - * @param parm1 - * @param parm2 + * @param parm1 第一个int数据 + * @param parm2 第二个int数据 * @return 相等返回0,如果parm1大于parm2 返回1否则返回-1 */ public static int compare(int parm1, int parm2) { @@ -45,8 +45,8 @@ public class AssistKit { /** * 判断两个long类型数据是否相等 - * @param parm1 - * @param parm2 + * @param parm1 第一个long数据 + * @param parm2 第二个long数据 * @return 相等返回0,如果parm1大于parm2 返回1否则返回-1 */ public static int compare(long parm1, long parm2) { @@ -55,7 +55,7 @@ public class AssistKit { /** * 生成对象的哈希码值 - * @param parm + * @param parm 需要获取hashcode的Object数据 * @return 返回对象的哈希码值 */ public static int hashCode(Object... parm) { @@ -64,22 +64,11 @@ public class AssistKit { /** * 返回反映这个对象的字符串 - * @param parm + * @param parm 需要获取描述字符串的Object数据 * @return 返回反映这个对象的字符串 */ public static String toString(Object parm) { return AssistUtils.toString(parm); } - /** - * - * @param parm1 - * @param parm2 - * @return - */ -// public static String toString(Object parm1, String... parm2) { -// return AssistUtils.toString(parm1, parm2); -// } - - } diff --git a/src/main/java/com/fanruan/api/util/PluginLicenseManagerKit.java b/src/main/java/com/fanruan/api/util/PluginLicenseManagerKit.java new file mode 100644 index 0000000..f18cd6c --- /dev/null +++ b/src/main/java/com/fanruan/api/util/PluginLicenseManagerKit.java @@ -0,0 +1,9 @@ +package com.fanruan.api.util; + +import com.fr.plugin.PluginLicenseManager; + +public class PluginLicenseManagerKit { + public static PluginLicenseManager getInstance() { + return PluginLicenseManager.getInstance(); + } +} From b8bc6e0106ff3e54ac3087e7ec65187c1f21a301 Mon Sep 17 00:00:00 2001 From: "Mars.Ma" Date: Fri, 30 Aug 2019 10:44:20 +0800 Subject: [PATCH 02/13] =?UTF-8?q?KERNEL-1118=20=20=E5=B0=86=E6=8F=92?= =?UTF-8?q?=E4=BB=B6=E4=B8=AD=E8=AE=BE=E8=AE=A1=E5=88=B0=E7=9A=84=E8=83=BD?= =?UTF-8?q?=E5=8C=85=E8=A3=85=E7=9A=84=E7=B1=BB=E5=85=A8=E9=83=A8=E5=8A=A0?= =?UTF-8?q?=E4=B8=80=E5=B1=82=E5=8C=85=E8=A3=85=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ui/condition/ConditionAttrSingleConditionPane.java | 9 +++++++++ .../java/com/fanruan/api/design/ui/layout/Style.java | 5 ----- .../api/report/cell/AbstractStyleHighlightAction.java | 8 ++++++++ src/main/java/com/fanruan/api/stable/Constants.java | 3 +++ .../com/fanruan/api/util/PluginLicenseManagerKit.java | 4 ++++ 5 files changed, 24 insertions(+), 5 deletions(-) delete mode 100644 src/main/java/com/fanruan/api/design/ui/layout/Style.java diff --git a/src/main/java/com/fanruan/api/design/ui/condition/ConditionAttrSingleConditionPane.java b/src/main/java/com/fanruan/api/design/ui/condition/ConditionAttrSingleConditionPane.java index 5783379..144fed8 100644 --- a/src/main/java/com/fanruan/api/design/ui/condition/ConditionAttrSingleConditionPane.java +++ b/src/main/java/com/fanruan/api/design/ui/condition/ConditionAttrSingleConditionPane.java @@ -3,10 +3,19 @@ package com.fanruan.api.design.ui.condition; import com.fr.design.condition.ConditionAttributesPane; public abstract class ConditionAttrSingleConditionPane extends com.fr.design.condition.ConditionAttrSingleConditionPane { + /** + * 调用父类构造函数进行初始化 + * @param conditionAttributesPane + */ public ConditionAttrSingleConditionPane(ConditionAttributesPane conditionAttributesPane){ super(conditionAttributesPane); } + /** + * 调用父类构造函数进行初始化 + * @param conditionAttributesPane + * @param var + */ public ConditionAttrSingleConditionPane(ConditionAttributesPane conditionAttributesPane, boolean var){ super(conditionAttributesPane, var); } diff --git a/src/main/java/com/fanruan/api/design/ui/layout/Style.java b/src/main/java/com/fanruan/api/design/ui/layout/Style.java deleted file mode 100644 index 50a719f..0000000 --- a/src/main/java/com/fanruan/api/design/ui/layout/Style.java +++ /dev/null @@ -1,5 +0,0 @@ -package com.fanruan.api.design.ui.layout; - -public class Style extends com.fr.base.Style{ - -} diff --git a/src/main/java/com/fanruan/api/report/cell/AbstractStyleHighlightAction.java b/src/main/java/com/fanruan/api/report/cell/AbstractStyleHighlightAction.java index b92b1c3..04028b9 100644 --- a/src/main/java/com/fanruan/api/report/cell/AbstractStyleHighlightAction.java +++ b/src/main/java/com/fanruan/api/report/cell/AbstractStyleHighlightAction.java @@ -1,8 +1,16 @@ package com.fanruan.api.report.cell; public abstract class AbstractStyleHighlightAction extends com.fr.report.cell.cellattr.highlight.AbstractStyleHighlightAction{ + /** + * 默认构造方法 + */ public AbstractStyleHighlightAction() { } + + /** + * 调用父类构造方法,初始化scope属性。 + * @param scope 类属性 + */ public AbstractStyleHighlightAction(int scope) { super(scope); } diff --git a/src/main/java/com/fanruan/api/stable/Constants.java b/src/main/java/com/fanruan/api/stable/Constants.java index 9e84688..da34fe3 100644 --- a/src/main/java/com/fanruan/api/stable/Constants.java +++ b/src/main/java/com/fanruan/api/stable/Constants.java @@ -1,4 +1,7 @@ package com.fanruan.api.stable; +/** + * 常量集合 + */ public class Constants extends com.fr.stable.Constants { } diff --git a/src/main/java/com/fanruan/api/util/PluginLicenseManagerKit.java b/src/main/java/com/fanruan/api/util/PluginLicenseManagerKit.java index f18cd6c..cccb86b 100644 --- a/src/main/java/com/fanruan/api/util/PluginLicenseManagerKit.java +++ b/src/main/java/com/fanruan/api/util/PluginLicenseManagerKit.java @@ -3,6 +3,10 @@ package com.fanruan.api.util; import com.fr.plugin.PluginLicenseManager; public class PluginLicenseManagerKit { + /** + * 获取PluginLicenseManager对象的方法且返回的对象为同一个。 + * @return 返回值为单例模式下的PluginLicenseManager对象。 + */ public static PluginLicenseManager getInstance() { return PluginLicenseManager.getInstance(); } From 2271c665ab42ccc18bc46ec231b67d1fe8ce105b Mon Sep 17 00:00:00 2001 From: "Mars.Ma" Date: Fri, 30 Aug 2019 14:59:39 +0800 Subject: [PATCH 03/13] =?UTF-8?q?KERNEL-1118=20=20=E6=8C=89=E7=85=A7?= =?UTF-8?q?=E8=A6=81=E6=B1=82=E5=8E=BB=E9=99=A4=E4=B8=8D=E9=9C=80=E8=A6=81?= =?UTF-8?q?=E6=9B=B4=E6=94=B9=E7=9A=84=E5=9C=B0=E6=96=B9=EF=BC=8C=E4=BB=A5?= =?UTF-8?q?=E5=8F=8A=E4=BF=AE=E6=94=B9Constants=E6=8E=A5=E5=8F=A3=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/design/impl/AbstractHighlightProvider.java | 4 ---- .../design/ui/layout/AbstractStyleHighlightAction.java | 5 ----- src/main/java/com/fanruan/api/macro/Constants.java | 8 ++++++++ src/main/java/com/fanruan/api/stable/Constants.java | 7 ------- .../com/fanruan/api/stable/fum/AbstractLocaleFinder.java | 4 ---- 5 files changed, 8 insertions(+), 20 deletions(-) delete mode 100644 src/main/java/com/fanruan/api/design/impl/AbstractHighlightProvider.java delete mode 100644 src/main/java/com/fanruan/api/design/ui/layout/AbstractStyleHighlightAction.java create mode 100644 src/main/java/com/fanruan/api/macro/Constants.java delete mode 100644 src/main/java/com/fanruan/api/stable/Constants.java delete mode 100644 src/main/java/com/fanruan/api/stable/fum/AbstractLocaleFinder.java diff --git a/src/main/java/com/fanruan/api/design/impl/AbstractHighlightProvider.java b/src/main/java/com/fanruan/api/design/impl/AbstractHighlightProvider.java deleted file mode 100644 index d871590..0000000 --- a/src/main/java/com/fanruan/api/design/impl/AbstractHighlightProvider.java +++ /dev/null @@ -1,4 +0,0 @@ -package com.fanruan.api.design.impl; - -public abstract class AbstractHighlightProvider extends com.fr.design.fun.impl.AbstractHighlightProvider { -} diff --git a/src/main/java/com/fanruan/api/design/ui/layout/AbstractStyleHighlightAction.java b/src/main/java/com/fanruan/api/design/ui/layout/AbstractStyleHighlightAction.java deleted file mode 100644 index b58615f..0000000 --- a/src/main/java/com/fanruan/api/design/ui/layout/AbstractStyleHighlightAction.java +++ /dev/null @@ -1,5 +0,0 @@ -package com.fanruan.api.design.ui.layout; - -public abstract class AbstractStyleHighlightAction extends com.fr.report.cell.cellattr.highlight.AbstractStyleHighlightAction{ - -} diff --git a/src/main/java/com/fanruan/api/macro/Constants.java b/src/main/java/com/fanruan/api/macro/Constants.java new file mode 100644 index 0000000..613e0a4 --- /dev/null +++ b/src/main/java/com/fanruan/api/macro/Constants.java @@ -0,0 +1,8 @@ +package com.fanruan.api.macro; + +/** + * 常量集合 + */ +public interface Constants{ + int RIGHT = com.fr.stable.Constants.RIGHT; +} diff --git a/src/main/java/com/fanruan/api/stable/Constants.java b/src/main/java/com/fanruan/api/stable/Constants.java deleted file mode 100644 index da34fe3..0000000 --- a/src/main/java/com/fanruan/api/stable/Constants.java +++ /dev/null @@ -1,7 +0,0 @@ -package com.fanruan.api.stable; - -/** - * 常量集合 - */ -public class Constants extends com.fr.stable.Constants { -} diff --git a/src/main/java/com/fanruan/api/stable/fum/AbstractLocaleFinder.java b/src/main/java/com/fanruan/api/stable/fum/AbstractLocaleFinder.java deleted file mode 100644 index 91c251d..0000000 --- a/src/main/java/com/fanruan/api/stable/fum/AbstractLocaleFinder.java +++ /dev/null @@ -1,4 +0,0 @@ -package com.fanruan.api.stable.fum; - -public abstract class AbstractLocaleFinder extends com.fr.stable.fun.impl.AbstractLocaleFinder { -} From f935fd370c58a3f0b3dcd4d19c5be252bc9ae09d Mon Sep 17 00:00:00 2001 From: "Mars.Ma" Date: Fri, 30 Aug 2019 16:00:16 +0800 Subject: [PATCH 04/13] =?UTF-8?q?KERNEL-1118=20=20=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E4=B8=80=E4=B8=AA=E4=B8=8D=E7=94=A8=E4=BF=AE=E6=94=B9=E7=9A=84?= =?UTF-8?q?=E5=9C=B0=E6=96=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fanruan/api/util/PluginLicenseManagerKit.java | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 src/main/java/com/fanruan/api/util/PluginLicenseManagerKit.java diff --git a/src/main/java/com/fanruan/api/util/PluginLicenseManagerKit.java b/src/main/java/com/fanruan/api/util/PluginLicenseManagerKit.java deleted file mode 100644 index cccb86b..0000000 --- a/src/main/java/com/fanruan/api/util/PluginLicenseManagerKit.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.fanruan.api.util; - -import com.fr.plugin.PluginLicenseManager; - -public class PluginLicenseManagerKit { - /** - * 获取PluginLicenseManager对象的方法且返回的对象为同一个。 - * @return 返回值为单例模式下的PluginLicenseManager对象。 - */ - public static PluginLicenseManager getInstance() { - return PluginLicenseManager.getInstance(); - } -} From 8ae5e092d944d518156f09e13fd68dfd5c341a96 Mon Sep 17 00:00:00 2001 From: richie Date: Fri, 30 Aug 2019 17:57:28 +0800 Subject: [PATCH 05/13] =?UTF-8?q?=E5=85=BC=E5=AE=B9=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fanruan/api/cal/FormulaKit.java | 2 +- .../fanruan/api/conf/BaseConfiguration.java | 2 +- .../com/fanruan/api/data/ConnectionKit.java | 4 +- .../fanruan/api/design/macro/UIConstants.java | 15 ++- .../design/ui/container/BasicBeanPane.java | 2 +- .../api/design/ui/container/BasicDialog.java | 24 +++-- .../api/design/ui/container/BasicPane.java | 93 +++++++++++++++++++ .../fanruan/api/design/util/GUICoreKit.java | 25 ++++- .../com/fanruan/api/err/UtilEvalError.java | 13 ++- src/main/java/com/fanruan/api/xml/XmlKit.java | 23 ++++- 10 files changed, 179 insertions(+), 24 deletions(-) diff --git a/src/main/java/com/fanruan/api/cal/FormulaKit.java b/src/main/java/com/fanruan/api/cal/FormulaKit.java index e863d2c..10bb4fa 100644 --- a/src/main/java/com/fanruan/api/cal/FormulaKit.java +++ b/src/main/java/com/fanruan/api/cal/FormulaKit.java @@ -54,7 +54,7 @@ public class FormulaKit { * @param content 公式的内容 * @return 公式对象 */ - public static @NotNull FormulaProvider newFormula(Object content) { + public static @NotNull BaseFormula newFormula(Object content) { return BaseFormula.createFormulaBuilder().build(content); } diff --git a/src/main/java/com/fanruan/api/conf/BaseConfiguration.java b/src/main/java/com/fanruan/api/conf/BaseConfiguration.java index 29147d6..c6b7066 100644 --- a/src/main/java/com/fanruan/api/conf/BaseConfiguration.java +++ b/src/main/java/com/fanruan/api/conf/BaseConfiguration.java @@ -30,7 +30,7 @@ public abstract class BaseConfiguration extends DefaultConfiguration { * @param 类型 * @return 配置对象 */ - static T getConfigInstance(final Class clazz) { + public static T getConfigInstance(final Class clazz) { return ConfigContext.getConfigInstance(clazz); } } diff --git a/src/main/java/com/fanruan/api/data/ConnectionKit.java b/src/main/java/com/fanruan/api/data/ConnectionKit.java index ed64b99..e22f3e9 100644 --- a/src/main/java/com/fanruan/api/data/ConnectionKit.java +++ b/src/main/java/com/fanruan/api/data/ConnectionKit.java @@ -17,7 +17,7 @@ public class ConnectionKit { * @param name 名字 * @return 数据连接 */ - public @Nullable Connection getConnection(@NotNull String name) { + public static @Nullable Connection getConnection(@NotNull String name) { return ConnectionConfig.getInstance().getConnection(name); } @@ -28,7 +28,7 @@ public class ConnectionKit { * @param type 类型 * @return 数据连接 */ - public @Nullable T getConnection(@NotNull String name, Class type) { + public static @Nullable T getConnection(@NotNull String name, Class type) { Connection connection = getConnection(name); if (TypeKit.objectInstanceOf(connection, type)) { return (T) connection; diff --git a/src/main/java/com/fanruan/api/design/macro/UIConstants.java b/src/main/java/com/fanruan/api/design/macro/UIConstants.java index 613600f..471cae3 100644 --- a/src/main/java/com/fanruan/api/design/macro/UIConstants.java +++ b/src/main/java/com/fanruan/api/design/macro/UIConstants.java @@ -2,7 +2,18 @@ package com.fanruan.api.design.macro; import java.awt.*; -public class UIConstants { - Color UIPOPUPMENU_LINE_COLOR = new Color(13158861); +/** + * 设计器界面使用的一些常量 + */ +public interface UIConstants { + + /** + * 边框线颜色 + */ + Color LINE_COLOR = new Color(153, 153, 153); + + /** + * 圆角弧度 + */ int ARC = 0; } diff --git a/src/main/java/com/fanruan/api/design/ui/container/BasicBeanPane.java b/src/main/java/com/fanruan/api/design/ui/container/BasicBeanPane.java index ec72cbf..2ffc211 100644 --- a/src/main/java/com/fanruan/api/design/ui/container/BasicBeanPane.java +++ b/src/main/java/com/fanruan/api/design/ui/container/BasicBeanPane.java @@ -1,4 +1,4 @@ package com.fanruan.api.design.ui.container; -public abstract class BasicBeanPane extends com.fr.design.beans.BasicBeanPane{ +public abstract class BasicBeanPane extends com.fr.design.beans.BasicBeanPane { } diff --git a/src/main/java/com/fanruan/api/design/ui/container/BasicDialog.java b/src/main/java/com/fanruan/api/design/ui/container/BasicDialog.java index 5a65107..dcea5c2 100644 --- a/src/main/java/com/fanruan/api/design/ui/container/BasicDialog.java +++ b/src/main/java/com/fanruan/api/design/ui/container/BasicDialog.java @@ -1,36 +1,40 @@ package com.fanruan.api.design.ui.container; -import com.fanruan.api.design.ui.container.BasicPane; - import java.awt.*; -public class BasicDialog extends com.fr.design.dialog.BasicDialog{ - public BasicDialog(Dialog parent){ +public class BasicDialog extends com.fr.design.dialog.BasicDialog { + + public BasicDialog(Dialog parent) { super(parent); } - public BasicDialog(Dialog parent, BasicPane pane){ + public BasicDialog(Dialog parent, BasicPane pane) { super(parent, pane); } - public BasicDialog(Dialog parent, BasicPane pane, boolean isNeedButton){ + public BasicDialog(Dialog parent, BasicPane pane, boolean isNeedButton) { super(parent, pane, isNeedButton); } - public BasicDialog(Frame parent){ + public BasicDialog(Frame parent) { super(parent); } - public BasicDialog(Frame parent, BasicPane pane){ + public BasicDialog(Frame parent, BasicPane pane) { super(parent, pane); } - public BasicDialog(Frame parent, BasicPane pane, boolean isNedButtonPane){ + public BasicDialog(Frame parent, BasicPane pane, boolean isNedButtonPane) { super(parent, pane, isNedButtonPane); } @Override - public void checkValid(){ + protected void setBasicDialogSize(Dimension dimension) { + super.setBasicDialogSize(dimension); + } + + @Override + public void checkValid() throws Exception { } } diff --git a/src/main/java/com/fanruan/api/design/ui/container/BasicPane.java b/src/main/java/com/fanruan/api/design/ui/container/BasicPane.java index c089e0c..f3052fe 100644 --- a/src/main/java/com/fanruan/api/design/ui/container/BasicPane.java +++ b/src/main/java/com/fanruan/api/design/ui/container/BasicPane.java @@ -1,5 +1,98 @@ package com.fanruan.api.design.ui.container; + +import com.fanruan.api.design.util.GUICoreKit; +import com.fr.design.dialog.DialogActionListener; +import com.fr.design.dialog.UIDialog; + +import java.awt.*; + public abstract class BasicPane extends com.fr.design.dialog.BasicPane { + /** + * 显示窗口 + * + * @param window 窗口 + * @return 对话框 + */ + public BasicDialog showWindow(Window window) { + return this.showWindow(window, null); + } + + + /** + * 显示窗口 + * + * @param window 窗口 + * @param l 对话框监听器 + * @return 对话框 + */ + public BasicDialog showWindow(Window window, DialogActionListener l) { + return showWindowWithCustomSize(window, l, BasicDialog.DEFAULT); + } + + public BasicDialog showWindowWithCustomSize(Window window, DialogActionListener l, Dimension dimension) { + BasicDialog dg; + if (window instanceof Frame) { + dg = new DIALOG((Frame) window); + } else { + dg = new DIALOG((Dialog) window); + } + + if (l != null) { + dg.addDialogActionListener(l); + } + dg.setBasicDialogSize(dimension); + GUICoreKit.centerWindow(dg); + dg.setResizable(false); + return dg; + } + + private class DIALOG extends BasicDialog { + public DIALOG(Frame parent) { + super(parent, BasicPane.this); + this.setTitle(BasicPane.this.title4PopupWindow()); + } + + public DIALOG(Dialog parent) { + super(parent, BasicPane.this); + this.setTitle(BasicPane.this.title4PopupWindow()); + } + + + public DIALOG(Frame parent, boolean isNeedButtonPane) { + super(parent, BasicPane.this, isNeedButtonPane); + this.setTitle(BasicPane.this.title4PopupWindow()); + } + + + public DIALOG(Dialog parent, boolean isNeedButtonPane) { + super(parent, BasicPane.this, isNeedButtonPane); + this.setTitle(BasicPane.this.title4PopupWindow()); + } + + + public void checkValid() throws Exception { + BasicPane.this.checkValid(); + } + + } + + private class UnsizedDialog extends UIDialog { + + public UnsizedDialog(Frame parent) { + super(parent, BasicPane.this); + this.setTitle(BasicPane.this.title4PopupWindow()); + } + + public UnsizedDialog(Dialog parent) { + super(parent, BasicPane.this); + this.setTitle(BasicPane.this.title4PopupWindow()); + } + + + public void checkValid() throws Exception { + BasicPane.this.checkValid(); + } + } } diff --git a/src/main/java/com/fanruan/api/design/util/GUICoreKit.java b/src/main/java/com/fanruan/api/design/util/GUICoreKit.java index 8446f02..1ff5155 100644 --- a/src/main/java/com/fanruan/api/design/util/GUICoreKit.java +++ b/src/main/java/com/fanruan/api/design/util/GUICoreKit.java @@ -1,7 +1,7 @@ package com.fanruan.api.design.util; -import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.layout.FRGUIPaneFactory; +import com.fr.design.utils.gui.GUICoreUtils; import javax.swing.*; import java.awt.*; @@ -100,20 +100,39 @@ public class GUICoreKit { public static void showPopupMenu(JPopupMenu menu, Component component, int x, int y) { GUICoreUtils.showPopupMenu(menu, component, x, y); } + /** * 创建一个带有左空边框的面板 * * @return 返回一个JPanel对象 */ - public static JPanel createNormalFlowInnerContainerPane(){ + public static JPanel createNormalFlowInnerContainerPane() { return FRGUIPaneFactory.createNormalFlowInnerContainer_M_Pane(); } + /** * 创建一个带有边框面板 * * @return 返回一个JPanel对象 */ - public static JPanel createBorderLayoutPane(){ + public static JPanel createBorderLayoutPane() { return FRGUIPaneFactory.createBorderLayout_S_Pane(); } + + /** + * 设置一个窗口居中 + */ + public static void centerWindow(Window win) { + Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); + + Dimension winSize = win.getSize(); + + if (winSize.height > screenSize.height) { + winSize.height = screenSize.height; + } + if (winSize.width > screenSize.width) { + winSize.width = screenSize.width; + } + win.setLocation((screenSize.width - winSize.width) / 2, (screenSize.height - winSize.height) / 2 - 20); + } } diff --git a/src/main/java/com/fanruan/api/err/UtilEvalError.java b/src/main/java/com/fanruan/api/err/UtilEvalError.java index fed9c53..db4ef1f 100644 --- a/src/main/java/com/fanruan/api/err/UtilEvalError.java +++ b/src/main/java/com/fanruan/api/err/UtilEvalError.java @@ -1,4 +1,15 @@ package com.fanruan.api.err; -public class UtilEvalError extends com.fr.stable.UtilEvalError{ +/** + * 公式计算异常 + */ +public class UtilEvalError extends com.fr.stable.UtilEvalError { + + public UtilEvalError() { + + } + + public UtilEvalError(String message) { + super(message); + } } diff --git a/src/main/java/com/fanruan/api/xml/XmlKit.java b/src/main/java/com/fanruan/api/xml/XmlKit.java index 921739f..89de42a 100644 --- a/src/main/java/com/fanruan/api/xml/XmlKit.java +++ b/src/main/java/com/fanruan/api/xml/XmlKit.java @@ -1,9 +1,13 @@ package com.fanruan.api.xml; -import com.fr.stable.xml.*; import com.fr.data.core.DataCoreXmlUtils; import com.fr.data.impl.Connection; import com.fr.general.xml.GeneralXMLTools; +import com.fr.stable.xml.XMLPrintWriter; +import com.fr.stable.xml.XMLReadable; +import com.fr.stable.xml.XMLTools; +import com.fr.stable.xml.XMLable; +import com.fr.stable.xml.XMLableReader; import java.io.InputStream; @@ -42,21 +46,34 @@ public class XmlKit { public static void writeXMLable(XMLPrintWriter writer, XMLable xml, String tagName) { GeneralXMLTools.writeXMLable(writer, xml, tagName); } + /** * 读取connection对象 + * * @param reader XMLableReader对象 * @return Connection对象 - * */ public static Connection readXMLConnectionMap(XMLableReader reader) { return DataCoreXmlUtils.readXMLConnectionMap(reader); } + + /** + * 从xml中读取数据连接对象 + * @param reader xml读取器 + * @return 数据连接对象 + */ + public static Connection readXMLConnection(XMLableReader reader) { + return DataCoreXmlUtils.readXMLConnection(reader); + } + /** * 写connection对象 - * @param writer XMLPrintWriter对象 + * + * @param writer XMLPrintWriter对象 * @param connection Connection对象 */ public static void writeXMLConnection(XMLPrintWriter writer, Connection connection) { DataCoreXmlUtils.writeXMLConnection(writer, connection); } + } From e978dfa13c20bf6a3a929f15c6336834dd3ae969 Mon Sep 17 00:00:00 2001 From: richie Date: Fri, 30 Aug 2019 19:16:32 +0800 Subject: [PATCH 06/13] =?UTF-8?q?=E7=BB=84=E4=BB=B6=E5=85=BC=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fanruan/api/design/macro/UIConstants.java | 5 + .../design/ui/component/UIRoundedBorder.java | 11 +- .../design/ui/component/UITitledBorder.java | 72 +++++ .../ui/container/DialogActionAdapter.java | 6 +- .../design/work/DatabaseConnectionPane.java | 246 +++++++++++++++++- .../fanruan/api/macro/EncodeConstants.java | 14 + 6 files changed, 344 insertions(+), 10 deletions(-) create mode 100644 src/main/java/com/fanruan/api/design/ui/component/UITitledBorder.java diff --git a/src/main/java/com/fanruan/api/design/macro/UIConstants.java b/src/main/java/com/fanruan/api/design/macro/UIConstants.java index 471cae3..bfdf0d9 100644 --- a/src/main/java/com/fanruan/api/design/macro/UIConstants.java +++ b/src/main/java/com/fanruan/api/design/macro/UIConstants.java @@ -12,6 +12,11 @@ public interface UIConstants { */ Color LINE_COLOR = new Color(153, 153, 153); + /** + * 带标题的边框的颜色 + */ + Color TITLED_BORDER_COLOR = new Color(0xe8e8e9); + /** * 圆角弧度 */ diff --git a/src/main/java/com/fanruan/api/design/ui/component/UIRoundedBorder.java b/src/main/java/com/fanruan/api/design/ui/component/UIRoundedBorder.java index 37b33e5..17922a6 100644 --- a/src/main/java/com/fanruan/api/design/ui/component/UIRoundedBorder.java +++ b/src/main/java/com/fanruan/api/design/ui/component/UIRoundedBorder.java @@ -1,11 +1,12 @@ package com.fanruan.api.design.ui.component; + import java.awt.*; -/* -* UI组件的边框 -* */ -public class UIRoundedBorder extends com.fr.design.border.UIRoundedBorder{ - public UIRoundedBorder(Color color){ +/** + * 圆角形状的边框 + */ +public class UIRoundedBorder extends com.fr.design.border.UIRoundedBorder { + public UIRoundedBorder(Color color) { super(color); } diff --git a/src/main/java/com/fanruan/api/design/ui/component/UITitledBorder.java b/src/main/java/com/fanruan/api/design/ui/component/UITitledBorder.java new file mode 100644 index 0000000..2a39415 --- /dev/null +++ b/src/main/java/com/fanruan/api/design/ui/component/UITitledBorder.java @@ -0,0 +1,72 @@ +package com.fanruan.api.design.ui.component; + +import com.fanruan.api.design.macro.UIConstants; + +import javax.swing.*; +import javax.swing.border.TitledBorder; +import java.awt.*; + +/** + * @author richie + * @version 10.0 + * Created by richie on 2019-08-30 + * 带标题的边框 + */ +public class UITitledBorder extends TitledBorder { + + private static final long serialVersionUID = 1L; + + public static UITitledBorder createBorderWithTitle(String title) { + return new UITitledBorder(title); + } + + public static UITitledBorder createBorderWithTitle(String title, int roundedCorner) { + return new UITitledBorder(title, roundedCorner); + } + + private UITitledBorder(String title) { + super( + BorderFactory.createCompoundBorder( + BorderFactory.createEmptyBorder( + 0, + 0, + 5, + 0), + new UIRoundedBorder( + UIConstants.TITLED_BORDER_COLOR, + 1, + 10) + ), + title, + TitledBorder.LEADING, + TitledBorder.TOP, + null, + new Color(1, 159, 222) + ); + } + + /** + * @param title title + * @param roundedCorner corner width 圆弧宽度,即圆角直径 + */ + private UITitledBorder(String title, int roundedCorner) { + super( + BorderFactory.createCompoundBorder( + BorderFactory.createEmptyBorder( + 0, + 0, + 5, + 0), + new UIRoundedBorder( + UIConstants.TITLED_BORDER_COLOR, + 1, + roundedCorner) + ), + title, + TitledBorder.LEADING, + TitledBorder.TOP, + null, + new Color(1, 159, 222) + ); + } +} 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 index c7a5db5..d624c63 100644 --- a/src/main/java/com/fanruan/api/design/ui/container/DialogActionAdapter.java +++ b/src/main/java/com/fanruan/api/design/ui/container/DialogActionAdapter.java @@ -1,8 +1,8 @@ package com.fanruan.api.design.ui.container; -import com.fr.design.layout.FRGUIPaneFactory; -public class DialogActionAdapter extends com.fr.design.dialog.DialogActionAdapter{ - public DialogActionAdapter(){ +public class DialogActionAdapter extends com.fr.design.dialog.DialogActionAdapter { + + public DialogActionAdapter() { } } diff --git a/src/main/java/com/fanruan/api/design/work/DatabaseConnectionPane.java b/src/main/java/com/fanruan/api/design/work/DatabaseConnectionPane.java index 0c5eaf9..4d6d086 100644 --- a/src/main/java/com/fanruan/api/design/work/DatabaseConnectionPane.java +++ b/src/main/java/com/fanruan/api/design/work/DatabaseConnectionPane.java @@ -1,7 +1,249 @@ package com.fanruan.api.design.work; +import com.fanruan.api.design.ui.component.UIButton; +import com.fanruan.api.design.ui.component.UIComboBox; +import com.fanruan.api.design.ui.component.UILabel; +import com.fanruan.api.design.ui.container.BasicBeanPane; +import com.fanruan.api.log.LogKit; +import com.fanruan.api.macro.EncodeConstants; +import com.fanruan.api.util.ArrayKit; +import com.fanruan.api.util.StringKit; +import com.fr.data.impl.Connection; +import com.fr.data.impl.JDBCDatabaseConnection; +import com.fr.data.impl.JNDIDatabaseConnection; +import com.fr.data.operator.DataOperator; +import com.fr.design.data.datapane.connect.JDBCDefPane; +import com.fr.design.data.datapane.connect.JNDIDefPane; +import com.fr.design.layout.FRGUIPaneFactory; +import com.fr.design.scrollruler.ModLineBorder; +import com.fr.design.utils.gui.GUICoreUtils; + import javax.swing.*; -public abstract class DatabaseConnectionPane extends com.fr.design.data.datapane.connect.DatabaseConnectionPane{ +import java.awt.*; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.event.WindowAdapter; +import java.awt.event.WindowEvent; + +/** + * 数据连接面板 + * + * @param 数据连接类型 + */ +public abstract class DatabaseConnectionPane extends BasicBeanPane { + + private UILabel message; + private UIButton okButton; + private UIButton cancelButton; + private JDialog dialog; + private UILabel uiLabel; + + private UIComboBox charSetComboBox; + private String originalCharSet = null; + + public DatabaseConnectionPane() { + this.initComponents(); + } + + protected void initComponents() { + message = new UILabel(); + uiLabel = new UILabel(); + okButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_OK")); + cancelButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Cancel")); + String[] defaultEncode = new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Encode_Auto")}; + charSetComboBox = new UIComboBox<>(ArrayKit.addAll(defaultEncode, EncodeConstants.ENCODING_ARRAY)); + this.setLayout(new BorderLayout()); + JPanel northPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_L_Pane(); + this.add(northPane, BorderLayout.NORTH); + + JPanel testPane = FRGUIPaneFactory.createNormalFlowInnerContainer_M_Pane(); + northPane.add(testPane, BorderLayout.NORTH); + UIButton testButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Datasource_Test_Connection")); + testPane.add(testButton); + testButton.addActionListener(testConnectionActionListener); + testPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 3, 4)); + + northPane.add(mainPanel(), BorderLayout.CENTER); + + JPanel chartSetPane = FRGUIPaneFactory.createNColumnGridInnerContainer_S_Pane(2); + northPane.add(chartSetPane); + chartSetPane.setBorder(BorderFactory.createTitledBorder( + new ModLineBorder(ModLineBorder.TOP), + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Advanced") + )); + chartSetPane.add(GUICoreUtils.createNamedPane(charSetComboBox, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Datasource_Charset") + ":")); + } + + protected abstract JPanel mainPanel(); + + @Override + public void populateBean(com.fr.data.impl.Connection ob) { + this.originalCharSet = ob.getOriginalCharsetName(); + if (StringKit.isBlank(originalCharSet)) { + this.charSetComboBox.setSelectedItem(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Encode_Auto")); + } else { + this.charSetComboBox.setSelectedItem(ob.getOriginalCharsetName()); + } + + populateSubDatabaseConnectionBean((E) ob); + } + + protected abstract void populateSubDatabaseConnectionBean(E ob); + + @Override + public com.fr.data.impl.Connection updateBean() { + E ob = updateSubDatabaseConnectionBean(); + + ob.setOriginalCharsetName(this.originalCharSet); + if (this.charSetComboBox.getSelectedIndex() == 0) { + ob.setNewCharsetName(null); + ob.setOriginalCharsetName(null); + } else { + ob.setNewCharsetName(EncodeConstants.ENCODING_GBK); + ob.setOriginalCharsetName(((String) this.charSetComboBox.getSelectedItem())); + + } + + return ob; + } + + protected abstract E updateSubDatabaseConnectionBean(); + + ActionListener testConnectionActionListener = new ActionListener() { + public void actionPerformed(ActionEvent evt) { + + final SwingWorker connectionThread = new SwingWorker() { + protected Object doInBackground() throws Exception { + try { + com.fr.data.impl.Connection database = DatabaseConnectionPane.this.updateBean(); + boolean connect = DataOperator.getInstance().testConnection(database); + okButton.setEnabled(true); + message.setText(database.connectMessage(connect)); + if (connect) { + uiLabel.setIcon(UIManager.getIcon("OptionPane.informationIcon")); + message.setText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Datasource_Connection_Successfully")); + } else { + uiLabel.setIcon(UIManager.getIcon("OptionPane.errorIcon")); + message.setText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Connection_Failed")); + } + } catch (Exception exp) { + LogKit.error(exp.getMessage(), exp); + } + return null; + } + }; + + connectionThread.execute(); + initDialogPane(); + okButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + dialog.dispose(); + } + }); + cancelButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + dialog.dispose(); + connectionThread.cancel(true); + } + }); + + dialog.addWindowListener(new WindowAdapter() { + public void windowClosed(WindowEvent e) { + connectionThread.cancel(true); + } + }); + + dialog.show(); + dialog.dispose(); + } + }; + + private void initDialogPane() { + + message.setText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Datasource_Test_Connection") + "..."); + message.setBorder(BorderFactory.createEmptyBorder(8, 5, 0, 0)); + okButton.setEnabled(false); + + dialog = new JDialog((Dialog) SwingUtilities.getWindowAncestor(DatabaseConnectionPane.this), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Datasource_Test_Connection"), true); + dialog.setSize(new Dimension(268, 118)); + okButton.setEnabled(false); + JPanel jp = new JPanel(); + JPanel upPane = new JPanel(); + JPanel downPane = new JPanel(); + uiLabel = new UILabel(UIManager.getIcon("OptionPane.informationIcon")); + + upPane.setLayout(new FlowLayout(FlowLayout.LEFT, 10, 10)); + upPane.add(uiLabel); + upPane.add(message); + downPane.setLayout(new FlowLayout(FlowLayout.CENTER, 6, 0)); + downPane.add(okButton); + downPane.add(cancelButton); + jp.setLayout(new BoxLayout(jp, BoxLayout.Y_AXIS)); + jp.add(upPane); + jp.add(downPane); + dialog.add(jp); + dialog.setResizable(false); + dialog.setLocationRelativeTo(SwingUtilities.getWindowAncestor(DatabaseConnectionPane.this)); + } + + + public static class JDBC extends com.fr.design.data.datapane.connect.DatabaseConnectionPane { + private static JDBCDefPane jdbcDefPane = new JDBCDefPane(); + + @Override + protected JPanel mainPanel() { + return jdbcDefPane; + } + + @Override + protected boolean isFineBI() { + return false; + } + + @Override + protected void populateSubDatabaseConnectionBean(JDBCDatabaseConnection ob) { + jdbcDefPane.populate(ob); + } + + @Override + protected JDBCDatabaseConnection updateSubDatabaseConnectionBean() { + return jdbcDefPane.update(); + } + + @Override + protected String title4PopupWindow() { + return "JDBC"; + } + } + + public static class JNDI extends com.fr.design.data.datapane.connect.DatabaseConnectionPane { + private static JNDIDefPane jndiDefPane = new JNDIDefPane(); + + @Override + protected JPanel mainPanel() { + return jndiDefPane; + } + + @Override + protected boolean isFineBI() { + return false; + } + + @Override + protected void populateSubDatabaseConnectionBean(JNDIDatabaseConnection ob) { + jndiDefPane.populate(ob); + } + + @Override + protected JNDIDatabaseConnection updateSubDatabaseConnectionBean() { + return jndiDefPane.update(); + } + + @Override + protected String title4PopupWindow() { + return "JNDI"; + } + } -} +} \ No newline at end of file diff --git a/src/main/java/com/fanruan/api/macro/EncodeConstants.java b/src/main/java/com/fanruan/api/macro/EncodeConstants.java index a26e822..b917229 100644 --- a/src/main/java/com/fanruan/api/macro/EncodeConstants.java +++ b/src/main/java/com/fanruan/api/macro/EncodeConstants.java @@ -45,4 +45,18 @@ public interface EncodeConstants { * cp850编码 */ String ENCODING_CP850 = com.fr.stable.EncodeConstants.ENCODING_CP850; + + /** + * 所有编码的集合 + */ + String[] ENCODING_ARRAY = { + ENCODING_GBK, + ENCODING_BIG5, + ENCODING_ISO_8859_1, + ENCODING_UTF_8, + ENCODING_UTF_16, + ENCODING_EUC_JP, + ENCODING_EUC_KR, + ENCODING_CP850 + }; } From 9a2383421b5008019db063aeaf63dd4af81daec8 Mon Sep 17 00:00:00 2001 From: richie Date: Fri, 30 Aug 2019 20:44:37 +0800 Subject: [PATCH 07/13] =?UTF-8?q?=E6=9B=B4=E5=A4=9A=E7=9A=84API?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fanruan/api/conf/ConfigurationKit.java | 41 +++++++++++++++++++ .../java/com/fanruan/api/conf/Runner.java | 11 +++++ .../fanruan/api/conf/xml/XmlHolderKit.java | 26 ++++++++++++ .../com/fanruan/api/data/ConnectionKit.java | 11 +++++ .../connection/NameDatabaseConnection.java | 4 -- .../ui/component/UIPlaceholderTextField.java | 4 ++ .../api/design/ui/component/UIToolbar.java | 6 +-- .../api/design/ui/toolbar/ToolBarDef.java | 36 ++++++++++++++++ .../java/com/fanruan/api/net/CloudKit.java | 4 +- src/main/java/com/fanruan/api/util/IOKit.java | 16 ++++++++ .../com/fanruan/api/net/http/HttpKitTest.java | 3 ++ 11 files changed, 152 insertions(+), 10 deletions(-) create mode 100644 src/main/java/com/fanruan/api/conf/ConfigurationKit.java create mode 100644 src/main/java/com/fanruan/api/conf/Runner.java create mode 100644 src/main/java/com/fanruan/api/conf/xml/XmlHolderKit.java delete mode 100644 src/main/java/com/fanruan/api/data/connection/NameDatabaseConnection.java create mode 100644 src/main/java/com/fanruan/api/design/ui/toolbar/ToolBarDef.java diff --git a/src/main/java/com/fanruan/api/conf/ConfigurationKit.java b/src/main/java/com/fanruan/api/conf/ConfigurationKit.java new file mode 100644 index 0000000..b433465 --- /dev/null +++ b/src/main/java/com/fanruan/api/conf/ConfigurationKit.java @@ -0,0 +1,41 @@ +package com.fanruan.api.conf; + +import com.fr.config.Configuration; +import com.fr.config.holder.ConfigChangeListener; +import com.fr.transaction.Configurations; +import com.fr.transaction.ValidateProxy; +import com.fr.transaction.WorkerFacade; + +/** + * @author richie + * @version 10.0 + * Created by richie on 2019-08-30 + * 配置监听管理器 + */ +public class ConfigurationKit { + + /** + * 注册监听配置变化的监听器 + * + * @param listener 监听器 + */ + public static void registerListener(ConfigChangeListener listener) { + ValidateProxy.getInstance().getValidateManager().registerListener(listener); + } + + /** + * 保存配置 + * + * @param type 配置的类型 + * @param action 保存动作 + */ + public static void modify(Class type, Runner action) { + Configurations.modify(new WorkerFacade(type) { + @Override + public void run() { + action.run(); + } + }); + } + +} diff --git a/src/main/java/com/fanruan/api/conf/Runner.java b/src/main/java/com/fanruan/api/conf/Runner.java new file mode 100644 index 0000000..b80c76e --- /dev/null +++ b/src/main/java/com/fanruan/api/conf/Runner.java @@ -0,0 +1,11 @@ +package com.fanruan.api.conf; + +/** + * @author richie + * @version 10.0 + * Created by richie on 2019-08-30 + */ +public interface Runner { + + void run(); +} diff --git a/src/main/java/com/fanruan/api/conf/xml/XmlHolderKit.java b/src/main/java/com/fanruan/api/conf/xml/XmlHolderKit.java new file mode 100644 index 0000000..85c156d --- /dev/null +++ b/src/main/java/com/fanruan/api/conf/xml/XmlHolderKit.java @@ -0,0 +1,26 @@ +package com.fanruan.api.conf.xml; + +import com.fr.config.holder.Conf; +import com.fr.config.holder.impl.xml.XmlConf; +import com.fr.stable.xml.XMLable; + +/** + * @author richie + * @version 10.0 + * Created by richie on 2019-08-30 + * 将xml文件写入fine_conf_entity的帮助类,不建议使用 + */ +public class XmlHolderKit { + + /** + * 创建一个要写入配置的xml多项 + * @param t 配置对象 + * @param clazz 类型 + * @param xmlTag xml标签 + * @param 类型 + * @return 配置对象 + */ + public static Conf obj(T t, Class clazz, String xmlTag) { + return new XmlConf(t, clazz, xmlTag); + } +} diff --git a/src/main/java/com/fanruan/api/data/ConnectionKit.java b/src/main/java/com/fanruan/api/data/ConnectionKit.java index e22f3e9..3931a38 100644 --- a/src/main/java/com/fanruan/api/data/ConnectionKit.java +++ b/src/main/java/com/fanruan/api/data/ConnectionKit.java @@ -2,6 +2,7 @@ package com.fanruan.api.data; import com.fanruan.api.util.TypeKit; import com.fr.data.impl.Connection; +import com.fr.data.impl.NameDatabaseConnection; import com.fr.file.ConnectionConfig; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -35,4 +36,14 @@ public class ConnectionKit { } return null; } + + /** + * 生成一个使用名字来引用的数据连接对象 + * + * @param name 数据连接的名字 + * @return 数据连接 + */ + public static Connection createNameConnection(String name) { + return new NameDatabaseConnection(name); + } } diff --git a/src/main/java/com/fanruan/api/data/connection/NameDatabaseConnection.java b/src/main/java/com/fanruan/api/data/connection/NameDatabaseConnection.java deleted file mode 100644 index 408e9e8..0000000 --- a/src/main/java/com/fanruan/api/data/connection/NameDatabaseConnection.java +++ /dev/null @@ -1,4 +0,0 @@ -package com.fanruan.api.data.connection; - -public class NameDatabaseConnection extends com.fr.data.impl.NameDatabaseConnection{ -} diff --git a/src/main/java/com/fanruan/api/design/ui/component/UIPlaceholderTextField.java b/src/main/java/com/fanruan/api/design/ui/component/UIPlaceholderTextField.java index f8147ac..158c391 100644 --- a/src/main/java/com/fanruan/api/design/ui/component/UIPlaceholderTextField.java +++ b/src/main/java/com/fanruan/api/design/ui/component/UIPlaceholderTextField.java @@ -14,6 +14,10 @@ public class UIPlaceholderTextField extends PlaceholderTextField { super(); } + public UIPlaceholderTextField(int columns) { + super(columns); + } + public UIPlaceholderTextField(String placeHolder) { super(); setPlaceholder(placeHolder); diff --git a/src/main/java/com/fanruan/api/design/ui/component/UIToolbar.java b/src/main/java/com/fanruan/api/design/ui/component/UIToolbar.java index ddd8efb..d097378 100644 --- a/src/main/java/com/fanruan/api/design/ui/component/UIToolbar.java +++ b/src/main/java/com/fanruan/api/design/ui/component/UIToolbar.java @@ -1,9 +1,7 @@ package com.fanruan.api.design.ui.component; -import com.fr.design.gui.itoolbar.UIToolBarUI; - -public class UIToolbar extends com.fr.design.gui.itoolbar.UIToolbar{ - public UIToolbar(){ +public class UIToolbar extends com.fr.design.gui.itoolbar.UIToolbar { + public UIToolbar() { } diff --git a/src/main/java/com/fanruan/api/design/ui/toolbar/ToolBarDef.java b/src/main/java/com/fanruan/api/design/ui/toolbar/ToolBarDef.java new file mode 100644 index 0000000..8de1198 --- /dev/null +++ b/src/main/java/com/fanruan/api/design/ui/toolbar/ToolBarDef.java @@ -0,0 +1,36 @@ +package com.fanruan.api.design.ui.toolbar; + +import com.fanruan.api.design.ui.component.UIToolbar; +import com.fr.design.gui.itoolbar.UIToolBarUI; + +import javax.swing.*; +import java.awt.*; + +/** + * @author richie + * @version 10.0 + * Created by richie on 2019-08-30 + */ +public class ToolBarDef extends com.fr.design.menu.ToolBarDef { + + public static UIToolbar createJToolBar(final Color background) { + UIToolbar toolbar = new UIToolbar(FlowLayout.LEFT); + toolbar.setUI(new UIToolBarUI() { + @Override + public void paint(Graphics g, JComponent c) { + Graphics2D g2 = (Graphics2D) g; + g2.setColor(background); + g2.fillRect(0, 0, c.getWidth(), c.getHeight()); + } + }); + toolbar.setBorder(BorderFactory.createEmptyBorder(2, 0, 2, 0)); + return toolbar; + } + + public static UIToolbar createJToolBar() { + UIToolbar toolbar = new UIToolbar(FlowLayout.LEFT); + toolbar.setBorder(BorderFactory.createEmptyBorder(2, 0, 2, 0)); + return toolbar; + } + +} diff --git a/src/main/java/com/fanruan/api/net/CloudKit.java b/src/main/java/com/fanruan/api/net/CloudKit.java index 775ea6e..27eae54 100644 --- a/src/main/java/com/fanruan/api/net/CloudKit.java +++ b/src/main/java/com/fanruan/api/net/CloudKit.java @@ -20,7 +20,7 @@ public class CloudKit { * @param defaultSiteUrl 默认值 * @return 键对应的值,如果没有值则返回默认值 */ - public @Nullable String acquireUrlByKind(@NotNull String kind, @NotNull String defaultSiteUrl) { + public static @Nullable String acquireUrlByKind(@NotNull String kind, @NotNull String defaultSiteUrl) { return CloudCenter.getInstance().acquireUrlByKind(kind, defaultSiteUrl); } @@ -30,7 +30,7 @@ public class CloudKit { * @param kind 键 * @return 键对应的值,如果没有值则返回空 */ - public @Nullable String acquireUrlByKind(@NotNull String kind) { + public static @Nullable String acquireUrlByKind(@NotNull String kind) { return CloudCenter.getInstance().acquireUrlByKind(kind); } } diff --git a/src/main/java/com/fanruan/api/util/IOKit.java b/src/main/java/com/fanruan/api/util/IOKit.java index 5b223e7..d7b560d 100644 --- a/src/main/java/com/fanruan/api/util/IOKit.java +++ b/src/main/java/com/fanruan/api/util/IOKit.java @@ -125,6 +125,19 @@ public class IOKit { return CommonIOUtils.inputStream2String(is, charset.toString()); } + /** + * 从输入流中按指定的编码读取字符串 + * + * @param is 输入流 + * @param charset 读取字符串的编码方式 + * @return 读取出来的字符串 + * @throws UnsupportedEncodingException 编码类型不支持则抛出此异常 + */ + public static String inputStream2String(InputStream is, String charset) + throws UnsupportedEncodingException { + return CommonIOUtils.inputStream2String(is, charset); + } + /** * 将输入流转为byte数组 *

@@ -214,6 +227,7 @@ public class IOKit { /** * 关闭通道 + * * @param device 通道 */ public static void close(Channel device) { @@ -222,6 +236,7 @@ public class IOKit { /** * 关闭输出流 + * * @param stream 输出流 */ public static void close(OutputStream stream) { @@ -230,6 +245,7 @@ public class IOKit { /** * 关闭输入流 + * * @param stream 输入流 */ public static void close(InputStream stream) { diff --git a/src/test/java/com/fanruan/api/net/http/HttpKitTest.java b/src/test/java/com/fanruan/api/net/http/HttpKitTest.java index a034a4a..b038634 100644 --- a/src/test/java/com/fanruan/api/net/http/HttpKitTest.java +++ b/src/test/java/com/fanruan/api/net/http/HttpKitTest.java @@ -1,6 +1,7 @@ package com.fanruan.api.net.http; import com.fanruan.api.Prepare; +import com.fanruan.api.macro.EncodeConstants; import com.fanruan.api.net.http.rs.HttpRequest; import com.fanruan.api.net.http.rs.HttpResponseType; import com.fanruan.api.net.http.rs.StreamResponseHandle; @@ -72,6 +73,8 @@ public class HttpKitTest extends Prepare { InputStream in = HttpKit.post("https://cloud.fanruan.com/site", map, HttpResponseType.STREAM); String text = IOKit.inputStream2String(in, StandardCharsets.UTF_8); assertEquals("{\"value\":\"http://bbs.fanruan.com/\"}", text); + String text2 = IOKit.inputStream2String(in, EncodeConstants.ENCODING_UTF_8); + assertEquals("{\"value\":\"http://bbs.fanruan.com/\"}", text2); } catch (SocketTimeoutException ignore) { } catch (Exception e) { e.printStackTrace(); From 2c366e378c7051cf0d9ce900fd4fa0d76eeb9167 Mon Sep 17 00:00:00 2001 From: richie Date: Fri, 30 Aug 2019 20:55:06 +0800 Subject: [PATCH 08/13] =?UTF-8?q?=E6=9B=B4=E5=A4=9A=E7=9A=84API?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/design/work/AbstractTableDataPane.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 src/main/java/com/fanruan/api/design/work/AbstractTableDataPane.java diff --git a/src/main/java/com/fanruan/api/design/work/AbstractTableDataPane.java b/src/main/java/com/fanruan/api/design/work/AbstractTableDataPane.java new file mode 100644 index 0000000..a0bd87a --- /dev/null +++ b/src/main/java/com/fanruan/api/design/work/AbstractTableDataPane.java @@ -0,0 +1,12 @@ +package com.fanruan.api.design.work; + +import com.fr.base.TableData; + +/** + * @author richie + * @version 10.0 + * Created by richie on 2019-08-30 + * 数据插件继承此抽象类 + */ +public abstract class AbstractTableDataPane extends com.fr.design.data.tabledata.tabledatapane.AbstractTableDataPane { +} From 1a52430f4d198fd464bc61f38e5f1719bc853dcd Mon Sep 17 00:00:00 2001 From: richie Date: Sat, 31 Aug 2019 09:51:13 +0800 Subject: [PATCH 09/13] =?UTF-8?q?=E8=84=9A=E6=9C=AC=E5=85=AC=E5=BC=8FAPI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/fanruan/api/cal/FormulaKit.java | 12 ++++++++++++ .../java/com/fanruan/api/cal/FormulaKitTest.java | 15 +++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/src/main/java/com/fanruan/api/cal/FormulaKit.java b/src/main/java/com/fanruan/api/cal/FormulaKit.java index 10bb4fa..93cd52a 100644 --- a/src/main/java/com/fanruan/api/cal/FormulaKit.java +++ b/src/main/java/com/fanruan/api/cal/FormulaKit.java @@ -1,7 +1,9 @@ package com.fanruan.api.cal; import com.fanruan.api.err.KitError; +import com.fanruan.api.util.GeneralKit; import com.fr.base.BaseFormula; +import com.fr.base.ScriptFormula; import com.fr.log.FineLoggerFactory; import com.fr.script.Calculator; import com.fr.stable.FormulaProvider; @@ -58,6 +60,16 @@ public class FormulaKit { return BaseFormula.createFormulaBuilder().build(content); } + /** + * 生成脚本公式对象 + * + * @param content 公式的内容,是一段javascript脚本 + * @return 脚本公式 + */ + public @NotNull static BaseFormula newScriptFormula(Object content) { + return new ScriptFormula(GeneralKit.objectToString(content)); + } + /** * 检查公式内容合法性 * diff --git a/src/test/java/com/fanruan/api/cal/FormulaKitTest.java b/src/test/java/com/fanruan/api/cal/FormulaKitTest.java index c54ec7f..abed6cb 100644 --- a/src/test/java/com/fanruan/api/cal/FormulaKitTest.java +++ b/src/test/java/com/fanruan/api/cal/FormulaKitTest.java @@ -2,9 +2,11 @@ package com.fanruan.api.cal; import com.fanruan.api.Prepare; import com.fanruan.api.err.KitError; +import com.fr.base.BaseFormula; import com.fr.base.Formula; import com.fr.base.ParameterMapNameSpace; import com.fr.script.Calculator; +import com.fr.stable.UtilEvalError; import com.fr.stable.script.CalculatorProvider; import org.junit.Assert; import org.junit.Test; @@ -43,6 +45,19 @@ public class FormulaKitTest extends Prepare { Assert.fail(); } } + + @Test + public void testScriptFormula() { + BaseFormula formula = FormulaKit.newScriptFormula("=return Math.abs(-1)"); + CalculatorProvider provider = CalculatorKit.createCalculator(); + try { + Object r = formula.evalValue(provider); + Assert.assertEquals(1, r); + } catch (Exception e) { + e.printStackTrace(); + } + } + @Test public void testCheckFormulaContent() { assertEquals(true, FormulaKit.checkFormulaContent(new Formula(""))); From ef1ab0edaa99e0e3a87be2dfe5051523dbcfec0c Mon Sep 17 00:00:00 2001 From: richie Date: Sat, 31 Aug 2019 14:01:37 +0800 Subject: [PATCH 10/13] =?UTF-8?q?=E8=84=9A=E6=9C=AC=E5=85=AC=E5=BC=8FAPI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fanruan/api/cal/CalculatorKit.java | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/fanruan/api/cal/CalculatorKit.java b/src/main/java/com/fanruan/api/cal/CalculatorKit.java index 4a370e5..5cdfb6b 100644 --- a/src/main/java/com/fanruan/api/cal/CalculatorKit.java +++ b/src/main/java/com/fanruan/api/cal/CalculatorKit.java @@ -5,24 +5,25 @@ import com.fanruan.api.session.SessionKit; import com.fr.base.ParameterMapNameSpace; import com.fr.base.TableDataNameSpace; import com.fr.data.TableDataSource; +import com.fr.report.core.namespace.SimpleCellValueNameSpace; import com.fr.report.report.Report; import com.fr.script.Calculator; import com.fr.stable.StringUtils; import com.fr.stable.script.CalculatorProvider; import com.fr.stable.script.NameSpace; import com.fr.stable.web.SessionProvider; -import org.jetbrains.annotations.Nullable; import com.fr.web.core.ReportSessionIDInfor; import com.fr.web.core.TemplateSessionIDInfo; import com.fr.web.session.SessionIDInfo; +import org.jetbrains.annotations.Nullable; import java.util.Map; /** * @author zack - * @date 2019/8/23 * @version 10.0 * 帆软算子工具类(主要用于公式计算) + * @date 2019/8/23 */ public class CalculatorKit { /** @@ -79,9 +80,19 @@ public class CalculatorKit { /** * 返回服务器数据集的算子空间(可以通过调用calculator.pushNameSpace()将算子空间塞进算子实例,从而支持服务器数据集相关的函数计算) - * @return 算子空间对象 + * + * @return 服务器数据集名字空间 */ - public static NameSpace getServerTableDataNameSpace(){ + public static NameSpace getServerTableDataNameSpace() { return TableDataNameSpace.getInstance(); } + + /** + * 用于计算单元格的名字空间 + * + * @return 单元格名字空间 + */ + public static NameSpace createSimpleCellValueNameSpace() { + return SimpleCellValueNameSpace.getInstance(); + } } \ No newline at end of file From d6324872b060d8414f04cdbe0c3442c8c9025fc4 Mon Sep 17 00:00:00 2001 From: richie Date: Mon, 2 Sep 2019 09:20:56 +0800 Subject: [PATCH 11/13] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=87=A0=E4=B8=AA?= =?UTF-8?q?=E5=B8=B8=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fanruan/api/macro/Constants.java | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/main/java/com/fanruan/api/macro/Constants.java diff --git a/src/main/java/com/fanruan/api/macro/Constants.java b/src/main/java/com/fanruan/api/macro/Constants.java new file mode 100644 index 0000000..1663ebd --- /dev/null +++ b/src/main/java/com/fanruan/api/macro/Constants.java @@ -0,0 +1,23 @@ +package com.fanruan.api.macro; + +/** + * @author richie + * @version 10.0 + * Created by richie on 2019-09-02 + * 常量 + */ +public interface Constants { + + int CENTER = 0; + + int TOP = 1; + + + int LEFT = 2; + + + int BOTTOM = 3; + + + int RIGHT = 4; +} From fab9b6f6b08c3d7e1dc27ca2f1b242adb86d7ec5 Mon Sep 17 00:00:00 2001 From: "Mars.Ma" Date: Mon, 2 Sep 2019 14:50:04 +0800 Subject: [PATCH 12/13] =?UTF-8?q?KERNEL-1165=20=E6=96=B0=E5=A2=9E=E5=8C=85?= =?UTF-8?q?=E8=A3=85=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/fanruan/api/base/AbstractPresent.java | 7 +++++++ .../api/design/ui/container/FurtherBasicBeanPane.java | 8 ++++++++ 2 files changed, 15 insertions(+) create mode 100644 src/main/java/com/fanruan/api/base/AbstractPresent.java create mode 100644 src/main/java/com/fanruan/api/design/ui/container/FurtherBasicBeanPane.java diff --git a/src/main/java/com/fanruan/api/base/AbstractPresent.java b/src/main/java/com/fanruan/api/base/AbstractPresent.java new file mode 100644 index 0000000..4a3006b --- /dev/null +++ b/src/main/java/com/fanruan/api/base/AbstractPresent.java @@ -0,0 +1,7 @@ +package com.fanruan.api.base; + +/** + * 形态展示相关操作组件 + */ +public abstract class AbstractPresent extends com.fr.base.present.AbstractPresent { +} 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 new file mode 100644 index 0000000..3a4574f --- /dev/null +++ b/src/main/java/com/fanruan/api/design/ui/container/FurtherBasicBeanPane.java @@ -0,0 +1,8 @@ +package com.fanruan.api.design.ui.container; + +/** + * 面板操作相关组件 + * @param + */ +public abstract class FurtherBasicBeanPane extends com.fr.design.beans.FurtherBasicBeanPane { +} From a1e81537aa714686ad0c0cf6de01ee19d46717da Mon Sep 17 00:00:00 2001 From: "Mars.Ma" Date: Mon, 2 Sep 2019 15:16:02 +0800 Subject: [PATCH 13/13] =?UTF-8?q?KERNEL-1165=20=E5=B0=86=E6=A0=87=E8=AE=B0?= =?UTF-8?q?=E4=B8=BAopen=E7=9A=84=E7=B1=BB=E5=88=A0=E6=8E=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fanruan/api/base/AbstractPresent.java | 7 ------ .../ConditionAttrSingleConditionPane.java | 22 ------------------- .../ui/condition/ConditionAttributesPane.java | 4 ---- .../ui/container/FurtherBasicBeanPane.java | 8 ------- .../cell/AbstractStyleHighlightAction.java | 17 -------------- 5 files changed, 58 deletions(-) delete mode 100644 src/main/java/com/fanruan/api/base/AbstractPresent.java delete mode 100644 src/main/java/com/fanruan/api/design/ui/condition/ConditionAttrSingleConditionPane.java delete mode 100644 src/main/java/com/fanruan/api/design/ui/condition/ConditionAttributesPane.java delete mode 100644 src/main/java/com/fanruan/api/design/ui/container/FurtherBasicBeanPane.java delete mode 100644 src/main/java/com/fanruan/api/report/cell/AbstractStyleHighlightAction.java diff --git a/src/main/java/com/fanruan/api/base/AbstractPresent.java b/src/main/java/com/fanruan/api/base/AbstractPresent.java deleted file mode 100644 index 4a3006b..0000000 --- a/src/main/java/com/fanruan/api/base/AbstractPresent.java +++ /dev/null @@ -1,7 +0,0 @@ -package com.fanruan.api.base; - -/** - * 形态展示相关操作组件 - */ -public abstract class AbstractPresent extends com.fr.base.present.AbstractPresent { -} diff --git a/src/main/java/com/fanruan/api/design/ui/condition/ConditionAttrSingleConditionPane.java b/src/main/java/com/fanruan/api/design/ui/condition/ConditionAttrSingleConditionPane.java deleted file mode 100644 index 144fed8..0000000 --- a/src/main/java/com/fanruan/api/design/ui/condition/ConditionAttrSingleConditionPane.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.fanruan.api.design.ui.condition; - -import com.fr.design.condition.ConditionAttributesPane; - -public abstract class ConditionAttrSingleConditionPane extends com.fr.design.condition.ConditionAttrSingleConditionPane { - /** - * 调用父类构造函数进行初始化 - * @param conditionAttributesPane - */ - public ConditionAttrSingleConditionPane(ConditionAttributesPane conditionAttributesPane){ - super(conditionAttributesPane); - } - - /** - * 调用父类构造函数进行初始化 - * @param conditionAttributesPane - * @param var - */ - public ConditionAttrSingleConditionPane(ConditionAttributesPane conditionAttributesPane, boolean var){ - super(conditionAttributesPane, var); - } -} diff --git a/src/main/java/com/fanruan/api/design/ui/condition/ConditionAttributesPane.java b/src/main/java/com/fanruan/api/design/ui/condition/ConditionAttributesPane.java deleted file mode 100644 index a3d00d4..0000000 --- a/src/main/java/com/fanruan/api/design/ui/condition/ConditionAttributesPane.java +++ /dev/null @@ -1,4 +0,0 @@ -package com.fanruan.api.design.ui.condition; - -public abstract class ConditionAttributesPane extends com.fr.design.condition.ConditionAttributesPane { -} 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 3a4574f..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/report/cell/AbstractStyleHighlightAction.java b/src/main/java/com/fanruan/api/report/cell/AbstractStyleHighlightAction.java deleted file mode 100644 index 04028b9..0000000 --- a/src/main/java/com/fanruan/api/report/cell/AbstractStyleHighlightAction.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.fanruan.api.report.cell; - -public abstract class AbstractStyleHighlightAction extends com.fr.report.cell.cellattr.highlight.AbstractStyleHighlightAction{ - /** - * 默认构造方法 - */ - public AbstractStyleHighlightAction() { - } - - /** - * 调用父类构造方法,初始化scope属性。 - * @param scope 类属性 - */ - public AbstractStyleHighlightAction(int scope) { - super(scope); - } -}