|
|
@ -1,18 +1,17 @@ |
|
|
|
package com.fr.plugin.db.redis.ui; |
|
|
|
package com.fr.plugin.db.redis.ui; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.fanruan.api.design.DesignKit; |
|
|
|
|
|
|
|
import com.fanruan.api.design.ui.component.UIActionLabel; |
|
|
|
|
|
|
|
import com.fanruan.api.design.ui.component.UILabel; |
|
|
|
|
|
|
|
import com.fanruan.api.design.ui.component.code.SyntaxConstants; |
|
|
|
|
|
|
|
import com.fanruan.api.design.ui.component.code.UISyntaxTextArea; |
|
|
|
import com.fanruan.api.design.ui.container.BasicPane; |
|
|
|
import com.fanruan.api.design.ui.container.BasicPane; |
|
|
|
import com.fanruan.api.layout.TableLayoutKit; |
|
|
|
import com.fanruan.api.design.ui.editor.ValueEditorPane; |
|
|
|
|
|
|
|
import com.fanruan.api.design.ui.layout.TableLayoutKit; |
|
|
|
import com.fanruan.api.design.util.GUICoreKit; |
|
|
|
import com.fanruan.api.design.util.GUICoreKit; |
|
|
|
import com.fanruan.api.log.LogKit; |
|
|
|
import com.fanruan.api.log.LogKit; |
|
|
|
import com.fanruan.api.design.container.SQLEditPane; |
|
|
|
|
|
|
|
import com.fanruan.api.design.ui.editor.ValueEditorPane; |
|
|
|
|
|
|
|
import com.fanruan.api.design.component.UIActionLabel; |
|
|
|
|
|
|
|
import com.fanruan.api.design.ui.component.UILabel; |
|
|
|
|
|
|
|
import com.fr.design.gui.itextarea.DescriptionTextArea; |
|
|
|
|
|
|
|
import com.fanruan.api.design.ui.component.code.UISyntaxTextArea; |
|
|
|
|
|
|
|
import com.fanruan.api.design.ui.component.code.SyntaxConstants; |
|
|
|
|
|
|
|
import com.fanruan.api.design.DesignKit; |
|
|
|
|
|
|
|
import com.fanruan.api.net.CloudKit; |
|
|
|
import com.fanruan.api.net.CloudKit; |
|
|
|
|
|
|
|
import com.fr.design.gui.itextarea.DescriptionTextArea; |
|
|
|
import com.fr.plugin.db.redis.core.order.OrderValue; |
|
|
|
import com.fr.plugin.db.redis.core.order.OrderValue; |
|
|
|
import com.fr.plugin.db.redis.ui.value.IndexValuePaneFactory; |
|
|
|
import com.fr.plugin.db.redis.ui.value.IndexValuePaneFactory; |
|
|
|
import com.fr.plugin.db.redis.util.RedisDesignUtils; |
|
|
|
import com.fr.plugin.db.redis.util.RedisDesignUtils; |
|
|
@ -26,14 +25,14 @@ import java.net.URI; |
|
|
|
|
|
|
|
|
|
|
|
public class RedisQueryPane extends BasicPane { |
|
|
|
public class RedisQueryPane extends BasicPane { |
|
|
|
|
|
|
|
|
|
|
|
private SQLEditPane sqlTextPane; |
|
|
|
private UISyntaxTextArea sqlTextPane; |
|
|
|
private ValueEditorPane dbIndexEditor; |
|
|
|
private ValueEditorPane dbIndexEditor; |
|
|
|
private UISyntaxTextArea scriptTextPane; |
|
|
|
private UISyntaxTextArea scriptTextPane; |
|
|
|
|
|
|
|
|
|
|
|
public RedisQueryPane() { |
|
|
|
public RedisQueryPane() { |
|
|
|
setLayout(new BorderLayout()); |
|
|
|
setLayout(new BorderLayout()); |
|
|
|
|
|
|
|
|
|
|
|
sqlTextPane = new SQLEditPane(); |
|
|
|
sqlTextPane = new UISyntaxTextArea(); |
|
|
|
|
|
|
|
|
|
|
|
scriptTextPane = new UISyntaxTextArea(); |
|
|
|
scriptTextPane = new UISyntaxTextArea(); |
|
|
|
|
|
|
|
|
|
|
@ -60,20 +59,16 @@ public class RedisQueryPane extends BasicPane { |
|
|
|
Component[][] coms = new Component[][]{ |
|
|
|
Component[][] coms = new Component[][]{ |
|
|
|
{new UILabel(DesignKit.i18nText("Plugin-Redis_DB_Index") + ":"), dbIndexEditor}, |
|
|
|
{new UILabel(DesignKit.i18nText("Plugin-Redis_DB_Index") + ":"), dbIndexEditor}, |
|
|
|
{GUICoreKit.createBorderLayoutPane(new UILabel(DesignKit.i18nText("Plugin-Redis_Query_Condition") + ":"), BorderLayout.NORTH), |
|
|
|
{GUICoreKit.createBorderLayoutPane(new UILabel(DesignKit.i18nText("Plugin-Redis_Query_Condition") + ":"), BorderLayout.NORTH), |
|
|
|
RedisDesignUtils.createConditionTextPane(sqlTextPane, SyntaxConstants.SYNTAX_STYLE_SQL, 300)} |
|
|
|
RedisDesignUtils.createConditionTextPane(sqlTextPane, SyntaxConstants.SYNTAX_STYLE_NONE, 300)} |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
// {GUICoreUtils.createBorderLayoutPane(new UILabel(Toolkit.i18nText("Plugin-Redis_Script_Text") + ":"), BorderLayout.NORTH),
|
|
|
|
|
|
|
|
// RedisDesignUtils.createConditionTextPane(scriptTextPane, SyntaxConstants.SYNTAX_STYLE_JAVASCRIPT, 200)
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
double p = TableLayoutKit.PREFERRED; |
|
|
|
double p = TableLayoutKit.PREFERRED; |
|
|
|
double f = TableLayoutKit.FILL; |
|
|
|
double f = TableLayoutKit.FILL; |
|
|
|
|
|
|
|
|
|
|
|
double[] rowSize = {p, p}; |
|
|
|
double[] rowSize = {p, p}; |
|
|
|
double[] columnSize = {p, f}; |
|
|
|
double[] columnSize = {p, f}; |
|
|
|
|
|
|
|
|
|
|
|
add(GUICoreKit.createTableLayoutPane(coms, rowSize, columnSize)); |
|
|
|
add(TableLayoutKit.createTableLayoutPane(coms, rowSize, columnSize)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|