[英]Im working on an application using eclipse RCP. I have a graphical editor and I would like to draw a figure on it programmatically?
I do not want to use an editPart or have any connection with the model. 我不想使用editPart或与模型有任何联系。 An other solution that would work for me is to draw a figure that is out of bounds of its parent
另一种对我有用的解决方案是绘制一个超出其父级范围的图形
I haven't tried this, but you could get the GraphicalViewer
of the editor, pull out the LightweightSystem
and draw directly over it. 我没有尝试过,但是您可以获取编辑器的
GraphicalViewer
,拉出LightweightSystem
并直接在其上绘制。
Since GraphicalViewer
does not expose this directly (check GraphicalViewerImpl
where it is protected) you would need to create your own implementation that does expose it. 由于
GraphicalViewer
不会直接公开此内容(请在受保护的地方查看GraphicalViewerImpl
),因此需要创建自己的实现来公开它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.