when do handle methods get called? [message #142855] |
Thu, 15 July 2004 19:38 ![Go to next message Go to next message](theme/Solstice/images/down.png) |
steven melzer![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=smelzer%40paymentech.com) Messages: 38 Registered: July 2009 |
Member |
|
|
all,
i have subclassed the ResizeHandle and the MoveHandle to do some custom
handle stuff, specifically rotation. all works well the first time the
handles get instantiated (from the createSelectionHandles() method of my
edit part policy). i first create the move handle and apply the rotation
function, then i create each resize handle for the eight different
directions. i pass the MoveHandle into the ResizeHandle constructor
because the MoveHandle has some info i need for the ResizeHandle,
specifically the XY info for the new corners and midpoints.
my problem is i do not understand the sequence of events that the GEF does
to redraw the handles. right now, there is rotation logic in the
paintFigure method of the MoveHandle. unfortunately, the ResizeHandles
are getting redrawn before the MoveHandle after the first time the handles
are created, so the ResizeHandles are not being updated properly. this is
the case if i change the angle in the model while the figure is currently
selected (through the properties view).
what objects are managing the handle drawing when the selected object is
asked to redraw itself. in this case, a new handle is not created. i
would like to find a better place to manage the rotation methods than the
paint() methods to do calculations and adjustments for the handles, but i
cannot find one.
thanks,
steve
|
|
|
Re: when do handle methods get called? [message #143108 is a reply to message #142855] |
Sun, 18 July 2004 17:03 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
steven melzer![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=steven.melzer%40verizon.net) Messages: 17 Registered: July 2009 |
Junior Member |
|
|
never mind,
fixed my problem. just leaning more on the model.
steve
steven melzer wrote:
> all,
> i have subclassed the ResizeHandle and the MoveHandle to do some custom
> handle stuff, specifically rotation. all works well the first time the
> handles get instantiated (from the createSelectionHandles() method of my
> edit part policy). i first create the move handle and apply the rotation
> function, then i create each resize handle for the eight different
> directions. i pass the MoveHandle into the ResizeHandle constructor
> because the MoveHandle has some info i need for the ResizeHandle,
> specifically the XY info for the new corners and midpoints.
> my problem is i do not understand the sequence of events that the GEF does
> to redraw the handles. right now, there is rotation logic in the
> paintFigure method of the MoveHandle. unfortunately, the ResizeHandles
> are getting redrawn before the MoveHandle after the first time the handles
> are created, so the ResizeHandles are not being updated properly. this is
> the case if i change the angle in the model while the figure is currently
> selected (through the properties view).
> what objects are managing the handle drawing when the selected object is
> asked to redraw itself. in this case, a new handle is not created. i
> would like to find a better place to manage the rotation methods than the
> paint() methods to do calculations and adjustments for the handles, but i
> cannot find one.
> thanks,
> steve
|
|
|
Re: when do handle methods get called? [message #1780633 is a reply to message #143108] |
Thu, 25 January 2018 06:52 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) |
lee lucky![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=yufang.li%40samsung.com) Messages: 26 Registered: October 2017 |
Junior Member |
|
|
I met the familiar problem.
I just called the graphics.rotate function in #paintFigure(Graphics graphics).
The text of my label was rotated correctly, but the move handle and eight resize handles aren't rotated because the bounds in the editpart's figure isn't modified.
May you give me some suggestions to create the move handle and resize handles based on the rotated text position?
[Updated on: Wed, 07 February 2018 03:10] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.04301 seconds