| How to place Label above Ellipse? [message #633546]
||Mon, 18 October 2010 07:19
| Mikkel Jonassen
Registered: September 2010
Hello Experts |
I am trying to place a Label above an Ellipse shape, but each time refreshVisuals is called from the EditPart the figure shrinks. My paintFigure method looks like the following:
Rectangle r = this.getBounds().getCopy();
setConstraint(getLabelFigure(), new Rectangle(0, 0, (int)(r.width*0.9), (int)(r.height*0.1)));
// ellipse starts where label ends and fill the rest 90% in height and width
setConstraint(getEllipseFigure(), new Rectangle(0, (int)(r.height*0.1), (int)(r.width*0.9), (int)(r.height*0.9)));
It seems that I can't use the constraints in this way, so how do I place the Label figure right above the Ellipse.
I am using normal draw2D label and a normal draw2D Ellipse shape.
Thanks in advantage.
Powered by FUDForum
. Page generated in 0.11350 seconds