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.
|
|
|
package com.fanruan.api.design;
|
|
|
|
|
|
|
|
import com.fr.base.TableData;
|
|
|
|
import com.fr.design.data.datapane.preview.PreviewTablePane;
|
|
|
|
import com.fr.design.i18n.Toolkit;
|
|
|
|
import com.fr.design.mainframe.DesignerContext;
|
|
|
|
import com.fr.design.mainframe.DesignerFrame;
|
|
|
|
|
|
|
|
public class DesignKit {
|
|
|
|
/**
|
|
|
|
* 直接预览数据集,没有实际值及显示值
|
|
|
|
* @param tableData 数据集
|
|
|
|
*/
|
|
|
|
public static void previewTableData(TableData tableData){
|
|
|
|
PreviewTablePane.previewTableData(tableData, -1, -1);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 文本国际化
|
|
|
|
* @param key 国际化键
|
|
|
|
* @return 国际化后的值
|
|
|
|
*/
|
|
|
|
public static String i18nText(String key) {
|
|
|
|
return Toolkit.i18nText(key);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 带参数的文本国际化
|
|
|
|
* @param key 国际化键
|
|
|
|
* @param args 参数
|
|
|
|
* @return 国际化后的值
|
|
|
|
*/
|
|
|
|
public static String i18nText(String key, Object... args) {
|
|
|
|
return Toolkit.i18nText(key, args);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 单例模式,返回DesignerFrame对象
|
|
|
|
* @return DesignerFrame对象
|
|
|
|
*/
|
|
|
|
public static DesignerFrame getDesignerFrame() {
|
|
|
|
return DesignerContext.getDesignerFrame();
|
|
|
|
}
|
|
|
|
}
|