Browse Source

REPORT-68740 【迭代】【数据集管理优化】数据集+数据列(不包含数据集),操作按钮未对应灰化

改一下方法名
feature/x
Yvan 3 years ago
parent
commit
d4b4b262d2
  1. 4
      designer-base/src/main/java/com/fr/design/data/datapane/TableDataTree.java
  2. 4
      designer-base/src/main/java/com/fr/design/data/datapane/TableDataTreePane.java

4
designer-base/src/main/java/com/fr/design/data/datapane/TableDataTree.java

@ -287,7 +287,7 @@ public class TableDataTree extends UserObjectRefreshJTree<TableDataSourceOP> {
* 获得选中的数据集节点的NameObject的数组只会返回数据集节点的NameObject
* 当多选了数据集或数据列时也只返回选中的数据集
*/
public NameObject[] getSelectedTableDataNodes() {
public NameObject[] getSelectedTableDataNameObjects() {
Map<String, List<ExpandMutableTreeNode>> tableDataNodesAndColumnNodes = getSelectedTableDataNodesAndColumnNodes();
List<ExpandMutableTreeNode> tableDataNodes = tableDataNodesAndColumnNodes.get(TABLE_DATA_NODE);
if (tableDataNodes == null) {
@ -333,7 +333,7 @@ public class TableDataTree extends UserObjectRefreshJTree<TableDataSourceOP> {
* @return
*/
public int getSelectedTableDataCounts() {
return getSelectedTableDataNodes().length;
return getSelectedTableDataNameObjects().length;
}
/**

4
designer-base/src/main/java/com/fr/design/data/datapane/TableDataTreePane.java

@ -1012,7 +1012,7 @@ public class TableDataTreePane extends BasicTableDataTreePane {
@Override
public void actionPerformed(ActionEvent e) {
NameObject[] selectedNameObjects = tableDataTree.getSelectedTableDataNodes();
NameObject[] selectedNameObjects = tableDataTree.getSelectedTableDataNameObjects();
if (selectedNameObjects == null || selectedNameObjects.length == 0) {
FineLoggerFactory.getLogger().error("Table Data to remove is null or not selected");
return;
@ -1076,7 +1076,7 @@ public class TableDataTreePane extends BasicTableDataTreePane {
@Override
public void actionPerformed(ActionEvent e) {
NameObject[] selectedNameObjects = tableDataTree.getSelectedTableDataNodes();
NameObject[] selectedNameObjects = tableDataTree.getSelectedTableDataNameObjects();
Map<String, AbstractTableDataWrapper> dataWrapperMap = TableDataTreeClipboard.getInstance().transferNameObjectArray2Map(selectedNameObjects);
TableDataTreeClipboard.getInstance().addToClip(dataWrapperMap);
}

Loading…
Cancel
Save