Skip to main content



      Home
Home » Eclipse Projects » GEF » [GEF]Call rotate in paintFigure but moveHandle isn't rotated
[GEF]Call rotate in paintFigure but moveHandle isn't rotated [message #1780644] Thu, 25 January 2018 04:05
Eclipse UserFriend
Hi guys,
Recently, I am researching how to rotate a label in GEF.
And I have rotated it by calling graphics.rotate in #paintFigure(Graphics graphics), but the move handle and the eight resize handles are still at the old positions. The codes are like that:

@Override
public void paintFigure(Graphics graphics){

.......

int rotate_x = 10;// for example
int rotate_y = 10;// for example
graphics.translate(rotate_x, rotate_y);
graphics.rotate(90);
paintText();
graphics.translate(-rotate_x, -rotate_y);

.......
}

As the position and size has been changed because of rotation, so where should I change to the new position and size in the label's editpart?
I have tried several ways,like refresh, refreshBounds, refreshVisuals, repaint without success.

Could you guys give me some suggestions? Any help is greatful.
Thanks in advance.

[Updated on: Tue, 06 February 2018 22:09] by Moderator

Previous Topic:when do handle methods get called?
Next Topic:Tooltips for Edges
Goto Forum:
  


Current Time: Fri Apr 25 02:49:13 EDT 2025

Powered by FUDForum. Page generated in 0.03081 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top