Re-aligning text in Eclipse Draw2D Label
I am buildin开发者_StackOverflow社区g an RCP-based application with Draw2D Labels (Figures with text). When my graphical editor re-sizes the label, the text stays in it's initial position. Is there anyway to have the text reposition based on the new constraints of the label?
It turns out you just need to use the setConstriants(IFigure parent, Rectangle bounds) method to set the bounds of the label that is residing on top of the parent figure.
精彩评论