Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 Tools » How to change appearance of diagram programatically?
How to change appearance of diagram programatically? [message #476378] Fri, 17 April 2009 16:50 Go to next message
Eclipse UserFriend
Originally posted by: misinko.gmail.com

Hello,
I created plugin, from i would like to change appearance of some
diagram's parts (mainly in class diagram), for example: background of
classes, association lines.

Is it possible? If yes, how please.
Thank you.
Re: How to change appearance of diagram programatically? [message #476379 is a reply to message #476378] Mon, 20 April 2009 11:24 Go to previous messageGo to next message
Tatiana Fesenko is currently offline Tatiana FesenkoFriend
Messages: 530
Registered: July 2009
Senior Member
Hello Michal,

Yes, you can.
Apperance of figures is specified in *ViewFactory classes.
For example, to modify background color of classes you should override Class2ViewFactory#decorateView()
method:
FillStyle fillStyle = (FillStyle) view.getStyle(NotationPackage.Literals.FILL_STYLE);
if (fillStyle != null) {
fillStyle.setFillColor(color);
}


Best wishes,
Tanya.

> Hello,
> I created plugin, from i would like to change appearance of some
> diagram's parts (mainly in class diagram), for example: background of
> classes, association lines.
> Is it possible? If yes, how please.
> Thank you.
Re: How to change appearance of diagram programatically? [message #535488 is a reply to message #476379] Mon, 24 May 2010 03:13 Go to previous message
Marcelo  is currently offline Marcelo Friend
Messages: 14
Registered: February 2010
Junior Member
Hi,

I'm wondering whether it is possible to change the color of an
association (I couldn't do it using the GUI, and I didn't find how to do
it programatically - actually this is what I need).

Any idea?

All the best,
--
Marcelo

Em 20/04/2009 08:24, Tatiana Fesenko escreveu:
> Hello Michal,
>
> Yes, you can.
> Apperance of figures is specified in *ViewFactory classes.
> For example, to modify background color of classes you should override
> Class2ViewFactory#decorateView() method:
> FillStyle fillStyle = (FillStyle)
> view.getStyle(NotationPackage.Literals.FILL_STYLE);
> if (fillStyle != null) {
> fillStyle.setFillColor(color);
> }
>
>
> Best wishes,
> Tanya.
>
>> Hello,
>> I created plugin, from i would like to change appearance of some
>> diagram's parts (mainly in class diagram), for example: background of
>> classes, association lines.
>> Is it possible? If yes, how please.
>> Thank you.
>
>
Re: How to change appearance of diagram programatically? [message #623695 is a reply to message #476378] Mon, 20 April 2009 11:24 Go to previous message
Tatiana Fesenko is currently offline Tatiana FesenkoFriend
Messages: 530
Registered: July 2009
Senior Member
Hello Michal,

Yes, you can.
Apperance of figures is specified in *ViewFactory classes.
For example, to modify background color of classes you should override Class2ViewFactory#decorateView()
method:
FillStyle fillStyle = (FillStyle) view.getStyle(NotationPackage.Literals.FILL_STYLE);
if (fillStyle != null) {
fillStyle.setFillColor(color);
}


Best wishes,
Tanya.

> Hello,
> I created plugin, from i would like to change appearance of some
> diagram's parts (mainly in class diagram), for example: background of
> classes, association lines.
> Is it possible? If yes, how please.
> Thank you.
Re: How to change appearance of diagram programatically? [message #625634 is a reply to message #476379] Mon, 24 May 2010 03:13 Go to previous message
Marcelo  is currently offline Marcelo Friend
Messages: 14
Registered: February 2010
Junior Member
Hi,

I'm wondering whether it is possible to change the color of an
association (I couldn't do it using the GUI, and I didn't find how to do
it programatically - actually this is what I need).

Any idea?

All the best,
--
Marcelo

Em 20/04/2009 08:24, Tatiana Fesenko escreveu:
> Hello Michal,
>
> Yes, you can.
> Apperance of figures is specified in *ViewFactory classes.
> For example, to modify background color of classes you should override
> Class2ViewFactory#decorateView() method:
> FillStyle fillStyle = (FillStyle)
> view.getStyle(NotationPackage.Literals.FILL_STYLE);
> if (fillStyle != null) {
> fillStyle.setFillColor(color);
> }
>
>
> Best wishes,
> Tanya.
>
>> Hello,
>> I created plugin, from i would like to change appearance of some
>> diagram's parts (mainly in class diagram), for example: background of
>> classes, association lines.
>> Is it possible? If yes, how please.
>> Thank you.
>
>
Previous Topic:Setting line width in uml diagram
Next Topic:Problem when programatically deleting diagram file
Goto Forum:
  


Current Time: Fri Mar 29 00:45:41 GMT 2024

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

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

Back to the top