forked from fanruan/finekit
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
73 lines
2.4 KiB
73 lines
2.4 KiB
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 { |
|
public static class UpdateAction extends com.fr.design.actions.UpdateAction{ |
|
@Override |
|
public void actionPerformed(ActionEvent evt) {} |
|
} |
|
/** |
|
* 直接预览数据集,没有实际值及显示值 |
|
* @param tableData 数据集 |
|
*/ |
|
public static void previewTableData(TableData tableData){ |
|
PreviewTablePane.previewTableData(tableData, -1, -1); |
|
} |
|
public static class ParameterTableModel extends com.fr.design.gui.itableeditorpane.ParameterTableModel{ |
|
|
|
} |
|
public static class UITableEditAction extends com.fr.design.gui.itableeditorpane.UITableEditAction{ |
|
@Override |
|
public void checkEnabled() { |
|
} |
|
@Override |
|
public void actionPerformed(ActionEvent e) { |
|
|
|
} |
|
|
|
} |
|
public static class BasicPane extends com.fr.design.dialog.BasicPane{ |
|
@Override |
|
protected String title4PopupWindow() { |
|
return ""; |
|
} |
|
} |
|
/** |
|
* 标题布局 |
|
* @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{ |
|
|
|
} |
|
}
|
|
|