how to chnage the color of diagram elements [message #128355] |
Wed, 23 May 2007 07:56 |
Eclipse User |
|
|
|
Originally posted by: bhatia1984.yahoo.com
hiiii
i want to give some default color to my diagram element when they are
created For eg yellow .By default GMF gave white color to diagram element.
when i try to set the defaule color to yellow then i am not able to change
there color to sum other color.
i also want that user cn change the color of diagram element acc to his
own choice .
thanks
Varun Bhatia
|
|
|
Re: how to chnage the color of diagram elements [message #128435 is a reply to message #128355] |
Wed, 23 May 2007 08:48 |
Eclipse User |
|
|
|
Originally posted by: fbanica.soluta.net
Look in the attachment. Does it ring a bell? :-)
"varun" <bhatia1984@yahoo.com> wrote in message
news:a975d0fd417650f615cb2119ec953cce$1@www.eclipse.org...
> hiiii
>
> i want to give some default color to my diagram element when they are
> created For eg yellow .By default GMF gave white color to diagram element.
>
> when i try to set the defaule color to yellow then i am not able to change
> there color to sum other color.
>
> i also want that user cn change the color of diagram element acc to his
> own choice .
>
> thanks
> Varun Bhatia
>
|
|
|
|
|
|
|
Re: how to chnage the color of diagram elements [message #129038 is a reply to message #128664] |
Thu, 24 May 2007 05:07 |
Eclipse User |
|
|
|
Originally posted by: bhatia1984.yahoo.com
hi Alex
i have modify generated createStyle() method in view factory bt still the
default color is white.
does i hv to make any change in ???EditPart class also.
these are the chnages i hv done in createStyle() method:
protected List<Style> createStyles(View view) {
List<Style> styles = new ArrayList<Style>();
FillStyle style = NotationFactory.eINSTANCE.createFillStyle();
style.setFillColor(12632256);
styles.add(style);
return styles;
}
Thanks
Varun Bhatia
|
|
|
Re: how to chnage the color of diagram elements [message #129116 is a reply to message #129038] |
Thu, 24 May 2007 08:01 |
Eclipse User |
|
|
|
Originally posted by: 5d5.mail.ru
This should work for the newly created elements; don't expect to reopen
diagram and see all existing nodes in other colour.
varun wrote:
> hi Alex
>
> i have modify generated createStyle() method in view factory bt still
> the default color is white.
>
> does i hv to make any change in ???EditPart class also.
>
> these are the chnages i hv done in createStyle() method:
>
> protected List<Style> createStyles(View view) {
>
> List<Style> styles = new ArrayList<Style>();
>
> FillStyle style = NotationFactory.eINSTANCE.createFillStyle();
>
> style.setFillColor(12632256);
> styles.add(style);
>
> return styles;
> }
>
> Thanks
> Varun Bhatia
>
|
|
|
Re: how to chnage the color of diagram elements [message #129322 is a reply to message #129116] |
Thu, 24 May 2007 11:18 |
Eclipse User |
|
|
|
Originally posted by: bhatia1984.yahoo.com
hiiii
Even for newly created element it doesnt changing the color.
I print the style instance which i hv created in createStyle() method &
style instance in inner class ???Figure of Editpart class both style
object hv same refernce bt in createStyle() methid it shows fill color id
8905185(this is what i am setting)
but in edit part class it shows 16777215.this is the default color id
which GMF provides.
thanks
varun bhatia
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02225 seconds