Browse Source

REPORT-138249 cpt支持数据集替换 补充右键菜单

release/11.0
Destiny.Lin 2 weeks ago
parent
commit
84b4e34cf1
  1. 29
      designer-base/src/main/java/com/fr/design/data/datapane/TableDataTreePane.java

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

@ -179,14 +179,7 @@ public class TableDataTreePane extends BasicTableDataTreePane {
ToolTipManager.sharedInstance().setDismissDelay(3000);
ToolTipManager.sharedInstance().setInitialDelay(0);
// 右键菜单
popupMenu = new UIPopupMenu();
popupMenu.add(editAction.createMenuItem());
popupMenu.add(previewTableDataAction.createMenuItem());
popupMenu.addSeparator();
popupMenu.add(copyAction.createMenuItem());
popupMenu.add(pasteAction.createMenuItem());
popupMenu.add(removeAction.createMenuItem());
popupMenu.addSeparator();
initPopupMenu();
// 监听
tableDataTree.addMouseListener(new MouseAdapter() {
@Override
@ -224,6 +217,25 @@ public class TableDataTreePane extends BasicTableDataTreePane {
new TableDataTreeDragSource(tableDataTree, DnDConstants.ACTION_COPY);
}
private void initPopupMenu() {
popupMenu = new UIPopupMenu();
popupMenu.add(editAction.createMenuItem());
popupMenu.add(previewTableDataAction.createMenuItem());
popupMenu.addSeparator();
popupMenu.add(copyAction.createMenuItem());
popupMenu.add(pasteAction.createMenuItem());
popupMenu.add(removeAction.createMenuItem());
popupMenu.addSeparator();
for (AbstractExtraAction action : extraActions) {
try {
popupMenu.add(action.createMenuItem());
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
}
}
/**
* 工具栏面板
*
@ -368,6 +380,7 @@ public class TableDataTreePane extends BasicTableDataTreePane {
createAddMenuDef();
createToolbarDef();
toolbarDef.updateToolBar(toolbarPane.getToolbar());
initPopupMenu();
checkEnable();
}
}, new PluginFilter() {

Loading…
Cancel
Save