Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » Graphical Transformation of an icon stereotype.(Rotation and translation.)
Graphical Transformation of an icon stereotype. [message #883376] Fri, 08 June 2012 12:03 Go to next message
LE HALPER Nicolas is currently offline LE HALPER NicolasFriend
Messages: 13
Registered: April 2012
Junior Member
Hi everyone Wink

I have a simple problem. I would like to rotate and translate programmatically a stereotype which is displayed in icon shape. Is there any possibilities to do that ?

One partial solution would be to change this icon programmatically in order to "emulate" the rotation. But I really don't know how to do that.

Thx for helping. Wink

Nicolas

[Updated on: Fri, 08 June 2012 12:10]

Report message to a moderator

Re: Graphical Transformation of an icon stereotype. [message #889952 is a reply to message #883376] Wed, 20 June 2012 11:38 Go to previous messageGo to next message
LE HALPER Nicolas is currently offline LE HALPER NicolasFriend
Messages: 13
Registered: April 2012
Junior Member
If anyone knows how to change the icon programmatically which represents a stereotype, I would appreciate that. Indeed, I succeed to detect the position of the element in the component ( north west south east ), but I still don't know how to change the icon with a given path. This task would "emulate" a rotation of a stereotype which is a element located on the graphical border of a component.

For instance, I could retrieve the applied icon of a stereotype which is applied on a NamedElement.But I have really no idea how to "set" a new icon.

Thanks for helping Wink
Re: Graphical Transformation of an icon stereotype. [message #889970 is a reply to message #889952] Wed, 20 June 2012 12:50 Go to previous messageGo to next message
Camille Letavernier is currently offline Camille LetavernierFriend
Messages: 952
Registered: February 2011
Senior Member
Hello Nicolas,


This isn't exactly supported in Papyrus. However, you may still want to have a look at org.eclipse.papyrus.uml.diagram.common.figure.node.NodeNamedElementFigure#setNameLabelIcon(boolean). If you're in your own kind of Diagram, you can easily override this method to select your own Image.

You can also have a look at IPapyrusUMLElementFigure#setStereotypeDisplay(String, Image). However, this method is called by the edit parts when the visuals are refreshed. Thus, your image might be overridden at any time (Especially when the diagram is refreshed). That's probably not a solution Smile

If you're using a standard Papyrus Diagram, and you can't override the Figures/Edit parts, you can still propose a patch to change an EditPart/Figure's Image from the outside Smile


Regards,
Camille


Camille Letavernier
Re: Graphical Transformation of an icon stereotype. [message #890381 is a reply to message #889970] Fri, 22 June 2012 07:34 Go to previous messageGo to next message
LE HALPER Nicolas is currently offline LE HALPER NicolasFriend
Messages: 13
Registered: April 2012
Junior Member
Hello Camille

I'm using a standard Papyrus Diagram so it will be complicated then. Sad ( I didn't succeed to override the Figure/EditParts Sad ).

In the same domain ( graphical modifications ) and in order to avoid to create a new topic, is it possible to apply transparency between UML Components ? Actually, if I get it right, the transparency applied on Papyrus is actually transparency between UML components and the background of the UML editor not transparency between different UML components. I know that I'm not clear :/. For instance, the background of my icons ( which represent stereotypes ) has to be transparent. However, even if I make them transparent in a picture editor and apply the transparency option in Papyrus, it is not really total transparency.

I take a screenshot in order to illustrate this problem.

I'm afraid that this problem is quite similar with the previous one, that is to the say I have to override the Figure/EditParts Sad.

Thanks for your help again Very Happy.

Nicolas
  • Attachment: test.png
    (Size: 4.01KB, Downloaded 249 times)

[Updated on: Fri, 22 June 2012 10:39]

Report message to a moderator

Re: Graphical Transformation of an icon stereotype. [message #892165 is a reply to message #890381] Wed, 27 June 2012 09:38 Go to previous message
LE HALPER Nicolas is currently offline LE HALPER NicolasFriend
Messages: 13
Registered: April 2012
Junior Member
After several researches, I am not sure Draw2D allowed this kind of transparency. This is quite sad. Sad

EDIT : This kind of transparency now works perfectly with Papyrus 0.9 ! However the border is still present but it's still an advancement Very Happy

[Updated on: Thu, 28 June 2012 11:26]

Report message to a moderator

Previous Topic:Regarding Live-mode model validation in Papyrus
Next Topic:Create and add a new element at palette
Goto Forum:
  


Current Time: Tue Apr 16 13:45:47 GMT 2024

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

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

Back to the top