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: 21
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: Fri Sep 21 02:07:17 GMT 2018

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

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

Back to the top