Browse Source

feat: ui组件的补充

remotes/1611766341912730171/master
zjz1993 5 years ago
parent
commit
c3e1eca726
  1. 24
      pom.xml
  2. 16
      src/main/java/com/fanruan/api/data/ConnectionKit.java
  3. 26
      src/main/java/com/fanruan/api/database/DatabaseKit.java
  4. 4
      src/main/java/com/fanruan/api/database/nameDatabase/NameDatabaseConnection.java
  5. 4
      src/main/java/com/fanruan/api/design/ui/component/UIDescriptionTextArea.java
  6. 17
      src/main/java/com/fanruan/api/design/ui/component/UIToolbar.java
  7. 4
      src/main/java/com/fanruan/api/design/ui/container/BasicBeanPane.java
  8. 36
      src/main/java/com/fanruan/api/design/ui/container/BasicDialog.java
  9. 9
      src/main/java/com/fanruan/api/design/ui/container/ConnectionComboBoxPanel.java
  10. 7
      src/main/java/com/fanruan/api/design/ui/container/DatabaseConnectionPane.java
  11. 8
      src/main/java/com/fanruan/api/design/ui/container/DialogActionAdapter.java
  12. 11
      src/main/java/com/fanruan/api/design/ui/container/SQLEditPane.java
  13. 5
      src/main/java/com/fanruan/api/design/ui/editor/Editor.java
  14. 4
      src/main/java/com/fanruan/api/redis/RedisKit.java
  15. 4
      src/main/java/com/fanruan/api/redis/pool/JedisPool.java
  16. 5
      src/main/java/com/fanruan/api/redis/pool/JedisPoolConfig.java
  17. 26
      src/main/java/com/fanruan/api/xml/XmlKit.java

24
pom.xml

@ -168,4 +168,28 @@
</resource>
</resources>
</build>
<repositories>
<repository>
<id>fanruan</id>
<name>fanruan</name>
<url>http://mvn.finedevelop.com/repository/maven-public/</url>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
<checksumPolicy>warn</checksumPolicy>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>fanruan</id>
<name>fanruan</name>
<url>http://mvn.finedevelop.com/repository/maven-public/</url>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
<checksumPolicy>warn</checksumPolicy>
</snapshots>
</pluginRepository>
</pluginRepositories>
</project>

16
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 extends Connection> T getConnection(String name, Class<? extends Connection> type) {
return DatasourceManager.getInstance().getConnection(name, type);
}
}

26
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);
}
}

4
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{
}

4
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{
}

17
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);
}
}

4
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{
}

36
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(){
}
}

9
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<? extends Connection> cls) {
super(cls);
}
}

7
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{
}

8
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(){
}
}

11
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);
}
}

5
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{
}

4
src/main/java/com/fanruan/api/redis/RedisKit.java

@ -0,0 +1,4 @@
package com.fanruan.api.redis;
public class RedisKit {
}

4
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{
}

5
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{
}

26
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);
}
}

Loading…
Cancel
Save