Browse Source

Merge remote-tracking branch 'origin/REPORT-44961' into REPORT-44961

# Conflicts:
#	designer-base/src/main/java/com/fr/design/mainframe/widget/accessibles/AccessibleDictionaryEditor.java
#	designer-base/src/main/java/com/fr/design/present/dict/DictionaryPane.java
#	designer-base/src/main/java/com/fr/design/present/dict/TableDataDictPane.java
research/11.0
Yvan 4 years ago
parent
commit
f9f9475123
  1. 40
      designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/AbstractTableDataWrapper.java

40
designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/AbstractTableDataWrapper.java

@ -7,6 +7,7 @@ import com.fr.design.DesignModelAdapter;
import com.fr.design.data.DesignTableDataManager;
import com.fr.design.data.datapane.preview.PreviewTablePane;
import com.fr.design.data.tabledata.tabledatapane.AbstractTableDataPane;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.gui.itree.refreshabletree.ExpandMutableTreeNode;
import com.fr.design.utils.DesignUtils;
import com.fr.general.ComparatorUtils;
@ -35,18 +36,18 @@ public abstract class AbstractTableDataWrapper implements TableDataWrapper {
/**
* 获取数据集的所有列名list
*
*
* @return 数据集的所有列名list
*
*
*
* @date 2014-11-24-下午3:51:41
*
*
*/
public List<String> calculateColumnNameList() {
if(columnNameList != null){
return columnNameList;
}
DesignModelAdapter adapter = DesignModelAdapter.getCurrentModelAdapter();
TableDataSource tds = adapter == null ? null : adapter.getBook();
String[] colNames = tabledata.getColumnNames(tds);
@ -56,13 +57,14 @@ public abstract class AbstractTableDataWrapper implements TableDataWrapper {
} else if (ArrayUtils.isNotEmpty(colNamesInCache)) {
return toColumnNameList(colNamesInCache);
}
EmbeddedTableData embeddedTableData = null;
try {
embeddedTableData = DesignTableDataManager.previewTableDataNotNeedInputParameters(tds, tabledata, TableData.RESULT_NOT_NEED, false);
} catch (Exception e) {
if (e.getMessage()!=null) {
DesignUtils.errorMessage(e.getMessage());
// 这个弹窗可能会成为数据字典页面的二级弹窗,所以修改下父窗口避免出现mac下的二级弹窗问题
FineJOptionPane.showMessageDialog(null, e.getMessage());
}
}
columnNameList = DesignTableDataManager.getColumnNamesByTableData(embeddedTableData);
@ -78,12 +80,12 @@ public abstract class AbstractTableDataWrapper implements TableDataWrapper {
/**
* 生成子节点
*
*
* @return 生成子节点
*
*
*
* @date 2014-11-24-下午3:51:17
*
*
*/
public ExpandMutableTreeNode[] load() {
List<String> namelist = calculateColumnNameList();
@ -97,10 +99,10 @@ public abstract class AbstractTableDataWrapper implements TableDataWrapper {
/**
* 预览数据集
*
*
*
* @date 2014-11-24-下午3:50:20
*
*
*/
public void previewData() {
PreviewTablePane.previewTableData(tabledata);
@ -108,30 +110,30 @@ public abstract class AbstractTableDataWrapper implements TableDataWrapper {
/**
* 预览数据集,带有显示值和实际值的标记结果
*
*
* @param keyIndex 实际值
* @param valueIndex 显示值
*
*
*
* @date 2014-11-24-下午3:50:20
*
*
*/
public void previewData(final int keyIndex,final int valueIndex){
PreviewTablePane.previewTableData(tabledata, keyIndex, valueIndex);
}
@Override
public String getTableDataName(){
return name;
return name;
}
/**
* 获取数据集的面板
*
*
* @return 数据集面板
*
*
*
* @date 2014-11-24-下午3:50:00
*
*
*/
public AbstractTableDataPane<?> creatTableDataPane() {
return TableDataFactory.creatTableDataPane(tabledata, name);
@ -143,4 +145,4 @@ public abstract class AbstractTableDataWrapper implements TableDataWrapper {
&& ComparatorUtils.equals(this.tabledata, ((AbstractTableDataWrapper) obj).getTableData());
}
}
}

Loading…
Cancel
Save