Browse Source

REPORT-138249 cpt支持数据集替换 提出预览接口

release/11.0
Destiny.Lin 3 weeks ago
parent
commit
62f74da6f1
  1. 15
      designer-base/src/main/java/com/fr/design/data/BasicTableDataTreePane.java
  2. 2
      designer-base/src/main/java/com/fr/design/data/datapane/TableDataTreePane.java

15
designer-base/src/main/java/com/fr/design/data/BasicTableDataTreePane.java

@ -442,6 +442,17 @@ public abstract class BasicTableDataTreePane extends DockingView implements Resp
if (selectedNO != null) { if (selectedNO != null) {
data = selectedNO.getObject(); data = selectedNO.getObject();
} }
preview((TableDataWrapper) data, BasicTableDataTreePane.this);
}
}
/**
* 预览数据集
*
* @param data TableDataWrapper
* @param c 底层面板
*/
public static void preview(TableDataWrapper data, Component c) {
try { try {
if (((TableDataWrapper) Objects.requireNonNull(data)).getTableData() instanceof MultiResultTableData) { if (((TableDataWrapper) Objects.requireNonNull(data)).getTableData() instanceof MultiResultTableData) {
((MultiResultTableData<?>) (((TableDataWrapper) data).getTableData())).resetDataModelList(); ((MultiResultTableData<?>) (((TableDataWrapper) data).getTableData())).resetDataModelList();
@ -459,7 +470,7 @@ public abstract class BasicTableDataTreePane extends DockingView implements Resp
if (TableDataAuthHelper.needCheckAuthWhenEdit(wrapper.getTableData())) { if (TableDataAuthHelper.needCheckAuthWhenEdit(wrapper.getTableData())) {
// 先打开一个Loading面板 // 先打开一个Loading面板
TableDataLoadingPane loadingPane = new TableDataLoadingPane(); TableDataLoadingPane loadingPane = new TableDataLoadingPane();
BasicDialog loadingDialog = loadingPane.showLargeWindow(SwingUtilities.getWindowAncestor(BasicTableDataTreePane.this), null); BasicDialog loadingDialog = loadingPane.showLargeWindow(SwingUtilities.getWindowAncestor(c), null);
// 查询权限 // 查询权限
new SwingWorker<Boolean, Void>() { new SwingWorker<Boolean, Void>() {
@Override @Override
@ -499,8 +510,6 @@ public abstract class BasicTableDataTreePane extends DockingView implements Resp
} catch (Exception ex) { } catch (Exception ex) {
FineLoggerFactory.getLogger().error(ex.getMessage(), ex); FineLoggerFactory.getLogger().error(ex.getMessage(), ex);
} }
}
} }
protected class ConnectionTableAction extends com.fr.design.actions.server.ConnectionListAction { protected class ConnectionTableAction extends com.fr.design.actions.server.ConnectionListAction {

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

@ -100,6 +100,7 @@ import java.util.Set;
import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutionException;
public class TableDataTreePane extends BasicTableDataTreePane { public class TableDataTreePane extends BasicTableDataTreePane {
private static Set<AbstractExtraAction> extraActions = new HashSet<>();
private static final TableDataTreePane singleton = new TableDataTreePane(); private static final TableDataTreePane singleton = new TableDataTreePane();
public static final int PLUGIN_LISTENER_PRIORITY = 1; public static final int PLUGIN_LISTENER_PRIORITY = 1;
@ -147,7 +148,6 @@ public class TableDataTreePane extends BasicTableDataTreePane {
private EsdOffAction esdOffAction; private EsdOffAction esdOffAction;
private SwitchAction switchAction; private SwitchAction switchAction;
private PreviewTableDataAction previewTableDataAction; private PreviewTableDataAction previewTableDataAction;
private static Set<AbstractExtraAction> extraActions = new HashSet<>();
private JPanel serverDatasetAuthTipJPanel = new JPanel(); private JPanel serverDatasetAuthTipJPanel = new JPanel();
private TableDataSearchRemindPane remindPane; private TableDataSearchRemindPane remindPane;

Loading…
Cancel
Save