From 7ebe98c9f987ea9ec39137742e012d4c8baba69d Mon Sep 17 00:00:00 2001 From: zjz1993 <1429595365@qq.com> Date: Fri, 30 Aug 2019 11:38:57 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=B8=80=E4=BA=9Bui=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E7=9A=84finekit=E5=8C=96=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fanruan/api/design/macro/UIConstants.java | 8 ++++++ .../design/ui/component/UIRoundedBorder.java | 20 ++++++++++++++ .../api/design/ui/factory/FormulaFactory.java | 4 +++ .../fanruan/api/design/util/GUICoreKit.java | 17 ++++++++++++ src/main/java/com/fanruan/api/xml/XmlKit.java | 27 ++++++++++++++----- 5 files changed, 69 insertions(+), 7 deletions(-) create mode 100644 src/main/java/com/fanruan/api/design/macro/UIConstants.java create mode 100644 src/main/java/com/fanruan/api/design/ui/component/UIRoundedBorder.java create mode 100644 src/main/java/com/fanruan/api/design/ui/factory/FormulaFactory.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 new file mode 100644 index 0000000..613600f --- /dev/null +++ b/src/main/java/com/fanruan/api/design/macro/UIConstants.java @@ -0,0 +1,8 @@ +package com.fanruan.api.design.macro; + +import java.awt.*; + +public class UIConstants { + Color UIPOPUPMENU_LINE_COLOR = new Color(13158861); + int ARC = 0; +} 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 new file mode 100644 index 0000000..8c393ab --- /dev/null +++ b/src/main/java/com/fanruan/api/design/ui/component/UIRoundedBorder.java @@ -0,0 +1,20 @@ +package com.fanruan.api.design.ui.component; +import java.awt.*; + +public class UIRoundedBorder extends com.fr.design.border.UIRoundedBorder{ + public UIRoundedBorder(Color color){ + super(color); + } + + public UIRoundedBorder(Color color, int thickness) { + super(color, thickness); + } + + public UIRoundedBorder(Color color, int thickness, int roundedCorners) { + super(color, thickness, roundedCorners); + } + + public UIRoundedBorder(int lineStyle, Color color, int roundedCorners) { + super(lineStyle, color, roundedCorners); + } +} diff --git a/src/main/java/com/fanruan/api/design/ui/factory/FormulaFactory.java b/src/main/java/com/fanruan/api/design/ui/factory/FormulaFactory.java new file mode 100644 index 0000000..fb5ce9f --- /dev/null +++ b/src/main/java/com/fanruan/api/design/ui/factory/FormulaFactory.java @@ -0,0 +1,4 @@ +package com.fanruan.api.design.ui.factory; + +public class FormulaFactory extends com.fr.design.formula.FormulaFactory{ +} 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 06ffb95..226db88 100644 --- a/src/main/java/com/fanruan/api/design/util/GUICoreKit.java +++ b/src/main/java/com/fanruan/api/design/util/GUICoreKit.java @@ -1,6 +1,7 @@ package com.fanruan.api.design.util; import com.fr.design.utils.gui.GUICoreUtils; +import com.fr.design.layout.FRGUIPaneFactory; import javax.swing.*; import java.awt.*; @@ -99,4 +100,20 @@ 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 createNormalFlowInnerContainer_M_Pane(){ + return FRGUIPaneFactory.createNormalFlowInnerContainer_M_Pane(); + } + /** + * 创建边框面板S + * + * @return 返回一个JPanel对象 + */ + public static JPanel createBorderLayout_S_Pane(){ + return FRGUIPaneFactory.createBorderLayout_S_Pane(); + } } diff --git a/src/main/java/com/fanruan/api/xml/XmlKit.java b/src/main/java/com/fanruan/api/xml/XmlKit.java index 37efb56..921739f 100644 --- a/src/main/java/com/fanruan/api/xml/XmlKit.java +++ b/src/main/java/com/fanruan/api/xml/XmlKit.java @@ -1,11 +1,9 @@ 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; @@ -44,6 +42,21 @@ 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); + } + /** + * 写connection对象 + * @param writer XMLPrintWriter对象 + * @param connection Connection对象 + */ + public static void writeXMLConnection(XMLPrintWriter writer, Connection connection) { + DataCoreXmlUtils.writeXMLConnection(writer, connection); + } }