From c3e1eca726685a431cb87bb997e3b18f627acd05 Mon Sep 17 00:00:00 2001 From: zjz1993 <1429595365@qq.com> Date: Thu, 29 Aug 2019 16:39:10 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20ui=E7=BB=84=E4=BB=B6=E7=9A=84=E8=A1=A5?= =?UTF-8?q?=E5=85=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 24 +++++++++++++ .../com/fanruan/api/data/ConnectionKit.java | 16 +++++++++ .../com/fanruan/api/database/DatabaseKit.java | 26 ++++++++++++++ .../nameDatabase/NameDatabaseConnection.java | 4 +++ .../ui/component/UIDescriptionTextArea.java | 4 +++ .../api/design/ui/component/UIToolbar.java | 17 +++++++++ .../design/ui/container/BasicBeanPane.java | 4 +++ .../api/design/ui/container/BasicDialog.java | 36 +++++++++++++++++++ .../ui/container/ConnectionComboBoxPanel.java | 9 +++++ .../ui/container/DatabaseConnectionPane.java | 7 ++++ .../ui/container/DialogActionAdapter.java | 8 +++++ .../api/design/ui/container/SQLEditPane.java | 11 ++++++ .../fanruan/api/design/ui/editor/Editor.java | 5 +++ .../java/com/fanruan/api/redis/RedisKit.java | 4 +++ .../com/fanruan/api/redis/pool/JedisPool.java | 4 +++ .../api/redis/pool/JedisPoolConfig.java | 5 +++ src/main/java/com/fanruan/api/xml/XmlKit.java | 26 +++++++++++--- 17 files changed, 206 insertions(+), 4 deletions(-) create mode 100644 src/main/java/com/fanruan/api/data/ConnectionKit.java create mode 100644 src/main/java/com/fanruan/api/database/DatabaseKit.java create mode 100644 src/main/java/com/fanruan/api/database/nameDatabase/NameDatabaseConnection.java create mode 100644 src/main/java/com/fanruan/api/design/ui/component/UIDescriptionTextArea.java create mode 100644 src/main/java/com/fanruan/api/design/ui/component/UIToolbar.java create mode 100644 src/main/java/com/fanruan/api/design/ui/container/BasicBeanPane.java create mode 100644 src/main/java/com/fanruan/api/design/ui/container/BasicDialog.java create mode 100644 src/main/java/com/fanruan/api/design/ui/container/ConnectionComboBoxPanel.java create mode 100644 src/main/java/com/fanruan/api/design/ui/container/DatabaseConnectionPane.java create mode 100644 src/main/java/com/fanruan/api/design/ui/container/DialogActionAdapter.java create mode 100644 src/main/java/com/fanruan/api/design/ui/container/SQLEditPane.java create mode 100644 src/main/java/com/fanruan/api/design/ui/editor/Editor.java create mode 100644 src/main/java/com/fanruan/api/redis/RedisKit.java create mode 100644 src/main/java/com/fanruan/api/redis/pool/JedisPool.java create mode 100644 src/main/java/com/fanruan/api/redis/pool/JedisPoolConfig.java diff --git a/pom.xml b/pom.xml index 10510ae..61f3b48 100644 --- a/pom.xml +++ b/pom.xml @@ -168,4 +168,28 @@ + + + fanruan + fanruan + http://mvn.finedevelop.com/repository/maven-public/ + + true + always + warn + + + + + + fanruan + fanruan + http://mvn.finedevelop.com/repository/maven-public/ + + true + always + warn + + + \ No newline at end of file diff --git a/src/main/java/com/fanruan/api/data/ConnectionKit.java b/src/main/java/com/fanruan/api/data/ConnectionKit.java new file mode 100644 index 0000000..e670505 --- /dev/null +++ b/src/main/java/com/fanruan/api/data/ConnectionKit.java @@ -0,0 +1,16 @@ +package com.fanruan.api.data; +import com.fr.data.impl.Connection; +import com.fr.file.DatasourceManager; + +public class ConnectionKit { + /** + * 获取指定名字和指定类型的数据连接 + * @param name 数据连接的名字 + * @param type 类型 + * @return 数据连接 + * + */ + public T getConnection(String name, Class type) { + return DatasourceManager.getInstance().getConnection(name, type); + } +} diff --git a/src/main/java/com/fanruan/api/database/DatabaseKit.java b/src/main/java/com/fanruan/api/database/DatabaseKit.java new file mode 100644 index 0000000..387e46f --- /dev/null +++ b/src/main/java/com/fanruan/api/database/DatabaseKit.java @@ -0,0 +1,26 @@ +package com.fanruan.api.database; +import com.fr.data.core.DataCoreXmlUtils; +import com.fr.data.impl.Connection; +import com.fr.stable.xml.XMLPrintWriter; +import com.fr.stable.xml.XMLableReader; +import com.fr.file.DatasourceManager; + +public class DatabaseKit { + /** + * 读取connection对象 + * @param reader XMLableReader对象 + * @return Connection对象 + * + */ + public static Connection readXMLConnectionMap(XMLableReader reader) { + return DataCoreXmlUtils.readXMLConnectionMap(reader); + } + /** + * 写connection对象 + * @param writer XMLPrintWriter对象 + * @param connection Connection对象 + */ + public static void writeXMLConnection(XMLPrintWriter writer, Connection connection) { + DataCoreXmlUtils.writeXMLConnection(writer, connection); + } +} diff --git a/src/main/java/com/fanruan/api/database/nameDatabase/NameDatabaseConnection.java b/src/main/java/com/fanruan/api/database/nameDatabase/NameDatabaseConnection.java new file mode 100644 index 0000000..6a4a23e --- /dev/null +++ b/src/main/java/com/fanruan/api/database/nameDatabase/NameDatabaseConnection.java @@ -0,0 +1,4 @@ +package com.fanruan.api.database.nameDatabase; + +public class NameDatabaseConnection extends com.fr.data.impl.NameDatabaseConnection{ +} diff --git a/src/main/java/com/fanruan/api/design/ui/component/UIDescriptionTextArea.java b/src/main/java/com/fanruan/api/design/ui/component/UIDescriptionTextArea.java new file mode 100644 index 0000000..9cf38e8 --- /dev/null +++ b/src/main/java/com/fanruan/api/design/ui/component/UIDescriptionTextArea.java @@ -0,0 +1,4 @@ +package com.fanruan.api.design.ui.component; + +public class UIDescriptionTextArea extends com.fr.design.gui.itextarea.DescriptionTextArea{ +} 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 new file mode 100644 index 0000000..8d73e6d --- /dev/null +++ b/src/main/java/com/fanruan/api/design/ui/component/UIToolbar.java @@ -0,0 +1,17 @@ +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 UIToolbar(int align) { + super(align); + } + + public UIToolbar(int align, UIToolBarUI uiToolBarUI) { + super(align, uiToolBarUI); + } +} 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 new file mode 100644 index 0000000..ec72cbf --- /dev/null +++ b/src/main/java/com/fanruan/api/design/ui/container/BasicBeanPane.java @@ -0,0 +1,4 @@ +package com.fanruan.api.design.ui.container; + +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 new file mode 100644 index 0000000..5a65107 --- /dev/null +++ b/src/main/java/com/fanruan/api/design/ui/container/BasicDialog.java @@ -0,0 +1,36 @@ +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){ + super(parent); + } + + public BasicDialog(Dialog parent, BasicPane pane){ + super(parent, pane); + } + + public BasicDialog(Dialog parent, BasicPane pane, boolean isNeedButton){ + super(parent, pane, isNeedButton); + } + + public BasicDialog(Frame parent){ + super(parent); + } + + public BasicDialog(Frame parent, BasicPane pane){ + super(parent, pane); + } + + public BasicDialog(Frame parent, BasicPane pane, boolean isNedButtonPane){ + super(parent, pane, isNedButtonPane); + } + + @Override + public void checkValid(){ + + } +} diff --git a/src/main/java/com/fanruan/api/design/ui/container/ConnectionComboBoxPanel.java b/src/main/java/com/fanruan/api/design/ui/container/ConnectionComboBoxPanel.java new file mode 100644 index 0000000..f37bc44 --- /dev/null +++ b/src/main/java/com/fanruan/api/design/ui/container/ConnectionComboBoxPanel.java @@ -0,0 +1,9 @@ +package com.fanruan.api.design.ui.container; + +import com.fr.data.impl.Connection; + +public class ConnectionComboBoxPanel extends com.fr.design.data.datapane.connect.ConnectionComboBoxPanel{ + public ConnectionComboBoxPanel(Class cls) { + super(cls); + } +} diff --git a/src/main/java/com/fanruan/api/design/ui/container/DatabaseConnectionPane.java b/src/main/java/com/fanruan/api/design/ui/container/DatabaseConnectionPane.java new file mode 100644 index 0000000..15282d8 --- /dev/null +++ b/src/main/java/com/fanruan/api/design/ui/container/DatabaseConnectionPane.java @@ -0,0 +1,7 @@ +package com.fanruan.api.design.ui.container; + + +import javax.swing.*; +public abstract class DatabaseConnectionPane extends com.fr.design.data.datapane.connect.DatabaseConnectionPane{ + +} 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 new file mode 100644 index 0000000..c7a5db5 --- /dev/null +++ b/src/main/java/com/fanruan/api/design/ui/container/DialogActionAdapter.java @@ -0,0 +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(){ + + } +} diff --git a/src/main/java/com/fanruan/api/design/ui/container/SQLEditPane.java b/src/main/java/com/fanruan/api/design/ui/container/SQLEditPane.java new file mode 100644 index 0000000..32677bf --- /dev/null +++ b/src/main/java/com/fanruan/api/design/ui/container/SQLEditPane.java @@ -0,0 +1,11 @@ +package com.fanruan.api.design.ui.container; + +public class SQLEditPane extends com.fr.design.data.datapane.sqlpane.SQLEditPane{ + public SQLEditPane(){ + + } + + public SQLEditPane(boolean requestDroptarget) { + super(requestDroptarget); + } +} diff --git a/src/main/java/com/fanruan/api/design/ui/editor/Editor.java b/src/main/java/com/fanruan/api/design/ui/editor/Editor.java new file mode 100644 index 0000000..7ac8f68 --- /dev/null +++ b/src/main/java/com/fanruan/api/design/ui/editor/Editor.java @@ -0,0 +1,5 @@ +package com.fanruan.api.design.ui.editor; + +public abstract class Editor extends com.fr.design.editor.editor.Editor{ + +} diff --git a/src/main/java/com/fanruan/api/redis/RedisKit.java b/src/main/java/com/fanruan/api/redis/RedisKit.java new file mode 100644 index 0000000..3a53b5d --- /dev/null +++ b/src/main/java/com/fanruan/api/redis/RedisKit.java @@ -0,0 +1,4 @@ +package com.fanruan.api.redis; + +public class RedisKit { +} diff --git a/src/main/java/com/fanruan/api/redis/pool/JedisPool.java b/src/main/java/com/fanruan/api/redis/pool/JedisPool.java new file mode 100644 index 0000000..72cf69e --- /dev/null +++ b/src/main/java/com/fanruan/api/redis/pool/JedisPool.java @@ -0,0 +1,4 @@ +package com.fanruan.api.redis.pool; + +public class JedisPool extends com.fr.third.redis.clients.jedis.JedisPool{ +} diff --git a/src/main/java/com/fanruan/api/redis/pool/JedisPoolConfig.java b/src/main/java/com/fanruan/api/redis/pool/JedisPoolConfig.java new file mode 100644 index 0000000..ae57a51 --- /dev/null +++ b/src/main/java/com/fanruan/api/redis/pool/JedisPoolConfig.java @@ -0,0 +1,5 @@ +package com.fanruan.api.redis.pool; +import com.fr.ssh.jsch.Session; + +public class JedisPoolConfig extends com.fr.third.redis.clients.jedis.JedisPoolConfig{ +} diff --git a/src/main/java/com/fanruan/api/xml/XmlKit.java b/src/main/java/com/fanruan/api/xml/XmlKit.java index 548b788..610eb5f 100644 --- a/src/main/java/com/fanruan/api/xml/XmlKit.java +++ b/src/main/java/com/fanruan/api/xml/XmlKit.java @@ -1,9 +1,7 @@ package com.fanruan.api.xml; -import com.fr.stable.xml.XMLReadable; -import com.fr.stable.xml.XMLTools; -import com.fr.stable.xml.XMLableReader; -import com.fr.stable.xml.XMLPrintWriter; +import com.fr.stable.xml.*; +import com.fr.general.xml.GeneralXMLTools; import java.io.InputStream; @@ -17,4 +15,24 @@ public class XmlKit { public static void readInputStreamXML(XMLReadable xmlReadable, InputStream inputStream) throws Exception { XMLTools.readInputStreamXML(xmlReadable, inputStream); } + /** + * 从输入源中读取xml + * @param reader 输入源 + * @return xml文件 + * + */ + public static XMLable readXMLable(XMLableReader reader) { + return GeneralXMLTools.readXMLable(reader); + } + /** + * 写XMLable + * @param writer 输出源 + * @param xml xml文件 + * @param tagName 标签名 + * @return 节点名 + * + */ + public static void writeXMLable(XMLPrintWriter writer, XMLable xml, String tagName) { + GeneralXMLTools.writeXMLable(writer, xml, tagName); + } }