|
| Re: How to add an ImageDecorator to a connection [message #635521 is a reply to message #635372] |
Wed, 27 October 2010 03:48   |
Michael Wenz Messages: 1267 Registered: July 2009 Location: Walldorf, Germany |
Senior Member |
|
|
In contrast to Text GAs, Image GAs have a default size of 0. Simply add size
information to the image and it will appear, e.g.:
gaService.setLocationAndSize(image, 10, 0, 16, 16);
Michael
"Daniele" <barone.daniele@gmail.com> wrote in message
news:ia6rg6$cjm$1@news.eclipse.org...
> Hi,
> I am trying to add an image to a connection:
>
>
> public PictogramElement add(IAddContext context) {
> ..
>
>
> ConnectionDecorator imageDecorator =
> peCreateService.createConnectionDecorator(connection, true, 0.8, true);
> Image image = gaService.createImage(imageDecorator,
> ImageProvider.IMG_MEASURE);
>
> gaService.setLocation(image, 10, 0);
> ..
> }
>
> but no image is displayed. Am I doing something wrong?
>
> Thank you in advance for any help :)
> Daniele
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.01596 seconds