Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Changing connection handle icons
Changing connection handle icons [message #197296] Wed, 16 July 2008 09:57 Go to next message
Eclipse UserFriend
Originally posted by: marcello.larosa.iinet.net.au

Hi all,

I would like to change the icons of the connection handles for a given
diagram element. I saw in the BPMN editor developed with GMF that these
icons have been customized to allow the representation of message flow,
association, etc. Also, I would like to know how one can restrict the
visualization of these handles to a specific side of the diagram element.

Thanks in advance,
Marcello
Re: Changing connection handle icons [message #197486 is a reply to message #197296] Wed, 16 July 2008 21:57 Go to previous messageGo to next message
Brian Jakubik is currently offline Brian JakubikFriend
Messages: 140
Registered: July 2009
Senior Member
Try this:

Extend ConnectionHandle and override getImage() to return your image for
the handle...

Extend ConnectionHandleEditPolicy and override getHandleFigures() to
return a list of your "new" ConnectionHandle's

In your EditPart's createDefaultEditPolicies() add
installEditPolicy(EditPolicyRoles.CONNECTION_HANDLES_ROLE, new
....ConnecionHandleEditPolicy());

you should now see your new handles...

Hope this helps
Brian Jakubik

Marcello wrote:
> Hi all,
>
> I would like to change the icons of the connection handles for a given
> diagram element. I saw in the BPMN editor developed with GMF that these
> icons have been customized to allow the representation of message flow,
> association, etc. Also, I would like to know how one can restrict the
> visualization of these handles to a specific side of the diagram element.
>
> Thanks in advance,
> Marcello
>
>
Re: Changing connection handle icons [message #197635 is a reply to message #197486] Thu, 17 July 2008 09:52 Go to previous message
Eclipse UserFriend
Originally posted by: marcello.larosa.iinet.net.au

Thanks Brian,

I've downloaded the sourcecode of the BPMN editor and found the icon files
and the extended classes as you suggested. I'm going to make my own.

Cheers,
Marcello

"Brian Jakubik" <brian.jakubik@intervoice.com> ha scritto nel messaggio
news:g5lqsa$11s$1@build.eclipse.org...
> Try this:
>
> Extend ConnectionHandle and override getImage() to return your image for
> the handle...
>
> Extend ConnectionHandleEditPolicy and override getHandleFigures() to
> return a list of your "new" ConnectionHandle's
>
> In your EditPart's createDefaultEditPolicies() add
> installEditPolicy(EditPolicyRoles.CONNECTION_HANDLES_ROLE, new
> ...ConnecionHandleEditPolicy());
>
> you should now see your new handles...
>
> Hope this helps
> Brian Jakubik
>
> Marcello wrote:
>> Hi all,
>>
>> I would like to change the icons of the connection handles for a given
>> diagram element. I saw in the BPMN editor developed with GMF that these
>> icons have been customized to allow the representation of message flow,
>> association, etc. Also, I would like to know how one can restrict the
>> visualization of these handles to a specific side of the diagram element.
>>
>> Thanks in advance,
>> Marcello
Previous Topic:XYLayoutEditPolicy in GMF generated code
Next Topic:value of EAttribute not updated on the canvas
Goto Forum:
  


Current Time: Wed Apr 24 14:33:36 GMT 2024

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

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

Back to the top