Browse Source
* commit '0b5d9ac6854a9a20fb427dd866c5a522b21ac3d8': feat: 针对pr意见进行修改。 feat:删除重复的方法 feat: 一些方法的增加pull/11/head
superman
5 years ago
15 changed files with 218 additions and 3 deletions
@ -0,0 +1,50 @@
|
||||
package com.fanruan.api.design; |
||||
import com.fr.base.TableData; |
||||
import com.fr.design.data.datapane.preview.PreviewTablePane; |
||||
import com.fr.design.layout.TableLayoutHelper; |
||||
import com.fr.design.utils.gui.GUICoreUtils; |
||||
import com.fr.design.gui.itextfield.UIIntNumberField; |
||||
|
||||
import javax.swing.*; |
||||
import java.awt.*; |
||||
import java.awt.event.ActionEvent; |
||||
|
||||
public class DesignKit { |
||||
/** |
||||
* 直接预览数据集,没有实际值及显示值 |
||||
* @param tableData 数据集 |
||||
*/ |
||||
public static void previewTableData(TableData tableData){ |
||||
PreviewTablePane.previewTableData(tableData, -1, -1); |
||||
} |
||||
/** |
||||
* 标题布局 |
||||
* @param components 组件 |
||||
* @param rowSize 行宽 |
||||
* @param columnSize 列宽 |
||||
* @return 布局后的组件 |
||||
*/ |
||||
public static JPanel createTableLayoutPane(Component[][] components, double[] rowSize, double[] columnSize) { |
||||
return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); |
||||
} |
||||
/** |
||||
* 生成一个边界布局 |
||||
* @param args 布局内部的元素,位置等 |
||||
* @return 具有边界布局的面板 |
||||
*/ |
||||
public static JPanel createBorderLayoutPane(Object... args) { |
||||
return GUICoreUtils.createBorderLayoutPane(args); |
||||
} |
||||
/** |
||||
* 产生一个Flow Pane, flowAligment是FlowLayout.LEFT, CENTER, RIGHT. |
||||
* @param comps 组件 |
||||
* @param flowAlignment 对齐方式 |
||||
* @return 具有边界布局的面板 |
||||
*/ |
||||
public static JPanel createFlowPane(Component comps, int flowAlignment) { |
||||
return GUICoreUtils.createFlowPane(comps,flowAlignment); |
||||
} |
||||
public static class UIIntNumberField extends com.fr.design.gui.itextfield.UIIntNumberField{ |
||||
|
||||
} |
||||
} |
@ -0,0 +1,8 @@
|
||||
package com.fanruan.api.design.ui.component; |
||||
|
||||
public class BasicPane extends com.fr.design.dialog.BasicPane{ |
||||
@Override |
||||
protected String title4PopupWindow() { |
||||
return ""; |
||||
} |
||||
} |
@ -0,0 +1,4 @@
|
||||
package com.fanruan.api.design.ui.component; |
||||
|
||||
public class ParameterTableModel extends com.fr.design.gui.itableeditorpane.ParameterTableModel{ |
||||
} |
@ -0,0 +1,5 @@
|
||||
package com.fanruan.api.design.ui.component; |
||||
|
||||
public class UIIntNumberField extends com.fr.design.gui.itextfield.UIIntNumberField{ |
||||
|
||||
} |
@ -0,0 +1,13 @@
|
||||
package com.fanruan.api.design.ui.component; |
||||
|
||||
import java.awt.event.ActionEvent; |
||||
|
||||
public class UITableEditAction extends com.fr.design.gui.itableeditorpane.UITableEditAction{ |
||||
@Override |
||||
public void checkEnabled() { |
||||
} |
||||
@Override |
||||
public void actionPerformed(ActionEvent e) { |
||||
|
||||
} |
||||
} |
@ -0,0 +1,8 @@
|
||||
package com.fanruan.api.design.ui.component; |
||||
|
||||
import java.awt.event.ActionEvent; |
||||
|
||||
public class UpdateAction extends com.fr.design.actions.UpdateAction{ |
||||
@Override |
||||
public void actionPerformed(ActionEvent evt) {} |
||||
} |
@ -0,0 +1,14 @@
|
||||
package com.fanruan.api.i18n; |
||||
import com.fr.locale.InterProviderFactory; |
||||
|
||||
public class I18nKit { |
||||
/** |
||||
* 获取国际化文本 |
||||
* |
||||
* @param string 需要国际化的值对应的键 |
||||
* @return 返回国际化文本 |
||||
*/ |
||||
public static String getLocText(String string) { |
||||
return InterProviderFactory.getProvider().getLocText(string); |
||||
} |
||||
} |
@ -0,0 +1,7 @@
|
||||
package com.fanruan.api.layout; |
||||
import com.fr.design.layout.TableLayout; |
||||
|
||||
public class LayoutKit { |
||||
public static final double PREFERRED = TableLayout.PREFERRED; |
||||
public static final double FILL = TableLayout.FILL; |
||||
} |
@ -0,0 +1,20 @@
|
||||
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 java.io.InputStream; |
||||
|
||||
public class XmlKit { |
||||
/** |
||||
* 从输入流中读取对象 |
||||
* @param xmlReadable xml读取对象 |
||||
* @param inputStream xml输入流 |
||||
* |
||||
*/ |
||||
public static void readInputStreamXML(XMLReadable xmlReadable, InputStream inputStream) throws Exception { |
||||
XMLTools.readInputStreamXML(xmlReadable, inputStream); |
||||
} |
||||
} |
@ -0,0 +1,18 @@
|
||||
package com.fanruan.api.xml.xml.component; |
||||
|
||||
import com.fr.stable.xml.XMLPrintWriter; |
||||
import com.fr.stable.xml.XMLableReader; |
||||
|
||||
public class XMLFileManager extends com.fr.file.XMLFileManager { |
||||
@Override |
||||
public String fileName() { |
||||
return ""; |
||||
} |
||||
@Override |
||||
public void writeXML(XMLPrintWriter writer) { |
||||
|
||||
} |
||||
@Override |
||||
public void readXML(XMLableReader reader) { |
||||
} |
||||
} |
Loading…
Reference in new issue