Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 09:05
lee lucky is currently offline lee luckyFriend
Messages: 26
Registered: October 2017
Junior Member
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: Wed, 07 February 2018 03:09]

Report message to a moderator

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


Current Time: Wed Apr 24 19:19:46 GMT 2024

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

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

Back to the top