[Sirius]Make port label to be vertical [message #1781216] |
Sat, 03 February 2018 07:51 |
lee lucky Messages: 26 Registered: October 2017 |
Junior Member |
|
|
Hi, guys
I am researching about how to make port label to be vertical. My Sirius version is 4.1.3 and I have not found the functionality of vertical label.
I searched in the forum and someone said using graphics.rotate to make it.
And I have rotated the port label 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.
Or are there any ways in Sirius to make the port label vertical?
Could you guys give me some suggestions? Any help is greatful.
Thanks in advance.
[Updated on: Wed, 07 February 2018 03:10] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.03067 seconds