Eclipse RCP 的什么图形框架可用于在表格上绘制树(或图形)?

发布于 2025-01-05 08:07:20 字数 884 浏览 2 评论 0原文

我目前正在寻找以下问题的解决方案。

我需要能够在 Eclipse RCP 视图中的表或其他可对齐组件上绘制层次结构树(例如,语法树,它基本上是一个图形)。表中最上面一行的单元格充当叶子。考虑以下简单的示例:

          S
         /  \
        /    \
       N      VP
       |    /   \
       |   V     NP
       |   |    /  \
       |   |   D    N
       |   |   |    |
    -------------------
WORD|John|hit|the|ball|
CAT.| N  | V | D | N  |

正在分析的句子以及分析值本身位于表中,但可以放置在任何其他可对齐元素中。

现在我想在桌子上方画一棵树。为此,我想使用一个提供布局算法的框架。现实中的树会更大,我希望能够提供自动布局。我所说的“自动布局”并不是指不同的“图形样式”(图形/树将始终是水平的,并且通常或多或少像示例中那样具有“样式”),而是可以对节点和边进行排序,以便它们不不要重叠得太厉害等等(突出显示树/图的部分也很好)。

Zest 当然会浮现在脑海中(看到这些树基本上都是图表),但据我所知发现不可能将边缘“绑定”到表格单元格。

  • GEF 中可能出现这样的情况吗?
  • 您知道其他框架可以实现这样的结果吗?
  • 其他想法,也许不使用桌子?

非常感谢!

I'm currently looking for a solution to the following problem.

I need to be able to draw a hierarchical tree (e.g., syntax tree, which is basically a graph) over a table or other alignable component in an Eclipse RCP view. The cells of the topmost row in the table act as leafs. Consider the following simplistic example:

          S
         /  \
        /    \
       N      VP
       |    /   \
       |   V     NP
       |   |    /  \
       |   |   D    N
       |   |   |    |
    -------------------
WORD|John|hit|the|ball|
CAT.| N  | V | D | N  |

The sentence that is being analysed, and the analysis values themselves, are in a table, but could possibly be placed in any other alignable element.

Now I want to draw a tree above the table. For this I want to use a framework that provides layout algorithms. The trees will be bigger in reality, and I want to be able to provide automated layouting. By "automated layouting" I don't mean different "graph styles" (the graph/tree will always be horizontal and generally more or less "styled" like in the example) but the possibility to order the nodes and edges so that they don't overlap too badly, etc. (highlighting portions of the tree/graph would be nice as well).

Zest of course comes to mind (seeing that those trees are basically graphs), but as far as I've found out it isn't possible to "bind" edges to table cells.

  • Would something like this be possible in GEF?
  • Do you know of other frameworks that might be able to achieve such an outcome?
  • Other ideas, perhaps without using a table?

Many thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

蹲墙角沉默 2025-01-12 08:07:20

我将使用 GEF (MVC) 毕竟,它是插件而不是 Zest,因为它很容易实现一些看起来类似于许多特定类型图形的表格,而树可以用不同类型的

I will use the GEF (MVC) plug-in rather than Zest after all, as it is easy enough to achieve something that looks like a table for a number of a certain type of Figure, while the tree can be drawn with different types of Figures.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文