From 9f8ff199fc524d053712ca4267d7fec949cd3968 Mon Sep 17 00:00:00 2001 From: zjz1993 <1429595365@qq.com> Date: Fri, 30 Aug 2019 14:31:44 +0800 Subject: [PATCH] =?UTF-8?q?update:=20=E4=B8=80=E4=BA=9B=E6=96=B9=E6=B3=95?= =?UTF-8?q?=E7=9A=84=E6=9B=B4=E6=96=B0=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 24 +++++++++++++++++++ .../db/redis/RedisScriptTableDataDefine.java | 4 ++-- .../redis/core/RedisDatabaseConnection.java | 8 +++---- .../db/redis/core/RedisScriptTableData.java | 6 ++--- .../plugin/db/redis/core/RedisTableData.java | 6 ++--- .../db/redis/ui/RedisConnectionPane.java | 4 ++-- .../fr/plugin/db/redis/ui/RedisQueryPane.java | 1 - .../db/redis/ui/value/FormulaEditor.java | 8 +++---- .../db/redis/ui/value/IntegerEditor.java | 4 ++-- .../db/redis/util/RedisDesignUtils.java | 4 ++-- .../fr/plugin/db/redis/util/RedisUtils.java | 4 ++-- 11 files changed, 48 insertions(+), 25 deletions(-) diff --git a/pom.xml b/pom.xml index 1a0cb21..6e911ce 100644 --- a/pom.xml +++ b/pom.xml @@ -42,4 +42,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/fr/plugin/db/redis/RedisScriptTableDataDefine.java b/src/main/java/com/fr/plugin/db/redis/RedisScriptTableDataDefine.java index 2048668..cc3f082 100644 --- a/src/main/java/com/fr/plugin/db/redis/RedisScriptTableDataDefine.java +++ b/src/main/java/com/fr/plugin/db/redis/RedisScriptTableDataDefine.java @@ -6,7 +6,7 @@ import com.fr.design.fun.ServerTableDataDefineProvider; import com.fr.design.fun.impl.AbstractTableDataDefineProvider; import com.fr.plugin.db.redis.core.RedisScriptTableData; import com.fr.plugin.db.redis.ui.RedisScriptTableDataPane; -import com.fanruan.api.design.util.I18nDesignKit; +import com.fanruan.api.i18n.I18nKit; /** * @author richie @@ -37,7 +37,7 @@ public class RedisScriptTableDataDefine extends AbstractTableDataDefineProvider @Override public String nameForTableData() { - return I18nDesignKit.i18nText("Plugin-Redis_Script_Table_Data"); + return I18nKit.getLocText("Plugin-Redis_Script_Table_Data"); } @Override diff --git a/src/main/java/com/fr/plugin/db/redis/core/RedisDatabaseConnection.java b/src/main/java/com/fr/plugin/db/redis/core/RedisDatabaseConnection.java index 7343ea0..39b6962 100755 --- a/src/main/java/com/fr/plugin/db/redis/core/RedisDatabaseConnection.java +++ b/src/main/java/com/fr/plugin/db/redis/core/RedisDatabaseConnection.java @@ -1,10 +1,10 @@ package com.fr.plugin.db.redis.core; import cpm.fanruan.api.conf.HolderKit; -import com.fr.config.holder.impl.ColConf; +import com.fanruan.api.conf.impl.ColConf; import com.fr.data.impl.AbstractDatabaseConnection; import com.fr.data.impl.Connection; -import com.fanruan.api.design.util.I18nDesignKit; +import com.fanruan.api.i18n.I18nKit; import com.fr.plugin.db.redis.core.emb.Redis; import com.fanruan.api.security.SecurityKit; import com.fanruan.api.util.ArrayKit; @@ -95,9 +95,9 @@ public class RedisDatabaseConnection extends AbstractDatabaseConnection { @Override public String connectMessage(boolean status) { if (status) { - return I18nDesignKit.i18nText("Plugin-Redis_Connection_Successfully") + "!"; + return I18nKit.getLocText("Plugin-Redis_Connection_Successfully") + "!"; } else { - return I18nDesignKit.i18nText("Plugin-Redis_Connection_Failed") + "!"; + return I18nKit.getLocText("Plugin-Redis_Connection_Failed") + "!"; } } diff --git a/src/main/java/com/fr/plugin/db/redis/core/RedisScriptTableData.java b/src/main/java/com/fr/plugin/db/redis/core/RedisScriptTableData.java index 243462f..fbce027 100644 --- a/src/main/java/com/fr/plugin/db/redis/core/RedisScriptTableData.java +++ b/src/main/java/com/fr/plugin/db/redis/core/RedisScriptTableData.java @@ -5,7 +5,7 @@ import com.fr.base.TableData; import com.fanruan.api.conf.HolderKit; import com.fr.config.holder.factory.XmlHolders; import com.fr.data.AbstractParameterTableData; -import com.fanruan.api.database.DatabaseKit; +import com.fanruan.api.xml.XmlKit; import com.fr.data.impl.Connection; import com.fanruan.api.database.nameDatabase.NameDatabaseConnection; import com.fanruan.api.data.ConnectionKit; @@ -106,7 +106,7 @@ public class RedisScriptTableData extends AbstractParameterTableData { } } else if (com.fr.data.impl.Connection.XML_TAG.equals(tmpName)) { if (reader.getAttrAsString("class", null) != null) { - com.fr.data.impl.Connection con = DatabaseKit.readXMLConnection(reader); + com.fr.data.impl.Connection con = XmlKit.readXMLConnection(reader); this.setDatabase(con); } } else if ("Script".equals(tmpName)) { @@ -123,7 +123,7 @@ public class RedisScriptTableData extends AbstractParameterTableData { super.writeXML(writer); XmlKit.writeXMLable(writer, dbIndex.get(), OrderValue.XML_TAG); if (this.database.get() != null) { - DatabaseKit.writeXMLConnection(writer, this.database.get()); + XmlKit.writeXMLConnection(writer, this.database.get()); } writer.startTAG("Script").textNode(getScript()).end(); } diff --git a/src/main/java/com/fr/plugin/db/redis/core/RedisTableData.java b/src/main/java/com/fr/plugin/db/redis/core/RedisTableData.java index 3942354..a5b2734 100644 --- a/src/main/java/com/fr/plugin/db/redis/core/RedisTableData.java +++ b/src/main/java/com/fr/plugin/db/redis/core/RedisTableData.java @@ -5,7 +5,7 @@ import com.fr.base.TableData; import com.fanruan.api.conf.HolderKit; import com.fr.config.holder.factory.XmlHolders; import com.fr.data.AbstractParameterTableData; -import com.fanruan.api.database.DatabaseKit; +import com.fanruan.api.xml.XmlKit; import com.fr.data.impl.Connection; import com.fanruan.api.database.nameDatabase.NameDatabaseConnection; import com.fanruan.api.data.ConnectionKit; @@ -118,7 +118,7 @@ public class RedisTableData extends AbstractParameterTableData { } } else if (com.fr.data.impl.Connection.XML_TAG.equals(tmpName)) { if (reader.getAttrAsString("class", null) != null) { - com.fr.data.impl.Connection con = DatabaseKit.readXMLConnection(reader); + com.fr.data.impl.Connection con = XmlKit.readXMLConnection(reader); this.setDatabase(con); } } else if ("Query".equals(tmpName)) { @@ -140,7 +140,7 @@ public class RedisTableData extends AbstractParameterTableData { super.writeXML(writer); XmlKit.writeXMLable(writer, dbIndex.get(), OrderValue.XML_TAG); if (this.database.get() != null) { - DatabaseKit.writeXMLConnection(writer, this.database.get()); + XmlKit.writeXMLConnection(writer, this.database.get()); } writer.startTAG("Query").textNode(getQuery()).end(); writer.startTAG("Script").textNode(getScript()).end(); diff --git a/src/main/java/com/fr/plugin/db/redis/ui/RedisConnectionPane.java b/src/main/java/com/fr/plugin/db/redis/ui/RedisConnectionPane.java index eb3100b..ae7aa89 100755 --- a/src/main/java/com/fr/plugin/db/redis/ui/RedisConnectionPane.java +++ b/src/main/java/com/fr/plugin/db/redis/ui/RedisConnectionPane.java @@ -11,7 +11,7 @@ import com.fanruan.api.design.ui.component.UIIntNumberField; import com.fanruan.api.design.ui.component.UINumberField; import com.fanruan.api.design.ui.component.UITextField; import com.fanruan.api.design.DesignKit; -import com.fr.design.layout.FRGUIPaneFactory; +import com.fanruan.api.design.util.GUICoreKit; import com.fanruan.api.design.ui.layout.TableLayoutKit; import com.fanruan.api.design.util.GUICoreKit; import com.fr.plugin.db.redis.core.RedisDatabaseConnection; @@ -108,7 +108,7 @@ public class RedisConnectionPane extends DatabaseConnectionPane { if (formula != null) { this.orderValue = formula; } - this.setLayout(FRGUIPaneFactory.createBorderLayout()); + this.setLayout(GUICoreKit.createBorderLayout()); - JPanel editPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); + JPanel editPane = GUICoreKit.createBorderLayoutPane(); currentTextField = new UITextField(28); currentTextField.setText(this.orderValue.getValue().getContent()); diff --git a/src/main/java/com/fr/plugin/db/redis/ui/value/IntegerEditor.java b/src/main/java/com/fr/plugin/db/redis/ui/value/IntegerEditor.java index 076431c..38536b3 100644 --- a/src/main/java/com/fr/plugin/db/redis/ui/value/IntegerEditor.java +++ b/src/main/java/com/fr/plugin/db/redis/ui/value/IntegerEditor.java @@ -4,7 +4,7 @@ import com.fanruan.api.util.GeneralKit; import com.fanruan.api.design.ui.editor.Editor; import com.fanruan.api.design.ui.component.UIIntNumberField; import com.fanruan.api.design.ui.component.UITextField; -import com.fr.design.layout.FRGUIPaneFactory; +import com.fanruan.api.design.util.GUICoreKit; import com.fr.plugin.db.redis.core.order.impl.NumberOrderValue; import com.fr.stable.StringUtils; @@ -32,7 +32,7 @@ public class IntegerEditor extends Editor { * Constructor. */ public IntegerEditor(NumberOrderValue value, String name) { - this.setLayout(FRGUIPaneFactory.createBorderLayout()); + this.setLayout(GUICoreKit.createBorderLayout()); numberField = new UIIntNumberField(); this.add(numberField, BorderLayout.CENTER); this.numberField.addKeyListener(textKeyListener); diff --git a/src/main/java/com/fr/plugin/db/redis/util/RedisDesignUtils.java b/src/main/java/com/fr/plugin/db/redis/util/RedisDesignUtils.java index 936a265..f639b24 100644 --- a/src/main/java/com/fr/plugin/db/redis/util/RedisDesignUtils.java +++ b/src/main/java/com/fr/plugin/db/redis/util/RedisDesignUtils.java @@ -1,7 +1,7 @@ package com.fr.plugin.db.redis.util; -import com.fr.design.border.UIRoundedBorder; -import com.fr.design.constants.UIConstants; +import com.fanruan.api.design.ui.component.UIRoundedBorder; +import com.fanruan.api.design.macro.UIConstants; import com.fanruan.api.design.ui.component.code.UISyntaxTextArea; import com.fanruan.api.design.ui.component.code.UISyntaxTextScrollPane; diff --git a/src/main/java/com/fr/plugin/db/redis/util/RedisUtils.java b/src/main/java/com/fr/plugin/db/redis/util/RedisUtils.java index 48f1e24..035a66b 100644 --- a/src/main/java/com/fr/plugin/db/redis/util/RedisUtils.java +++ b/src/main/java/com/fr/plugin/db/redis/util/RedisUtils.java @@ -4,7 +4,7 @@ import com.eclipsesource.v8.V8Object; import com.fr.stable.ParameterProvider; import com.fanruan.api.util.RenderKit; import com.fr.plugin.db.redis.help.ScriptBridge; -import com.fr.stable.ArrayUtils; +import com.fanruan.api.util.ArrayKit; import com.fr.third.redis.clients.jedis.Jedis; import java.lang.reflect.Method; @@ -27,7 +27,7 @@ public class RedisUtils { } public static String calculateQuery(String query, Parameter[] ps) { - if (ArrayUtils.isEmpty(ps)) { + if (ArrayKit.isEmpty(ps)) { return query; } Map map = new HashMap();