Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Customize the shape of selection mark
Customize the shape of selection mark [message #248565] Thu, 23 April 2009 07:57 Go to next message
Carsten Spieker is currently offline Carsten SpiekerFriend
Messages: 197
Registered: July 2009
Senior Member
Hi,

in my GEF editor, some figures are not with recangular but e.g. with diamond
shape. When selecting this figure, the shape of the selection mark is still
rectangular which does not look very nice.

How can I customize the shape of the selection mark, so that it is equal to
the figure
Re: Customize the shape of selection mark [message #248575 is a reply to message #248565] Thu, 23 April 2009 13:36 Go to previous messageGo to next message
Ben Vitale is currently offline Ben VitaleFriend
Messages: 247
Registered: July 2009
Senior Member
I have seen previous posts which indicate that the GEF Flow example uses
customized selection feedback. You may want to have a look at that.

Regards,
Ben

Carsten Spieker wrote:
> Hi,
>
> in my GEF editor, some figures are not with recangular but e.g. with diamond
> shape. When selecting this figure, the shape of the selection mark is still
> rectangular which does not look very nice.
>
> How can I customize the shape of the selection mark, so that it is equal to
> the figure´s shape?
>
> Thanks and greetz
> Carsten
>
>
Re: Customize the shape of selection mark [message #248590 is a reply to message #248575] Fri, 24 April 2009 06:49 Go to previous message
Carsten Spieker is currently offline Carsten SpiekerFriend
Messages: 197
Registered: July 2009
Senior Member
Hi Ben,

thanks for your reply.

I just foound out how to solve my problem.

I had to add a customized version of NonResizableEditPolicy to the
corresponding edit part. There I had to overwrite the method
createSelectionHandles(). In this method I added (for the diamond case)
selection handles for the NORTH, EAST, SOUTH and WEST side. I also added a
customized MoveHandle and overwrote the paint() method to draw the diamond
for the selection border.

Greetz
Carsten

"Ben Vitale" <bvitale3002@yahoo.com> schrieb im Newsbeitrag
news:gspqtk$h8t$1@build.eclipse.org...
>I have seen previous posts which indicate that the GEF Flow example uses
>customized selection feedback. You may want to have a look at that.
>
> Regards,
> Ben
>
> Carsten Spieker wrote:
>> Hi,
>>
>> in my GEF editor, some figures are not with recangular but e.g. with
>> diamond shape. When selecting this figure, the shape of the selection
>> mark is still rectangular which does not look very nice.
>>
>> How can I customize the shape of the selection mark, so that it is equal
>> to the figure
Previous Topic:Custom Property Sheet page
Next Topic:editor as dragsource
Goto Forum:
  


Current Time: Thu Apr 25 19:29:38 GMT 2024

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

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

Back to the top