Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 Draw2D 标签(带文本的图形)构建一个基于 RCP 的应用程序。当我的图形编辑器重新调整标签大小时,文本保持在其初始位置。无论如何要根据标签的新约束重新定位文本?
事实证明,您只需要使用 setConstriants(IFigure parent, Rectangle bounds) 方法来设置位于父图形顶部的标签的边界。