Browse Source

feat: 一些ui组件的finekit化。

remotes/1611766341912730171/master
zjz1993 5 years ago
parent
commit
7ebe98c9f9
  1. 8
      src/main/java/com/fanruan/api/design/macro/UIConstants.java
  2. 20
      src/main/java/com/fanruan/api/design/ui/component/UIRoundedBorder.java
  3. 4
      src/main/java/com/fanruan/api/design/ui/factory/FormulaFactory.java
  4. 17
      src/main/java/com/fanruan/api/design/util/GUICoreKit.java
  5. 27
      src/main/java/com/fanruan/api/xml/XmlKit.java

8
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;
}

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

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

17
src/main/java/com/fanruan/api/design/util/GUICoreKit.java

@ -1,6 +1,7 @@
package com.fanruan.api.design.util; package com.fanruan.api.design.util;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.design.layout.FRGUIPaneFactory;
import javax.swing.*; import javax.swing.*;
import java.awt.*; import java.awt.*;
@ -99,4 +100,20 @@ public class GUICoreKit {
public static void showPopupMenu(JPopupMenu menu, Component component, int x, int y) { public static void showPopupMenu(JPopupMenu menu, Component component, int x, int y) {
GUICoreUtils.showPopupMenu(menu, component, x, 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();
}
} }

27
src/main/java/com/fanruan/api/xml/XmlKit.java

@ -1,11 +1,9 @@
package com.fanruan.api.xml; 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.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; import java.io.InputStream;
@ -44,6 +42,21 @@ public class XmlKit {
public static void writeXMLable(XMLPrintWriter writer, XMLable xml, String tagName) { public static void writeXMLable(XMLPrintWriter writer, XMLable xml, String tagName) {
GeneralXMLTools.writeXMLable(writer, xml, 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);
}
} }

Loading…
Cancel
Save