How to extend Figure to create a rectangle with a line? [message #644016] |
Thu, 09 December 2010 00:19  |
Eclipse User |
|
|
|
I'm using GEF as a drawing editor to draw and create custom shapes. There is a scale on the left side of the editor.
One of the shapes I'm trying to produce is a rectangle. 2 lines extend from the top and bottom edge of the rectangle toward the scale (essentially to help the user measure the height of the rectangle). In other words, the lines start from the very left of the screen, and end at the top left and bottom left corner of the rectangle. The lines should move with the rectangle even if it gets moved or resized.
How do I extend RectangleFigure to produce these 2 lines? I'm playing with layouts, and adding PolyLines to the figure, but it doesn't seem to be working. I'm not sure how to retrieve the corrdinates to pass to Polyline, and even if I input some arbitrary values, the line gets cut off and bounded by the rectangle. I can't get it to extend to the scale.
Any advice? Thanks.
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02931 seconds