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 12:50 Go to next message
Eclipse User
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 07:24 Go to previous messageGo to next message
Tatiana Fesenko is currently offline Tatiana Fesenko
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] Sun, 23 May 2010 23:13 Go to previous message
Marcelo  is currently offline Marcelo
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 07:24 Go to previous message
Tatiana Fesenko is currently offline Tatiana Fesenko
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] Sun, 23 May 2010 23:13 Go to previous message
Marcelo  is currently offline Marcelo
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: Wed Aug 27 05:03:22 EDT 2014

Powered by FUDForum. Page generated in 0.02097 seconds