Browse Source

规范API

pull/11/head
richie 5 years ago
parent
commit
2292996a72
  1. 38
      src/main/java/com/fanruan/api/design/DesignKit.java

38
src/main/java/com/fanruan/api/design/DesignKit.java

@ -1,13 +1,7 @@
package com.fanruan.api.design; package com.fanruan.api.design;
import com.fr.base.TableData; import com.fr.base.TableData;
import com.fr.design.data.datapane.preview.PreviewTablePane; 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 { public class DesignKit {
/** /**
@ -17,34 +11,4 @@ public class DesignKit {
public static void previewTableData(TableData tableData){ public static void previewTableData(TableData tableData){
PreviewTablePane.previewTableData(tableData, -1, -1); 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{
}
} }

Loading…
Cancel
Save